W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > April to June 2001

Re: Multiple includes/imports that are circular

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 20 Jun 2001 14:57:20 +0100
To: Yadira Taylor <ytaylor@Qcorps.com>
Cc: www-xml-schema-comments@w3.org
Message-ID: <f5bk8278da7.fsf@cogsci.ed.ac.uk>
Yadira Taylor <ytaylor@Qcorps.com> writes:

> I have a situation in which I need to have a circular include/import.
> When I run my schema through a validator, I get
> an infinite loop. Please advise.
> 
> Example:
> 
> output.xsd
> targetNamespace = "http://OUTPUT"
> xmlns:ERROR_HANDLER = "http://ERROR_HANDLER"
> import namespace = http://ERROR_HANDLER schemaLocation =
> "errorHandler.xsd"
> 
> errorHandler.xsd
> targetNamespace = "http://ERROR_HANDLER"
> xmlns:OUTPUT = "http://OUTPUT"
> import namespace = "http://OUTPUT" schemaLocation = "output.xsd"
> 
> components.xd
> xmlns:OUTPUT = "http://OUTPUT"
> xmlns:ERROR_HANDLER = "http://ERROR_HANDLER"
> import namespace = "http://ERROR_HANDLER" schemaLocation =
> "errorHandler.xsd"
> import namespace = "http://OUTPUT" schemaLocation = "output.xsd"
> 
> 
> They are separated like that because other schemas I have us either
> output.xsd or errorHandler.xsd exclusively.
> Is there a way to conditionally include/import a schema if not included
> before?

Processors are expected to handle this case -- it's not the schema
document author's job to worry about this.  At least one processor
(XSV) will not loop on that configuration.

ht
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2001, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/
Received on Wednesday, 20 June 2001 09:57:20 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:12:50 GMT