Hi All,
I am trying to validate a Xml Document with Schema using xerces1.3.1,
 
XML Document is------
<?xml version="1.0"?>
<letterBody xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://www.w3.org/2001/XMLSchema d:\MixedContentSchema.xsd">
<salutation>Dear Mr.<name>Robert Smith</name>.</salutation>
 <quantity>1</quantity> <productName>Baby
Monitor</productName> date
<shipDate>1999-05-21</shipDate>
</letterBody>
 
Schema is----------------
 
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 <xsd:element name="letterBody">
  <xsd:complexType mixed="true">
   <xsd:sequence>
    <xsd:element name="salutation">
     <xsd:complexType mixed="true">
      <xsd:sequence>
       <xsd:element name="name" type="xsd:string"/>
      </xsd:sequence>
     </xsd:complexType>
    </xsd:element>
    <xsd:element name="quantity" type="xsd:positiveInteger"/>
    <xsd:element name="productName" type="xsd:string"/>
    <xsd:element name="shipDate" type="xsd:date" minOccurs="0"/>
   </xsd:sequence>
  </xsd:complexType>
 </xsd:element>
<xsd:schema>
 
but i am getting following errors----------
3:96: Error is :Element type "letterBody" must be declared.
6:13: Error is :Element type "salutation" must be declared.
6:27: Error is :Element type "name" must be declared.
7:12: Error is :Element type "quantity" must be declared.
7:38: Error is :Element type "productName" must be declared.
9:11: Error is :Element type "shipDate" must be declared.
 
Please suggest me where i am wrong!!!!
 
regards
Anoop Singh
-----------------------------------------------------------------------------------------------------------------------
Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and
is intended for use only by the individual or entity to which it is
addressed, and may contain information that is privileged, confidential or
exempt from disclosure under applicable law. If you are not the intended
recipient or it appears that this mail has been forwarded to you without
proper authority, you are notified that any use or dissemination of this
information in any manner is strictly prohibited. In such cases, please
notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail
from your records.
------------------------------------------------------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to