[opencms-dev] Default Values for Nested Elements

Clement Wee clement at elixirtech.com
Mon May 1 08:28:51 CEST 2017


Hi guys,

I have a resource-type composed of two nested XSDs. I need to set the
default values in these nested XSDs.

I found some directions for that on a post on this mailing list dated from
2008, but when I tried following the instructions, the system threw a "No
such element error".

The directions were:

"you have to define the default values within the most outer schema (the one
which is called to create the resource).
Further you have to specify the full path to pick the right node.

For example foo.xsd is nested within bar.xsd by the element name of
SomeElement. Further foo.xsd contains the element AnotherElement. In case
you want to set a default value for all AnotherElement(s) you have to add
the following to *bar.xsd*.

<defaults>
	<default element="SomeElement/AnotherElement" value="abc"/>
</defaults>

"

Has the way of handling default values in OpenCMS for nested XSDs changed
between 2008 and 2017? If so, what is the new way?


Regards,
Clement Wee
Singapore
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20170501/9adf8b73/attachment.htm>


More information about the opencms-dev mailing list