![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - SV: SV: SV: strict validation of any ##other namespace [Thread Next] Re: SV: SV: SV: strict validation of any ##other namespaceTo: Bryan Rasmussen <brs@----.--> Date: 10/10/2005 12:23:00 PM Hi, On Mon, 2005-10-10 at 10:01 +0200, Bryan Rasmussen wrote: > > > Hi > > >> 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. > > >I assume you are referring to your example here, where we have a strict > >element-wildcard, which hits an element information item in a namespace > >not currently imported. > > > No, I was thinking that there would be a schema > > > <?xml version="1.0" encoding="UTF-8"?> > <schema > xmlns="http://www.w3.org/2001/XMLSchema" > elementFormDefault="qualified" attributeFormDefault="unqualified"> > <import namespace="http://test.com" schemaLocation="schema1.xsd"/> > <import namespace="http://test.org" schemaLocation="schema2.xsd"/> > > </schema> > > and there would not be anything in the empty namespace. > > Would libxml2 support this? I've found that .Net and XSV support it, but > msxml does not, and as I understand it XMLSPY won't either. Yes, this will work with Libxml2. That's the combining schema, which imports all other needed schemata, I mentioned earlier. But just to be sure we talk about the same: if you want to validate with Libxml2 you need to precompile this schema first and then start validation; this schema has to be a schema document, or a node-tree, and then it will be compiled into schema components, since Libxml2 has currently no API to create schema components programatically. Regards, Kasimier From K.Buchcik@4... Mon Oct 10 08:53:44 2005 Received: from maggie.w3.org ([193.51 | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
