[opencms-dev] displaying xml content fails
Lammersdorf, Lorenz
ll at metrohm.com
Wed Oct 8 07:14:18 CEST 2008
good morning list,
i've made a xml-template:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xsd:include schemaLocation="opencms://opencms-xmlcontent.xsd"/>
<xsd:include schemaLocation="opencms://system/modules/com.metrohm.contentpage/schemas/rack_def.xsd"/>
<xsd:include schemaLocation="opencms://system/modules/com.metrohm.contentpage/schemas/rack_details.xsd"/>
<xsd:element name="Racks" type="OpenCmsRacks"/>
<xsd:complexType name="OpenCmsRacks">
<xsd:sequence>
<xsd:element name="Racks" type="OpenCmsRacks" minOccurs="0" maxOccurs="unbounded"></xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OpenCmsRacks">
<xsd:sequence>
<xsd:element name="SampleProcessor" type="OpenCmsString" />
<xsd:element name="Article" type="OpenCmsString" />
<xsd:element name="Description" type="OpenCmsString" />
<xsd:element name="Remark" type="OpenCmsString" />
<xsd:element name="RackDefinition" type="OpenCmsDefinition" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="RackDetail" type="OpenCmsDetail" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="language" type="OpenCmsLocale" use="required"/>
</xsd:complexType>
<xsd:annotation>
<xsd:appinfo>
<layouts>
<layout element="SampleProcessor" widget="SelectorWidget" configuration="778|785" />
</layouts>
</xsd:appinfo>
</xsd:annotation>
</xsd:schema>
--------------------------------------------------
rack_defs.xsd:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xsd:include schemaLocation="opencms://opencms-xmlcontent.xsd"/>
<xsd:element name="Definitions" type="OpenCmsDefinitions"/>
<xsd:complexType name="OpenCmsDefinitions">
<xsd:sequence>
<xsd:element name="Definition" type="OpenCmsDefinition" minOccurs="0" maxOccurs="unbounded"></xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OpenCmsDefinition">
<xsd:sequence>
<xsd:element name="Instrument" type="OpenCmsString" />
<xsd:element name="tiamo" type="OpenCmsString" />
<xsd:element name="TCPC" type="OpenCmsString" />
<xsd:element name="Vesuv" type="OpenCmsString" />
</xsd:sequence>
<xsd:attribute name="language" type="OpenCmsLocale" use="optional"/>
</xsd:complexType>
<xsd:annotation>
<xsd:appinfo>
<layouts>
<layout element="tiamo" widget="SelectorWidget" configuration="ok | x | -- " />
<layout element="TCPC" widget="SelectorWidget" configuration="ok | x | -- " />
<layout element="Vesuv" widget="SelectorWidget" configuration="ok | x | -- " />
</layouts>
</xsd:appinfo>
</xsd:annotation>
</xsd:schema>
---------------------------------------------------
rack_details.xsd:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xsd:include schemaLocation="opencms://opencms-xmlcontent.xsd"/>
<xsd:element name="Details" type="OpenCmsDetails"/>
<xsd:complexType name="OpenCmsDetails">
<xsd:sequence>
<xsd:element name="Detail" type="OpenCmsDetail" minOccurs="0" maxOccurs="unbounded"></xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OpenCmsDetail">
<xsd:sequence>
<xsd:element name="Vessel" type="OpenCmsString" />
<xsd:element name="beakers" type="OpenCmsString" />
<xsd:element name="TopPlate" type="OpenCmsString" />
<xsd:element name="BasePlate" type="OpenCmsString" />
<xsd:element name="Code" type="OpenCmsString" />
<xsd:element name="CodePosition" type="OpenCmsString" />
</xsd:sequence>
<xsd:attribute name="language" type="OpenCmsLocale" use="optional"/>
</xsd:complexType>
<xsd:annotation>
<xsd:appinfo>
<layouts>
</layouts>
</xsd:appinfo>
</xsd:annotation>
</xsd:schema>
---------------------------------------------------------------------------------
works fine, i'm able to create files using the xml-definition above.
but
<cms:contentload collector="allInFolder" param="%(opencms.folder)|Racks">
</cms:contentload>
fails with
org.opencms.main.CmsRuntimeException: Unable to unmarshal XML content definition schema.
why???
thanx!
lorenz
More information about the opencms-dev
mailing list