My dream XML will look like as follows:
<?xml version="1.0"?>
<bk:bookList xmlns:bk="urn:B ookSampleSchema .xdr">
<book>
<title>Doe's Book</title>
<author>J Doe</author>
<year>2002</year>
</book>
<book>
<title>Sam's Book</title>
<author>Sam</author>
<year>2003</year>
</book>
</bk:bookList>
and my XDR schema is:
<Schema name="test_sche ma"
xmlns="urn:sche mas-microsoft-com:xml-data"
xmlns:dt="urn:s chemas-microsoft-com:datatypes">
<ElementType name="title" content="textOn ly" model="closed"/>
<ElementType name="author" content="textOn ly" model="closed"/>
<ElementType name="year" content="textOn ly" model="closed"/>
<ElementType name="book" content="eltOnl y" model="closed">
<element type="title" minOccurs="1" maxOccurs="1"/>
<element type="author" minOccurs="1" maxOccurs="1"/>
<element type="year" minOccurs="1" maxOccurs="1"/>
</ElementType>
<ElementType name="bookList" content="eltOnl y" model="closed">
<element type="book" minOccurs="0" maxOccurs="*"/>
</ElementType>
</Schema>
I am using XMLValidatingRe ader to validate above xml. It fails if I
don't mention bk before book, title etc. elements.
Can anyone tell me what is the valid XDR for above XML?
Thanks in advance.
Pratibha
<?xml version="1.0"?>
<bk:bookList xmlns:bk="urn:B ookSampleSchema .xdr">
<book>
<title>Doe's Book</title>
<author>J Doe</author>
<year>2002</year>
</book>
<book>
<title>Sam's Book</title>
<author>Sam</author>
<year>2003</year>
</book>
</bk:bookList>
and my XDR schema is:
<Schema name="test_sche ma"
xmlns="urn:sche mas-microsoft-com:xml-data"
xmlns:dt="urn:s chemas-microsoft-com:datatypes">
<ElementType name="title" content="textOn ly" model="closed"/>
<ElementType name="author" content="textOn ly" model="closed"/>
<ElementType name="year" content="textOn ly" model="closed"/>
<ElementType name="book" content="eltOnl y" model="closed">
<element type="title" minOccurs="1" maxOccurs="1"/>
<element type="author" minOccurs="1" maxOccurs="1"/>
<element type="year" minOccurs="1" maxOccurs="1"/>
</ElementType>
<ElementType name="bookList" content="eltOnl y" model="closed">
<element type="book" minOccurs="0" maxOccurs="*"/>
</ElementType>
</Schema>
I am using XMLValidatingRe ader to validate above xml. It fails if I
don't mention bk before book, title etc. elements.
Can anyone tell me what is the valid XDR for above XML?
Thanks in advance.
Pratibha
Comment