OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Can XML namespaces get into a recursive loop?

[ Lists Home | Date Index | Thread Index ]

Hi all,
I am new to this discussion site. I have a question
about using namespaces to mutually define XML
Take this example
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
<xs:element name="author" type="authorType"/>
    <xs:complexType name="authorType">
	<xs:element ref="bc:book"/>
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
<xs:element name="book" type="bookType"/>

    <xs:complexType name="bookType">
	<xs:element ref="ac:author"/>

As you can clearly see that each of these xml schemas
use the other for their definition. I have tried using
microsofts parser(WINXP) and it was only good at
finding out well formedness. Then i downloaded Sun
Multi-Schema XML Validator, It performed more
predictably, but always pointed the fault at my xml
file, expecting the deeper tag in the recursion. 
My question is: Is this a potential flaw in the XSD
spec? As there will always be a possibility that a
validator/XML engine will get into an infinite loop
with this?
Can you tell me how validators handle such an event?
Also please note that there can be no xml instances
that fulfill such schemas !! -- (As they need to be
infinitely recursively deep)
I look forward to your expert comments !!

Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS