Given a schema was a recursive element, like this:
 
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" 
 
targetNamespace="http://localhost:8080/mytest" xmlns:tns="http://localhost:8080/mytest">
 <xs:complexType name="symbolType">
  <xs:sequence>
   <xs:element name="name" type="xs:string" />
   <xs:element name="symbol" type="tns:symbolType" minOccurs="0"
 
maxOccurs="1"/>
  </xs:sequence>
 </xs:complexType>
<xs:element name="getQuote">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="symbol" type="tns:symbolType"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>
 
What would be the best way to programmatically control the level of recursion?  I need to be able to specify "this element is recursive, but only up to 10 levels deep, and anything deeper should be considered an error."  Thank you.
 
-Ben Kolin

Reply via email to