Re: Multiple includes/imports that are circular

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 UTC