Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: Referencing declarations from including schema in chameleon inclusion

From: "Michael Kay" <mike@--------.--->
To: "'Boris Kolpackov'" <boris@-------------.--->, <xmlschema-dev@--.--->
Date: 5/15/2008 1:30:00 PM
Yes, I think this is valid. Certainly, Saxon accepts it.

>I couldn't locate the relevant part in the spec (4.2.1 appears to be
covering this case).

The rules certainly aren't wonderfully clear, especially the bit that says
the included document must "correspond to a valid schema". This has to be
read in conjunction with the rule that says that a dangling reference
doesn't make a schema invalid, and such references can be fixed up later
during the schema composition process.

Michael Kay
http://www.saxonica.com/

> -----Original Message-----
> From: xmlschema-dev-request@w... 
> [mailto:xmlschema-dev-request@w...] On Behalf Of Boris Kolpackov
> Sent: 15 May 2008 11:50
> To: xmlschema-dev@w...
> Subject: Referencing declarations from including schema in 
> chameleon inclusion
> 
> 
> Hi,
> 
> Consider the following two schema files:
> 
> <!-- includee.xsd -->
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>   <xsd:element name="el" type="type"/>
> </xsd:schema>
> 
> <!-- includer.xsd -->
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>             xmlns="test" targetNamespace="test">
>   <xsd:include schemaLocation="includee.xsd"/>
> 
>   <xsd:simpleType name="type">
>     <xsd:restriction base="xsd:string"/>
>   </xsd:simpleType>
> </xsd:schema>
> 
> Here includer.xsd chameleon-includes includee.xsd which in 
> turn references a type from the including schema. It seems 
> that this should be legal however I couldn't locate the 
> relevant part in the spec (4.2.1 appears to be covering this case).
> 
> I am wondering of an implementation that conceptually 
> transforms includee.xsd (for the purpose of being included in 
> includer.xsd) into the following schema would do the right thing:
> 
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>             targetNamespace="test"
>             xmlns="test">
>   <xsd:element name="el" type="type"/>
> </xsd:schema>
> 
> 
> Thanks,
> Boris
> 
> -- 
> Boris Kolpackov, Code Synthesis Tools   
> http://codesynthesis.com/~boris/blog
> Open source XML data binding for C++:   
> http://codesynthesis.com/products/xsd
> Mobile/embedded validating XML parsing: 
> http://codesynthesis.com/products/xsde
> 




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent