The tool that generates an XSD from an XML instance is nice, but I found 1
problem with it: When there are tags in my XML that have only attributes,
but no content, they are defined in the XSD without any of their attributes!
Example:
<afgeleid-model model="Zorgprestatie model">
<value-list klasse="Geslacht">
<entry code="M" omschrijving="Man" icon="Geslacht-man.gif"/>
<entry code="V" omschrijving="Vrouw" icon="Geslacht-vrouw.gif"/>
</value-list>
<value-list klasse="Indicator">
<entry code="J" omschrijving="Ja" />
<entry code="N" omschrijving="Nee" />
</value-list>
<shortcut context="Zorg" pad="prestatie.code" afkorting="prestatiecode"
omschrijving="Code van de geleverde prestatie" icon="prestatie.gif"
in-toolbar="true" />
<shortcut context="Zorg" pad="persoon.geslacht" afkorting="geslacht"
icon="Geslacht.gif" in-toolbar="true"/>
</afgeleid-model>
This gives the following XSD:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.w3.org/2001/XMLSchema">
<xsd:element name="afgeleid-model">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value-list" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="entry"
maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="klasse" type="xsd:string"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="shortcut" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="model" type="xsd:string"/>
</xsd:complexType>
</xsd:element>
</xsd:schema>
As you can see, the elements 'entry' and 'shortcut' don't have any
attributes defined, although in the original XML they have a whole list of
attributes.
Regards,
--Tim
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev