OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Simple Schema

[ Lists Home | Date Index | Thread Index ]

Hi,
  The following is the schema file.
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:elementType name="note">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="to" type="xs:string" minOccur="1" maxOccur="5"/>
        <xs:element name="from" type="xs:string" minOccur="1" maxOccur="5"/>
        <xs:element name="heading" type="xs:string" minOccur="1" maxOccur="5"/>
     </xs:sequence>
    </xs:complexType>
</xs:elementType>
 
The  following is the corresponding XML
<?xml version="1.0"?>
<note xsi:noNamespaceSchemaLocation="xmlsch.xsd">
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
</note>
 
The following is the error, i am getting while parsing.
Error:  org.xml.sax.SAXParseException: Element type "note" must be declared.
Error:  org.xml.sax.SAXParseException: Element type "to" must be declared.
Error:  org.xml.sax.SAXParseException: Element type "from" must be declared.
Error:  org.xml.sax.SAXParseException: Element type "heading" must be declared.
Error:  org.xml.sax.SAXParseException: Element type "body" must be declared.
Regards
Raja 
 




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS