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

strict validation of any ##other namespace

From: Bryan Rasmussen <brs@itst.dk>
Date: Fri, 7 Oct 2005 12:28:42 +0200
Message-ID: <D45A5694803BE943BA46F9A7262BF83D123A79@its42.itst.local>
To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>

If I have a schema 1:

<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="http://test.org" xmlns:b="http://test.org"
 elementFormDefault="qualified" attributeFormDefault="unqualified">
	<element name="a" type="b:aType">

	<complexType name="aType">
	           <any namespace="##other" minOccurs="1" maxOccurs="1"/>

and schema 2:

<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="http://test.com" xmlns:b2="http://test.com"
 elementFormDefault="qualified" attributeFormDefault="unqualified">
	<element name="a2" type="string">


and an instance 

<?xml version="1.0" encoding="utf-8"?>
<b:a xmlns:b="http://test.org" xmlns:b2="http://test.com"
xsi:schemaLocation="http://test.com test2.xsd"

it is valid if I specify the schema for http://test.org programmatically (in
the validators I've tested so far). however I would like to remove
xsi:schemaLocation and instead specify it all programmatically. I can do
this in MSXML and .Net without a problem. I assume that the major Java
libraries and probably projects like libxml provide the same functionality -
am I correct in this assumption? Is there any wide-spread API that would not
allow me to build up a set of schemas for validating the instance so that my
processContents="strict" will validate without use of xsi:schemaLocation. 
Received on Friday, 7 October 2005 10:36:32 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:08 UTC