W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2005

SV: strict validation of any ##other namespace

From: Bryan Rasmussen <brs@itst.dk>
Date: Fri, 7 Oct 2005 14:53:21 +0200
Message-ID: <D45A5694803BE943BA46F9A7262BF83D123A80@its42.itst.local>
To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>




The question then is what LibXML2's response is if the instance document
does not have a namespace matching the schema targetNamespace. One could
create a schema, programmatically, with a targetNamespace not in the
instance document and import the other namespaces in. 

If Libxml2 does lax validation until the point of encountering a known
namespace, as some processors do (XSV iirc, XMLSPY sometimes but not every
time), then this would be a technique for Libxml2.

Cheers
Bryan Rasmussen

-----Oprindelig meddelelse-----
Fra: Kasimier Buchcik [mailto:K.Buchcik@4commerce.de]
Sendt: 7. oktober 2005 14:44
Til: Bryan Rasmussen
Cc: ML-xml-schema-dev
Emne: Re: SV: strict validation of any ##other namespace



Hi,

On Fri, 2005-10-07 at 14:14 +0200, Bryan Rasmussen wrote:
> >Do you already know that you could set the
> >xsi:schemaLocation="http://test.com test2.xsd" attribute
> >on the <b2:a2> element and set the
> >xsi:schemaLocation="http://test.org test1.xsd" attribute
> >on the document element in your instance?
> 
> yes. I don't want to use xsi-acquisition to do the validation. As noted in
> the earlier email, I can validate it as in the example. I want to validate
> without using any xsi-acquisition. I can do so with the processors/API's I
> am familiar with. Is there any processor/API which the only way to handle
> this problem is via xsi-acquisition?
> 
> 
> >I'm not familiar with other schema APIs than the one of Libxml2, but I'm
> >pretty sure that validation _without_ the use of xsi-driven schema
> >acquisition can be seen as a basic requirement for schema processors;
> Yes, and in my experience it is present in all processors for libraries of
> schemas, i.e. schemas that are not connected together via includes/imports
> but can be built up as a set, i.e. the same model as xsi-acquisition but

Ah, now I see your point; so squeezing multiple standalone schemata
programatically into the validation process.

> done programmatically. I am wondering if anybody knows of processors where
> it cannot be done programmatically. 

Yes: Libxml2 :-)

With Libxml2 you currently need to create a combining schema which
imports both of your schemata. I.e. you can feed Libxml2 only with
one initial schema. If you need this and are using Libxml2,
I recommend opening a enhancement request at
http://bugzilla.gnome.org/buglist.cgi?product=libxml2.
I guess it could be done for really standalone schemata in Libxml2;
this means that they all need be complete, without any dangling
references.

Regards,

Kasimier
Received on Friday, 7 October 2005 13:00:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:51 GMT