Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Need help with this schema Need help with this schemaTo: NULL Date: 8/1/2006 10:58:00 AM
I've got the following xml, and I'm trying to develop an xsd (below) to
validate it. For the most part, my xsd is good, except I am having trouble
accomodating the text after the Completed_By tag. How can I do this?
<ns0:Assessment xmlns:ns0="http://AIM.xsd">
<Location>ABC</Location>
<Client>1234A</Client>
<Client_Name>FRED SMITH</Client_Name>
<Address>123 St, City Prov</Address>
<City>CityName</City>
<Province>AB</Province>
<Postal_Code>LNL NLN</Postal_Code>
<Telephone>555-555-5555</Telephone>
<System>Assessment</System>
<Type>Assessment</Type>
<Date>28 JUN 06</Date>
<Completed_By>UserName</Completed_By> Additional Text
<Section Value="AA"> Additional text
<Question Value="1.A"> Question text
<Question_Text>Question text</Question_Text>
<Answer_Text>Answer</Answer_Text>
<Answer_Value>1</Answer_Value>
</Question>
<Question Value="1.B"> Question text
<Question_Text>Question text</Question_Text>
<Answer_Text>Answer</Answer_Text>
<Answer_Value>1</Answer_Value>
</Question>
</Section>
<Section Value="CC"> Referral Items
<Question Value="1"> Question text
<Question_Text>Question text</Question_Text>
<Answer_Text>Answer</Answer_Text>
<Answer_Value>1</Answer_Value>
</Question>
</Section>
</ns0:Assessment>
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:ns0="http://AIM.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://AIM.xsd"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="Assessment">
<xs:complexType>
<xs:sequence>
<xs:element name="Location" type="xs:string"/>
<xs:element name="Client" type="xs:string"/>
<xs:element name="Client_Name" type="xs:string"/>
<xs:element name="Address" type="xs:string"/>
<xs:element name="City" type="xs:string"/>
<xs:element name="Province" type="xs:string"/>
<xs:element name="Postal_Code" type="xs:string"/>
<xs:element name="Telephone" type="xs:string"/>
<xs:element name="System" type="xs:string"/>
<xs:element name="Type" type="xs:string"/>
<xs:element name="Date" type="xs:string"/>
<xs:element name="Completed_By" type="xs:string"/>
<xs:element name="Section" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="Question" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="Question_Text" type="xs:string"/>
<xs:element name="Answer_Text" type="xs:string"/>
<xs:element name="Answer_Value" type="xs:string"/>
</xs:sequence>
<xs:attribute name="Value" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="Value" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
