Skip to Content
0
Oct 12, 2006 at 09:02 AM

QUERY IN XSD WHILE IMPORTING INTO IR

23 Views

Dear Collegues,

I am trying to import extensible xsd into IR.After importing i am having a issue.

<u><b>BookCatalogue.xsd (first xsd)</b></u>

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

http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">

<!--> <xsd:element name="Book" type="CardCatalogueEntry"/> -->

<xsd:element name="Book">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="Title" type="xsd:string"/>

<xsd:element name="Author" type="xsd:string"/>

<xsd:element name="Date" type="xsd:string"/>

<xsd:element name="ISBN" type="xsd:string"/>

<xsd:element name="Publisher" type="xsd:string" />

</xsd:sequence>

</xsd:complexType>

</xsd:element>

</xsd:schema>

<u><b>MainSchema.xsd</b></u>

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

http://www.w3.org/2001/XMLSchema" targetNamespace=" http://www.library.org" xmlns=" http://www.library.org" elementFormDefault="qualified">

<xsd:include schemaLocation="BookCatalogue.xsd"/>

<xsd:element name="BBook" type="Library12"/>

<xsd:complexType name="Library12">

<xsd:sequence>

<xsd:element name="BookID" type="xsd:string"/>

<xsd:element name="Domain" type="xsd:string"/>

<xsd:element name="BookCatalogue">

<xsd:complexType>

<xsd:sequence>

<b> <xsd:element ref="Book" minOccurs="0" maxOccurs="unbounded"/></b> </xsd:sequence>

</xsd:complexType>

</xsd:element>

</xsd:sequence>

</xsd:complexType>

</xsd:schema>

In XMLSPY when i generate xml ,i could see

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

<! Sample XML file generated by XMLSpy v2006 sp2 U ( http://www.altova.com) >

http://www.library.org" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://www.library.org

C:\DOCUME~1\cshekar\Desktop\XSLTMAPPING\Bookcatalogue\MainSchema2.xsd">

<BookID>String</BookID>

<Domain>String</Domain>

<BookCatalogue>

<b><Book>

<Title>String</Title>

<Author>String</Author>

<Date>String</Date>

<ISBN>String</ISBN>

<Publisher>String</Publisher>

</Book>

<Book>

<Title>String</Title>

<Author>String</Author>

<Date>String</Date>

<ISBN>String</ISBN>

<Publisher>String</Publisher>

</Book></b> </BookCatalogue>

</BBook>

when i import the main schema.xsd.

while maping i could see

only

<<b>BookID>String</BookID>

<Domain>String</Domain>

<BookCatalogue>

<b><Book></b> the elements under Book are not appearing.

Any pointers to this.

Regards

chandra