on 10-12-2006 10:02 AM
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"?>
<xsd:schema xmlns:xsd="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"?>
<xsd:schema xmlns:xsd="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)>
<BBook xmlns="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
Hi,
When ever you are refering another XSD which is imported in the IR you need to fill in the Source field.
Try this might work for you
1. When you import the BookCatalogue.xsd under external defintion you will find a field called Source there you just give the value BookCatalogue.xsd.
2. When you import the MainSchema.xsd under external defintion you will find a field called Source there you just give the value BookCatalogue.xsd since you are refering BookCatalogue.xsd inside it.
I used to do this way and it worked I remember but not sure.
Thanks,
Prakash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
take a look at this thread. It has a similar problem.
The solution is interesting,
<i>The main XSD file had a default namespace, and also an element that is referring to an element in another XSD file (Import). After changing the default namespace, to a prefix and accordingly manipulating the elements, and then importing them to external definitions the problem got fixed.</i>
Try this.
Regards,
bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I hope you have imported both the XSD's in XI and activate the same?
Regards,
bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.