W3C home > Mailing lists > Public > xmlschema-dev@w3.org > August 2004

Re: Implementing xs:include for a schema without targetNamespace

From: Mik Lernout <mik@futurestreet.org>
Date: Sun, 22 Aug 2004 12:28:02 +0200
Message-ID: <41287532.1010703@futurestreet.org>
To: xmlschema-dev@w3.org


Just to spice up the conversation: from a practical point-of-view there 
will probably only be references to the targetNamespace in the attribute 
values, but it is perfectly legal and accepted to also have references 
in the values of text nodes. These will be impossible to resolve, but, 
when not resolved, will cause inconsistent behaviour.

My 2 cents....


Jochen Wiedmann wrote:

> Hi,
> if I have an XML schema with target namespace, that includes another 
> instance of XML schema without target namespace, then the SPEC requires,
> that the included schema be converted to a schema with the target
> namespace of the including schema. My problem is, how to implement
> this in a schema processor.
> The basic approach would of course be, to load the schema, convert all 
> references to the target namespace, and be done. However, IMO this is
> not sufficient, because the schema might contain additional references.
> For example, consider a language extending XML schema by using the
> xs:appinfo elements, like JAXB (http://java.sun.com/xml/jaxb/) does:
> It is quite possible, that attributes below xs:appinfo contains other
> references, that my schema processor doesn't know about. My 
> understanding is, that these should be converted too.
> Thus, I have a different idea, which I would like to discuss: The
> schema processor is iun fact a SAX parser. As such, it receives SAX 
> events, in particular
>     public void startElement(String pURI, String pLocalName,
>                              String pQName, Attributes pAttrs);
>     public void endElement(String pURI, String pLocalName,
>                            String pQName);
>     public void startPrefixMapping(String pPrefix, String pURI);
> The idea is, to map all URI's in the above SAX events from the ""
> (the absent namespace in SAX) to the desired target namespace.
> Thoughts?
> Regards,
> Jochen
Received on Sunday, 22 August 2004 10:27:11 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:23 UTC