Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


schemaLocation declaration after namespace usage

From: Tobias Koenig <tobias.koenig@---------.--->
To: xmlschema-dev@--.---
Date: 1/21/2009 3:51:00 PM
Hej,

http://www.w3.org/TR/xmlschema-1/#schema-loc 4) says that no schemaLocation declaration
is allowed to appear, after the namespace has been used for a validation of an element or attribute.

The two instance documents addB162 and addB163 from the schema test suite are defined
as the following:
---------------------------------
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	  xsi:noNamespaceSchemaLocation="test93490_5.xsd" 	
	  xmlns:foo="foo"
	  xmlns:bar="bar">

	<foo:elem1 xsi:schemaLocation="foo test93490_1.xsd" />
	<bar:elem2 xsi:schemaLocation="bar test93490_3.xsd" />
	<elem2 xsi:schemaLocation="bar test93490_4.xsd" />
</root>
--------------------------------
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	  xsi:noNamespaceSchemaLocation="test93490_5.xsd" 	
	  xmlns:foo="foo"
	  xmlns:bar="bar">

	<foo:elem1 xsi:schemaLocation="foo test93490_1.xsd" />
	<bar:elem2 xsi:schemaLocation="bar test93490_3.xsd" />
	<elem2>
		<a>
			<b>
				<c xsi:schemaLocation="foo test93490_1.xsd" />
			</b>
		</a>
	</elem2>
</root>
--------------------------------
While the first document is invalid according to the test result and saxon validator, the
second is valid. However they seem to be quite similar to me. In both cases the a
schemaLocation declaration exists after it has been used previously. In the first case
'bar' is reused and in the second 'foo'. The only difference I see is, that the first uses
different locations (test93490_3.xsd vs. test93490_4.xsd) while the second uses the
same (test93490_1.xsd). But is the location used as part of the namespace here?!?

Ciao,
Tobias

From paul@x... Thu Feb 05 15:09:53 2009
Received: from maggie.w3.org ([193.


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