[opencms-dev] displaying xml content fails
Sandrine Prousteau
s.prousteau at eurelis.com
Wed Oct 8 09:52:58 CEST 2008
Hi
Try removing the "s" at the end of your types in the <xsd:element > and the second <xsd:complexType >.
Like this:
<xsd:element name="Types" type="OpenCmsTypes"/>
<xsd:complexType name="OpenCmsTypes">
<xsd:sequence>
<xsd:element name="Type" type="OpenCmsType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OpenCmsType">....
-----Message d'origine-----
De : opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] De la part de Lammersdorf, Lorenz
Envoyé : mercredi 8 octobre 2008 07:14
À : opencms-dev at opencms.org
Objet : [opencms-dev] displaying xml content fails
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
_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev
More information about the opencms-dev
mailing list