[poco-interesante] [opencms-dev] XML Content Demo
opencms at biberbeatz.de
opencms at biberbeatz.de
Tue Nov 23 15:16:36 CET 2004
Hi Jorge,
thank you for your quick answer. Here are my details.
Jorge González wrote:
>Well, this is my checklist
>
>1. Xerces-J >= 2.6 ? (look into tomcat/common/lib or endorsed)
xercesImpl-2.6.2.jar
Which one is the best to use and where can I get the recommended?
>2. XSD
> 2.1 tags begin with OpenCms (required)
What do you mean start with OpenCMS? You mean the type?
See my attached myarticles.xsd:
<-----------snip-------->
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xsd:include
schemaLocation="opencms://opencms-xmlcontent.xsd" />
<xsd:element name="myarticles" type="OpenCmsMyArticles" />
<xsd:complexType name="OpenCmsMyArticles">
<xsd:sequence>
<xsd:element name="myarticle"
type="OpenCmsMyArticle" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="OpenCmsMyArticle">
<xsd:sequence>
<xsd:element name="Title"
type="OpenCmsString" />
</xsd:sequence>
<xsd:attribute name="language" type="OpenCmsLocale"
use="required" />
</xsd:complexType>
<xsd:annotation>
<xsd:appinfo>
<mapping element="Title"
mapto="property:Title" />
</xsd:appinfo>
</xsd:annotation>
</xsd:schema>
<-------snip------------------>
> 2.2 linked attributes exist declared as attributes (for example,
the Title
>one in the articles.xsd example)
Do not know what do yozu mean in detail. I just copied paste the
example by Alexander which worked fine for a lot of people.
>3. XML
> 3.1 Created as generic xml content ?
I did that. Created a blnak genereic XML file. Error message appaears
when saving the generic file.
> 3.2 control code namespace file exists (double check the
path)
Do you mean the reference toi the schema?
This is
xsi:noNamespaceSchemaLocation="opencms://sites/default/xmlcontent/mya
rticle.
xsd
So I uploaded my schema with a fileupload to the location where the
generic xml file is saved and published the content.
>
>Try to generate al article, but don't use the wizard, use a xml
generic
>content, and edit the control code by hand. If this doesn't work,
the
>problem could be outside your schema file.
I did it as you described. And I did not upload the schema for
testing purposes once and I got the message it is missing. So it
looks like the schema works fine.
Thanks in advance, Jorge.
Best regards,
Jan
More information about the opencms-dev
mailing list