[opencms-dev] Default document contents for new XML content item

Jonathan Woods jonathan.woods at scintillance.com
Thu Mar 23 06:26:05 CET 2006


For custom XML content types, is there a way to specify the default contents
for new documents created in the Workplace?
 
I've created an XSD schema for a new XML content item (type), and I've told
OpenCms all about it by configurating opencms-modules.xml and so on.  I can
open document instances in the XML content editor, and everything works
fine.
 
The trouble comes when I'm using the Workplace to create a new instance of
the type.  The XML content editor appears, with default values filled in
where I've specified them in the schema definition.  But the XSD is (mildly)
complex, and includes the OpenCmsImage XSD type - and it seems that although
OpenCms happily creates all the mandatory nodes/elements defined in the
scema, it doesn't recursively create the child elements of included complex
types.  Since this isn't possible from the XML content editor either, the
only way to create new resources of this type is by editing XML source code.
 
Any ideas welcome!
 
Jon
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20060323/d8af8bef/attachment.htm>


More information about the opencms-dev mailing list