[xml] XML doc validation against multiple XSD's



Hi All,

            Sorry for the incomplete question.

           

            I am using libxml 2.2-6 version.

 

            I also want to know how to validate xml against multiple XSD’s (one XSD has the reference of other XSD’s).

            Following is the sample XSD which contains reference to other XSD’s:

           

<?xml version="1.0" encoding="UTF-8"?>

            <xs:schema xmlns:ts="urn:ietf:params:xml:ns:pidf:timed-status"

            xmlns:pidf="urn:ietf:params:xml:ns:pidf"

            xmlns:xs="http://www.w3.org/2001/XMLSchema"

            targetNamespace="urn:ietf:params:xml:ns:pidf:timed-status"

            elementFormDefault="qualified" attributeFormDefault="unqualified">

<xs:import namespace="urn:ietf:params:xml:ns:pidf"/>

            <xs:annotation>

            <xs:documentation>

            Describes timed-status tuple extensions for PIDF.

            </xs:documentation>

            </xs:annotation>

            <xs:element name="timed-status" type="ts:timed-status"/>

            <xs:complexType name="timed-status">

            <xs:sequence>

             <xs:element name="basic" type="pidf:basic" minOccurs="0"/>

             <xs:element name="note" type="pidf:note" minOccurs="0"/>

             <xs:any namespace="##other" processContents="lax" minOccurs="0"

             maxOccurs="unbounded"/>

            </xs:sequence>

            <xs:attribute name="from" type="xs:dateTime" use="required"/>

            <xs:attribute name="until" type="xs:dateTime"/>

            </xs:complexType>

            </xs:schema>

 

 

            Thanks in Advance for your help.

 

Thanks & Regards,

Sai Reddy


From: Sai Thatikonda, TLS-Chennai
Sent: Monday, April 02, 2007 1:47 PM
To: 'xml gnome org'
Subject: XML doc validation against multiple XSD's

 

Hi All,

           

            I am getting the following errors while validating the xml against the XSD

                        “Unable to lookup type ID:http://www.w3.org/2001/XMLSchema”

            and  XSD is as follows

                        <?xml version="1.0" encoding="UTF-8"?>

                          <xs:schema targetNamespace="urn:ietf:params:xml:ns:pidf"

                                    xmlns:tns="urn:ietf:params:xml:ns:pidf"

                                     xmlns:xs="http://www.w3.org/2001/XMLSchema"

                                     elementFormDefault="qualified"

                                    attributeFormDefault="unqualified">

 

                        <!-- This import brings in the XML language attribute xml:lang-->

                        <xs:import namespace="http://www.w3.org/XML/1998/namespace"

                         schemaLocation="http://www.w3.org/2001/xml.xsd"/>                 

                        ----------------------------

                        --------------------------------

                       

Thanks & Regards,

Sai Reddy

DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender immediately. Before opening any mail and
attachments please check them for viruses and defect.

-----------------------------------------------------------------------------------------------------------------------


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]