- From: Bob Schloss <rschloss@us.ibm.com>
- Date: Fri, 21 Sep 2001 09:11:03 -0400
- To: "Hanumaiahgari, Srinivas" <Srinivas.Hanumaiahgari@dva.gov.au>
- Cc: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
Srinivas, Note that your schema has an extra character before the prefix:tagname xsd:schema. This is probably not what is causing the Xerces message, but once you resolve that, you should correct this problem also. Bob "Hanumaiahgari, Srinivas" <Srinivas.Hanumaiahgari@dva.gov.au>@w3.org on 09/21/2001 03:38:13 AM Sent by: xmlschema-dev-request@w3.org To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org> cc: Subject: XML Schema Implementation hi all, not getting how to validate my xml file against the schema. Used apache parser which supports W3C schema. Getting the following error. Recoverable Error: Attribute "xsd:noNamespaceSchemaLocation" must be declared for element type "SupplierInvoice". (file:///C:/binusha/SupplierInvoice.xml:10,51) SupplierInvoice xmlns:xsd="http://www.w3.org/2001/XMLSchema" seems to be problem with directing the location of xsd file to the xml file. Plz help me as it checked my progress. thanx, srinivas XML Document: <?xml version='1.0' encoding='utf-8'?> <SupplierInvoice xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance" xsd:noNamespaceSchemaLocation="C:\binusha\finalSchema.xsd"> <SupplierData currency="A$"> <invoiceNumber>2948375018</invoiceNumber> <abn>41625932056</abn> <dvaVendorNumber>A023</dvaVendorNumber> <uin>12312321</uin> <totalCost>1000.00</totalCost> <totalGst>100.00</totalGst> <totalDeliveryCost>1100.00</totalDeliveryCost> </SupplierData> <ItemData> <rapScheduleNumber>AYO2</rapScheduleNumber> <catalogueNumber>P26</catalogueNumber> <unitCost>50.00</unitCost> <gstPerUnit>5.00</gstPerUnit> <quantity>3.00</quantity> </ItemData> <!-- This represents the combination of PrescriberData,VeteranData and DeliveryData --> <PVDsData dateFormat="YYYYMMDD"> <!-- First set of Prescriber,Veteran and Delivery Data --> <PVDData Number="1"> <PrescriberData> <providerNumber>1234567789</providerNumber> <prescriberType>44123456704</prescriberType> <datePrescribed>02/03/2001</datePrescribed> <dateOrdered>05/03/2001</dateOrdered> </PrescriberData> <VeteranData> <fileNumber>NSR00729</fileNumber> <surname>Peedo</surname> <initial>K</initial> <postcode>2604</postcode> </VeteranData> <DeliveryData> <deliveryDate>10/03/2001</deliveryDate> <deliveryNumber>5260</deliveryNumber> <deliveryCost>150.00</deliveryCost> </DeliveryData> </PVDData> <!-- Second set of Prescriber,Veteran and Delivery Data --> <PVDData Number="2"> <PrescriberData> <providerNumber>25423986</providerNumber> <prescriberType>85628936128</prescriberType> <datePrescribed>11/04/2001</datePrescribed> <dateOrdered>12/04/2001</dateOrdered> </PrescriberData> <VeteranData> <fileNumber>WSM09522</fileNumber> <surname>Murphy</surname> <initial>A</initial> <postcode>4825</postcode> </VeteranData> <DeliveryData> <deliveryDate>13/04/2001</deliveryDate> <deliveryNumber>38890</deliveryNumber> <deliveryCost>175.00</deliveryCost> </DeliveryData> </PVDData> <!-- Third set of Prescriber,Veteran and Delivery Data --> <PVDData Number="3"> <PrescriberData> <providerNumber></providerNumber> <prescriberType>12323121</prescriberType> <datePrescribed>20/11/2001</datePrescribed> <dateOrdered>24/11/2001</dateOrdered> </PrescriberData> <VeteranData> <fileNumber>VX50823</fileNumber> <surname>Smith</surname> <initial>W</initial> <postcode>4906</postcode> </VeteranData> <DeliveryData> <deliveryDate>27/11/2001</deliveryDate> <deliveryNumber>7431</deliveryNumber> <deliveryCost>200.00</deliveryCost> </DeliveryData> </PVDData> </PVDsData> </SupplierInvoice> XML SCHEMA: <?xml version="1.0" encoding="utf-8"?> <-xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:annotation> <xsd:documentation xml:lang="en"> Supplier Invoice schema for dva.gov.au All rights reserved </xsd:documentation> </xsd:annotation> <!-- definition of simple type elements --> <xsd:simpleType name="numberType"> <xsd:restriction base="xsd:integer"> <xsd:minInclusive value="1"/> </xsd:restriction> </xsd:simpleType> <xsd:simpleType name="nameType"> <xsd:restriction base="xsd:string"> <xsd:maxLength value="20"/> </xsd:restriction> </xsd:simpleType> <xsd:simpleType name="currencyType"> <xsd:restriction base="xsd:decimal"> <xsd:maxLength value="9"/> </xsd:restriction> </xsd:simpleType> <xsd:simpleType name="dateType"> <xsd:restriction base="xsd:date"> <xsd:maxLength value="12"/> </xsd:restriction> </xsd:simpleType> <!-- definition of attributes --> <xsd:simpleType name="indexType"> <xsd:restriction base="xsd:string"> <xsd:maxLength value="3"/> </xsd:restriction> </xsd:simpleType> <!-- definition complex type elements --> <xsd:complexType name="SupplierDataType"> <xsd:sequence> <xsd:element name="invoiceNumber"> <xsd:simpleType> <xsd:restriction base="xsd:unsignedLong"> <xsd:maxLength value="15"/> </xsd:restriction> </xsd:simpleType> </xsd:element> <xsd:element name="abn"> <xsd:simpleType> <xsd:restriction base="xsd:unsignedLong"> <xsd:maxLength value="14"/> </xsd:restriction> </xsd:simpleType> </xsd:element> <xsd:element name="dvaVendorNumber"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:pattern value="\d{7}[A-Z]{1}"/> </xsd:restriction> </xsd:simpleType> </xsd:element> <xsd:element name="uin" type="numberType"/> <xsd:element name="totalCost" type="currencyType"/> <xsd:element name="totalGst" type="currencyType"/> <xsd:element name="totalDeliveryCost" type="currencyType"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="ItemDataType"> <xsd:sequence> <xsd:element name="rapScheduleNumber"> <xsd:simpleType> <xsd:restriction base="xsd:integer"> <xsd:maxLength value="5"/> </xsd:restriction> </xsd:simpleType> </xsd:element> <xsd:element name="catalogueNumber"> <xsd:simpleType> <xsd:restriction base="xsd:integer"> <xsd:maxLength value="20"/> </xsd:restriction> </xsd:simpleType> </xsd:element> <xsd:element name="unitCost" type="currencyType"/> <xsd:element name="gstPerUnit" type="currencyType"/> <xsd:element name="quantity"> <xsd:simpleType> <xsd:restriction base="xsd:positiveInteger"> <xsd:minExclusive value="1"/> </xsd:restriction> </xsd:simpleType> </xsd:element> </xsd:sequence> </xsd:complexType> <xsd:complexType name="PrescriberDataType"> <xsd:sequence> <xsd:element name="providerNumber" minOccurs="0"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:pattern value="\d{8}[A-Z]{1}"/> </xsd:restriction> </xsd:simpleType> </xsd:element> <xsd:element name="prescriberType"> <xsd:simpleType> <xsd:restriction base="xsd:integer"> <xsd:maxLength value="9"/> </xsd:restriction> </xsd:simpleType> </xsd:element> <xsd:element name="datePrescribed" type="dateType"/> <xsd:element name="dateOrdered" type="dateType"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="VeteranDataType"> <xsd:sequence> <xsd:element name="fileNumber"> <xsd:simpleType> <xsd:restriction base="xsd:integer"> <xsd:maxLength value="15"/> </xsd:restriction> </xsd:simpleType> </xsd:element> <xsd:element name="surname"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:maxLength value="15"/> </xsd:restriction> </xsd:simpleType> </xsd:element> <xsd:element name="initial"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:maxLength value="1"/> </xsd:restriction> </xsd:simpleType> </xsd:element> <xsd:element name="postcode"> <xsd:simpleType> <xsd:restriction base="xsd:integer"> <xsd:pattern value="\d{4}"/> </xsd:restriction> </xsd:simpleType> </xsd:element> </xsd:sequence> </xsd:complexType> <xsd:complexType name="DeliveryDataType"> <xsd:sequence> <xsd:element name="deliveryDate" type="dateType"/> <xsd:element name="deliveryNumber" type="numberType" minOccurs="0"/> <xsd:element name="deliveryCost" type="currencyType" minOccurs="0"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="PVDDataType"> <xsd:sequence> <xsd:element name="PrescriberData" type="PrescriberDataType" maxOccurs="unbounded"/> <xsd:element name="VeteranData" type="VeteranDataType" maxOccurs="unbounded"/> <xsd:element name="DeliveryData" type="DeliveryDataType" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="PVDsData"> <xsd:sequence> <xsd:element name="PVDData" type="PVDDataType" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="SupplierInvoiceType"> <xsd:sequence> <xsd:element name="SupplierData" type="SupplierDataType"/> <xsd:element name="ItemData" type="ItemDataType"/> <xsd:element name="PVDsData" type="PVDDataType"/> </xsd:sequence> <xsd:attribute name="number" type="indexType"/> <xsd:attribute name="Currency" type="xsd:NMTOKEN" fixed="A$"/> <xsd:attribute name="dateFormat" type="xsd:NMTOKEN" fixed="YYYYMMDD"/> </xsd:complexType> </xsd:schema>
Received on Friday, 21 September 2001 09:13:59 UTC