Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - >Thread Next - RE: Recursive XSD with targetNamespace Recursive XSD with targetNamespaceTo: xmlschema-dev@--.--- Date: 11/14/2008 8:26:00 PM Hello everyone.
I have a recursively defined type called "Item" and the schema works fine at
first. However, if I specify a targetNamespace in the XSD, Visual Studio
gives me an error claiming that "Item" is not defined (when it's used within
the definition of Item itself.)
Here's a greatly simplified schema that still exposes the problem:
<?xml version="1.0" encoding="utf-8" ?>
<xsd:schema
targetNamespace="http://foo"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="Item">
<xsd:sequence>
<xsd:element name="SerialNumber" />
<xsd:sequence>
<xsd:element name="Item" type="Item" />
</xsd:sequence>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
If I remove the targetNamespace attribute this works fine. Why is this
causing a problem?
Thanks!
- Todd Moon
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
