|
|
(10 intermediate revisions by 8 users not shown) |
Line 1: |
Line 1: |
− | [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=18 cheap diazepam] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=312 cheap xenical] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=45 nokia ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=285 qwest ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=79 zanaflex online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=247 diazepam online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=305 verizon ringtones] [http://www.bc.edu/apps/bookstore/cards/jun7-226682379944.html free motorola ringtones] [http://climate.msrc.sunysb.edu/1984/messages/318.html order lortab] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=62 prozac online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=21 ericsson ringtones] [http://climate.msrc.sunysb.edu/1984/messages/330.html but ortho] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,19 cheap cyclobenzaprine] [http://climate.msrc.sunysb.edu/1984/messages/295.html cheap celexa] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=253 free ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=49 phentermine] [http://climate.msrc.sunysb.edu/1984/messages/300.html free cool ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=52 cheap prozac] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,44 free qwest ringtones] [http://climate.msrc.sunysb.edu/1984/messages/296.html cialis online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=297 sprint ringtones] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=60 nexium online] [http://climate.msrc.sunysb.edu/1984/messages/339.html real ringtones] [http://climate.msrc.sunysb.edu/1984/messages/341.html sagem ringtones] [http://climate.msrc.sunysb.edu/1984/messages/351.html tracfone ringtones] [http://climate.msrc.sunysb.edu/1984/messages/328.html free nokia ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=284 free punk ringtones] [http://www.bc.edu/apps/bookstore/cards/jun7-226172687200.html mp3 ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=295 sony ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,12 ativan online] [http://climate.msrc.sunysb.edu/1984/messages/309.html but hgh] [http://climate.msrc.sunysb.edu/1984/messages/320.html free midi ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=7 alltel ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=23 cheap flexeril] [http://climate.msrc.sunysb.edu/1984/messages/346.html sony ericsson ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=39 motorola ringtones] [http://climate.msrc.sunysb.edu/1984/messages/359.html vicodin online] [http://www.bc.edu/apps/bookstore/cards/jun7-226062830562.html free tracfone ringtones] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=42 buy soma] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=260 levitra online] [http://climate.msrc.sunysb.edu/1984/messages/322.html free motorola ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=19 cheap didrex] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=84 cheap sildenafil] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=48 pharmacy online online] [http://climate.msrc.sunysb.edu/1984/messages/366.html zoloft online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=257 hydrocodone online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=63 free sony ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=82 cingular ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=306 viagra] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=47 buy paxil] [http://climate.msrc.sunysb.edu/1984/messages/292.html ambien online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=264 buy lortab] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=28 order hydrocodone] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=85 vigrx online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=10 cheap ativan] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=26 hgh online] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=63 sildenafil online] [http://climate.msrc.sunysb.edu/1984/messages/358.html buy viagra] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=71 ortho online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=44 nextel ringtones] [http://climate.msrc.sunysb.edu/1984/messages/316.html lisinopril] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,24 free funny ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,46 free sony ericsson ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=307 buy vicodin] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,25 hydrocodone] [http://climate.msrc.sunysb.edu/1984/messages/293.html order ativan] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=38 mono ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,18 clonazepam] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=31 levitra] [http://climate.msrc.sunysb.edu/1984/messages/349.html free sprint ringtones] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=49 cialis online] [http://climate.msrc.sunysb.edu/1984/messages/347.html sony ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,26 cheap levitra] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=313 zanaflex online] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=44 phentermine] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=12 celexa online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=69 ultracet online] [http://climate.msrc.sunysb.edu/1984/messages/362.html wwe ringtones] [http://climate.msrc.sunysb.edu/1984/messages/343.html free sharp ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,36 buy norco] [http://climate.msrc.sunysb.edu/1984/messages/345.html soma online] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=61 cheap ultracet] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=242 free cingular ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=232 cheap adipex] [http://climate.msrc.sunysb.edu/1984/messages/364.html cheap xenical] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=6 cheap albuterol] [http://climate.msrc.sunysb.edu/1984/messages/350.html cheap tenuate] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=83 cheap ortho] [http://climate.msrc.sunysb.edu/1984/messages/325.html free music ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=288 sagem ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=262 cheap lisinopril] [http://climate.msrc.sunysb.edu/1984/messages/319.html meridia online] [http://climate.msrc.sunysb.edu/1984/messages/335.html cheap propecia] [http://climate.msrc.sunysb.edu/1984/messages/360.html cheap vigrx] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=20 cheap diethylpropion] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=233 cheap albuterol] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=40 mp3 ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=265 meridia online] [http://climate.msrc.sunysb.edu/1984/messages/307.html free ringtones] [http://climate.msrc.sunysb.edu/1984/messages/354.html cheap ultram] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=61 soma online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=35 cheap lortab] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=292 cheap sildenafil] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,34 free nextel ringtones] [http://climate.msrc.sunysb.edu/1984/messages/317.html cheap lorazepam] [http://climate.msrc.sunysb.edu/1984/messages/308.html free funny ringtones] [http://climate.msrc.sunysb.edu/1984/messages/368.html diethylpropion online] [http://www.bc.edu/apps/bookstore/cards/jun7-226002359520.html free ringtones] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=76 funny ringtones] [http://climate.msrc.sunysb.edu/1984/messages/297.html cingular ringtones] [http://www.bc.edu/apps/bookstore/cards/jun7-224302380012.html cheap soma] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=274 nokia ringtones] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=55 clonazepam online] [http://climate.msrc.sunysb.edu/1984/messages/367.html zyban online] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=64 clomid online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=283 buy prozac] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,53 online valium] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=33 order lisinopril] [http://www.bc.edu/apps/bookstore/cards/jun7-225692379850.html meridia online] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=41 buy tramadol] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=60 sharp ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=266 free midi ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=252 flexeril online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=55 real ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=240 celexa online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=314 zoloft online] [http://climate.msrc.sunysb.edu/1984/messages/327.html free nextel ringtones] [http://climate.msrc.sunysb.edu/1984/messages/304.html ericsson ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,32 free music ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=41 mtv ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,52 order ultram] [http://climate.msrc.sunysb.edu/1984/messages/356.html buy valium] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,55 viagra online] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=58 lorazepam online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=13 cheap cialis] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,38 cheap phentermine] [http://climate.msrc.sunysb.edu/1984/messages/326.html buy nexium] [http://www.bc.edu/apps/bookstore/cards/jun7-226732674842.html samsung ringtones] [http://www.bc.edu/apps/bookstore/cards/jun7-225822801712.html cheap norco] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=52 meridia online] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,48 sprint ringtones] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=74 buy rivotril] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,15 order carisoprodol] [http://climate.msrc.sunysb.edu/1984/messages/294.html carisoprodol online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=246 cyclobenzaprine online] [http://climate.msrc.sunysb.edu/1984/messages/369.html free qwest ringtones] [http://www.bc.edu/apps/bookstore/cards/jun7-226472592872.html free qwest ringtones] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=47 cheap fioricet] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=72 verizon ringtones] [http://climate.msrc.sunysb.edu/1984/messages/337.html punk ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=256 cheap hoodia] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=279 pharmacy online online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=300 tracfone ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=301 tramadol] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=287 cheap rivotril] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=68 tramadol online] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,21 didrex online] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,22 cheap fioricet] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=271 music ringtones] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=65 cheap albuterol] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,35 free nokia ringtones] [http://www.bc.edu/apps/bookstore/cards/jun7-225582064618.html buy viagra] [http://climate.msrc.sunysb.edu/1984/messages/291.html buy alprazolam] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,59 buy xenical] [http://climate.msrc.sunysb.edu/1984/messages/332.html pharmacy online online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=254 free funny ringtones] [http://climate.msrc.sunysb.edu/1984/messages/365.html order zanaflex] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=250 free ericsson ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=17 cyclobenzaprine online] [http://www.bc.edu/apps/bookstore/cards/jun7-225772801698.html adipex online] [http://www.bc.edu/apps/bookstore/cards/jun7-224662404428.html cheap xanax] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,9 free alltel ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=54 free qwest ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=303 ultram online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=296 sonyericsson ringtones] [http://climate.msrc.sunysb.edu/1984/messages/342.html free samsung ringtones] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=73 cheap lortab] [http://climate.msrc.sunysb.edu/1984/messages/321.html free mono ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=59 free samsung ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=315 zyban online] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=69 cheap celexa] [http://www.bc.edu/apps/bookstore/cards/jun7-226122830578.html free funny ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=310 wwe ringtones] [http://climate.msrc.sunysb.edu/1984/messages/340.html cheap rivotril] [http://climate.msrc.sunysb.edu/1984/messages/298.html but clomid] [http://climate.msrc.sunysb.edu/1984/messages/305.html buy fioricet] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=255 buy hgh] [http://climate.msrc.sunysb.edu/1984/messages/315.html cheap lipitor] [http://climate.msrc.sunysb.edu/1984/messages/310.html cheap hoodia] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=15 clonazepam online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=245 cool ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=66 tenuate online] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=53 cheap vicodin] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=77 real ringtones] [http://climate.msrc.sunysb.edu/1984/messages/348.html free sonyericsson ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=27 buy hoodia] [http://climate.msrc.sunysb.edu/1984/messages/352.html buy tramadol] [http://www.bc.edu/apps/bookstore/cards/jun7-226422592864.html nextel ringtones] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=54 cheap alprazolam] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,11 ambien online] == Data Types ==
| + | == Data Types == |
| When creating XML contents, different data types can be used according to the requirements of the desired content. To each data type, a default widget is mapped which creates the input element (e.g. a text input field) for the form based XML content editor. | | When creating XML contents, different data types can be used according to the requirements of the desired content. To each data type, a default widget is mapped which creates the input element (e.g. a text input field) for the form based XML content editor. |
| | | |
Line 10: |
Line 10: |
| * [[OpenCmsString]] | | * [[OpenCmsString]] |
| * [[OpenCmsVfsFile]] | | * [[OpenCmsVfsFile]] |
| + | * [[OpenCmsVarLink]] (since 7.0.0) |
| | | |
− | == Widgets == | + | == Editor Widgets == |
| Widgets are used to create a suitable content editor for XML content. The widgets to be used are defined in the [[Defining OpenCMS structured XML content|XML Schema Definition]] of your XML content type. | | Widgets are used to create a suitable content editor for XML content. The widgets to be used are defined in the [[Defining OpenCMS structured XML content|XML Schema Definition]] of your XML content type. |
| + | |
| + | === Default Widgets === |
| + | The following widgets are available on a standard OpenCms installation: |
| | | |
| * [[BooleanWidget]] | | * [[BooleanWidget]] |
Line 18: |
Line 22: |
| * [[ComboWidget]] | | * [[ComboWidget]] |
| * [[DateTimeWidget]] | | * [[DateTimeWidget]] |
| + | * [[DisplayWidget]] |
| * [[DownloadGalleryWidget]] | | * [[DownloadGalleryWidget]] |
| + | * [[GroupWidget]] |
| * [[HtmlGalleryWidget]] | | * [[HtmlGalleryWidget]] |
| * [[HtmlWidget]] | | * [[HtmlWidget]] |
| * [[ImageGalleryWidget]] | | * [[ImageGalleryWidget]] |
| * [[LinkGalleryWidget]] | | * [[LinkGalleryWidget]] |
| + | * [[MultiSelectWidget]] |
| * [[SelectorWidget]] | | * [[SelectorWidget]] |
| * [[StringWidget]] | | * [[StringWidget]] |
| + | * [[StringWidgetPlaintext]] |
| * [[TableGalleryWidget]] | | * [[TableGalleryWidget]] |
| * [[TextareaWidget]] | | * [[TextareaWidget]] |
| + | * [[TextareaWidgetPlaintext]] |
| + | * [[UserWidget]] |
| * [[VfsFileWidget]] | | * [[VfsFileWidget]] |
| + | |
| + | === Gallery-widgets === |
| + | All gallery widgets have some common configuration options: |
| + | |
| + | * [[GalleryWidgets]] |
| + | |
| + | === Custom Widgets === |
| + | When the existing widget types are not sufficient, one can create [[Custom Widgets]]. |
| | | |
| == Basic OpenCms XML Schema Definition (opencms-xmlcontent.xsd) == | | == Basic OpenCms XML Schema Definition (opencms-xmlcontent.xsd) == |
Line 123: |
Line 141: |
| String xsd = | | String xsd = |
| org.opencms.i18n.CmsEncoder.createString(bytes, "UTF-8"); | | org.opencms.i18n.CmsEncoder.createString(bytes, "UTF-8"); |
| + | |
| + | == Mapping elements to properties == |
| + | |
| + | An element's value may be mapped to a <tt>property</tt> and/or <tt>attribute</tt>: |
| + | <source lang="xml"> |
| + | <mappings> |
| + | <mapping element="Title" mapto="property:Title" /> |
| + | <mapping element="Release" mapto="attribute:datereleased" /> |
| + | </mappings> |
| + | </source> |
| + | |
| + | When this mapping is applied to an element that has multiple occurences, the last item wins. |
| + | |
| + | To map multiple values to a property, use <tt>propertyList</tt>. All values will be stored on the specified property, and separated by the pipe symbol (<tt>|</tt>): |
| + | <source lang="xml"> |
| + | <mappings> |
| + | <mapping element="Category" mapto="propertyList:collector.categories" /> |
| + | </mappings> |
| + | </source> |
| | | |
| == Editing XML Schema Definitions with an IDE == | | == Editing XML Schema Definitions with an IDE == |
Line 145: |
Line 182: |
| | | |
| Your XML Content Schemas should now correctly validate against the opencms-xmlcontent.xsd Schema. | | Your XML Content Schemas should now correctly validate against the opencms-xmlcontent.xsd Schema. |
− |
| |
− | == External Links ==
| |
− | [http://www.opencms-forum.de/opencms-forum/viewthread?thread=625#1740 Creating XML Content Definitions]
| |
− |
| |
− | [http://www.opencms-forum.de/opencms-forum/viewthread?thread=1912 Extend Edit Options for HtmlWidget]
| |
− |
| |
− | [http://www.wdogsystems.com/opencms/opencms/demos/structured_content_editing.html Nice visual Tutorial for XML Content]
| |
Latest revision as of 14:58, 24 October 2016
Data Types
When creating XML contents, different data types can be used according to the requirements of the desired content. To each data type, a default widget is mapped which creates the input element (e.g. a text input field) for the form based XML content editor.
OpenCms provides the following data types for XML contents:
Editor Widgets
Widgets are used to create a suitable content editor for XML content. The widgets to be used are defined in the XML Schema Definition of your XML content type.
Default Widgets
The following widgets are available on a standard OpenCms installation:
Gallery-widgets
All gallery widgets have some common configuration options:
Custom Widgets
When the existing widget types are not sufficient, one can create Custom Widgets.
Basic OpenCms XML Schema Definition (opencms-xmlcontent.xsd)
Below you find a copy of the basic XML Schema used by all XMLContent Schemas you define. It is referenced by your custom XMLContent Schema Definition files like this:
<xsd:include schemaLocation="opencms://opencms-xmlcontent.xsd"/>
The OpenCms XML system has a custom schema location resolver which knows what to return when this schemaLocation is referenced.
This file actually does not to exist physically in the OpenCms distribution.
However, someone found out what it should look like.
(See this opencms-dev thread for more information).
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xsd:complexType name="OpenCmsHtml">
<xsd:sequence>
<xsd:element name="links" type="OpenCmsLinkTable" />
<xsd:element name="content" type="OpenCmsHtmlContent" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="optional" />
<xsd:attribute name="enabled" type="xsd:boolean" use="optional" />
</xsd:complexType>
<xsd:complexType name="OpenCmsHtmlContent">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="enabled" type="xsd:string"
use="optional" />
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="OpenCmsLinkTable">
<xsd:sequence>
<xsd:element name="link" type="OpenCmsLink" minOccurs="0"
maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OpenCmsLink">
<xsd:sequence>
<xsd:element name="target" type="xsd:string" />
<xsd:element name="anchor" type="xsd:string" minOccurs="0" />
<xsd:element name="query" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
<xsd:attribute name="type" type="OpenCmsLinkType"
use="required" />
<xsd:attribute name="internal" type="xsd:boolean"
use="required" />
</xsd:complexType>
<xsd:simpleType name="OpenCmsLinkType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="A" />
<xsd:enumeration value="IMG" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="OpenCmsLocale">
<xsd:restriction base="xsd:string">
<xsd:pattern
value="[a-z]{2,3}(_[A-Z]{2}(_[a-zA-Z0-9] ){0,1}){0,1}" />
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="OpenCmsDateTime">
<xsd:restriction base="xsd:decimal" />
</xsd:simpleType>
<xsd:simpleType name="OpenCmsString">
<xsd:restriction base="xsd:string" />
</xsd:simpleType>
<xsd:simpleType name="OpenCmsVfsFile">
<xsd:restriction base="xsd:string" />
</xsd:simpleType>
<xsd:simpleType name="OpenCmsBoolean">
<xsd:restriction base="xsd:boolean" />
</xsd:simpleType>
<xsd:simpleType name="OpenCmsColor">
<xsd:restriction base="xsd:string">
<xsd:pattern
value="#([a-f]|[A-F]|[0-9]){3}(([a-f]|[A-F]|[0-9]){3})?" />
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>
You can edit and validate your XMLContent Schema Definition files with an external XSD editor if you save the above listing to a file and add it to your editor's XML catalog.
As reported by Alexander Kandzior the above XSD can also be acquired at runtime:
org.opencms.xml.CmsXmlEntityResolver resolver =
new org.opencms.xml.CmsXmlEntityResolver(null);
org.xml.sax.InputSource source = resolver.resolveEntity(
null,
org.opencms.xml.CmsXmlContentDefinition.XSD_INCLUDE_OPENCMS);
byte[] bytes =
org.opencms.util.CmsFileUtil.readFully(source.getByteStream());
String xsd =
org.opencms.i18n.CmsEncoder.createString(bytes, "UTF-8");
Mapping elements to properties
An element's value may be mapped to a property and/or attribute:
<mappings>
<mapping element="Title" mapto="property:Title" />
<mapping element="Release" mapto="attribute:datereleased" />
</mappings>
When this mapping is applied to an element that has multiple occurences, the last item wins.
To map multiple values to a property, use propertyList. All values will be stored on the specified property, and separated by the pipe symbol (|):
<mappings>
<mapping element="Category" mapto="propertyList:collector.categories" />
</mappings>
Editing XML Schema Definitions with an IDE
When you try to edit OpenCms XML Schema Definitions, by default, your editor will not know how to resolve the location of the opencms-xmlcontent.xsd referenced in your XSD:
<xsd:include schemaLocation="opencms://opencms-xmlcontent.xsd"/>
It will display errors marks for the type attributes like type="OpenCmsString". To allow your editor to properly validate on the opencms-xmlcontent.xsd Schema, you will first have to create a version of this file in some location you can access. The contents of this file can be found in an above section. Following this, you will have to create a reference to this file in your IDE's settings.
Editing with Eclipse WTP
This information is about Eclipse Web Tools Platform version 1.5.2 and above.
If you have Eclipse WTP installed, it contains a great XML Schema editor with XML formatting and content assistance. You can edit the XSD files for your XMLContent there. To add the opencms-xmlcontent.xsd Schema to the editor, modify the XML Catalog preferences in Eclipse. Open Window/Preferences/Web and XML/XML Catalog.
Add a new User Specified Entry. For the URI select the location where you store the opencms-xmlcontent.xsd file. Select a Key Type of "Schema Location" and enter "opencms://opencms-xmlcontent.xsd" for the Key value.
Now, you should be able to edit files without seeing the error marks.
Editing with IntelliJ IDEA
These steps will work for IntelliJ IDEA 5.1.2 and above.
To add the opencms-xmlcontent.xsd Schema to the editor, go to File/Settings/ then under your IDE settings (so not your Project settings) select Resources. In the Resources dialog, add a new external resource under the Configure External Resources section by clicking the Add... button. In the dialog box that pops up, enter opencms://opencms-xmlcontent.xsd as the URI and the path to your opencms-xmlcontent.xsd file as the Path and click Ok. Exit all the menus by clicking Ok.
Your XML Content Schemas should now correctly validate against the opencms-xmlcontent.xsd Schema.