Hi Viv,
Here are the files:
-- first XSD:
<?xml version="1.0" encoding="utf-8" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" >
<xsd:element name="rules">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="field" minOccurs="0" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="fld_name" type="xsd:string"/>
<xsd:element name="fld_desc" type="xsd:string"/>
<xsd:element name="fld_type" type="xsd:string"/>
<xsd:element name="fld_len" default="0" type="xsd:int"/>
<xsd:element name="def_value" default="" type="xsd:string"/>
<xsd:element name="req_entry" default="false" type="xsd:boolean"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
-- And this is XML:
<?xml version="1.0" encoding="utf-8" ?>
<rules xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="RulesXml.xsd" >
<field>
<fld_name>ProjectAccount</fld_name>
<fld_desc>Project ID/Account Number</fld_desc>
<fld_type>C</fld_type>
<fld_len>16</fld_len>
<def_value></def_value>
<req_entry>true</req_entry>
</field>
<field>
<fld_name>FiscalYear</fld_name>
<fld_desc>Fiscal Year</fld_desc>
<fld_type>N</fld_type>
<fld_len>4</fld_len>
<def_value>123</def_value>
<req_entry>false</req_entry>
</field>
</rules>
Note that if I blank the tag "reg_entry" I get error.
Let me know if you see any issues in my XML/XSD.
Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham