W3C home > Mailing lists > Public > xmlschema-dev@w3.org > November 2008

Recursive XSD with targetNamespace

From: Todd Moon <tmrfcm@gmail.com>
Date: Fri, 14 Nov 2008 15:23:43 -0500
Message-ID: <2dc6e4c80811141223j72b42771qdf9e6a21c747570a@mail.gmail.com>
To: xmlschema-dev@w3.org
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:complexType name="Item">
           <xsd:element name="SerialNumber" />
               <xsd:element name="Item" type="Item" />


If I remove the targetNamespace attribute this works fine. Why is this
causing a problem?


- Todd Moon
Received on Friday, 14 November 2008 20:24:26 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:15 UTC