[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XML:lang, clarification demanded


kris vanhoutte
From: "Kris Vanhoutte" <kris.vanhoutte@c...>

> I think it IS a specific XML:lang-problem.  I created a Xschema with only the following namespace in it:
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
        elementFormDefault="qualified" attributeFormDefault="qualified">
> I pulled out the networkcable, tried to validate and received the message "the xml-document is valid 
> against the Xschema".
 
XML Schema has an unsettling property (for a spec that places so much emphasis on uniform results
of validation) that it is entirely up to the schema processor where it sources *any* schema from.

E.g. A schema processor can look up its own list of schemas in preference to the schemaLocation "hint".
Or it could try the schemaLocation first, then use the built-in schema. Or it could ignore the schemaLocation
hints altogether.  All that is allowed, and application dependent.   So one schema processor might work
if there is an unreachable include by providing some fallback, another might fail.

If there is an unreachable component and the instance being validated has no occurrences of that namespace,
then I think there is no error invovled. If there is an information item found for a namespace whose
component is missing, then that will be noted: see http://www.w3.org/TR/xmlschema-1/#conformance-missing
So if your instance document does not use any xml: attributes, and the schema does not have that import
statement, there certainly should be no validity error.

I don't see anything in the XML Schemas spec that says a schema processor must have any built-in knowledge
of the XML namespace at the component level (obviously it does at the XML surface). So I expect it is
correct that if your schema allows xml: attributes and is a closed schema (not allowing undeclared foreign
attributes) it will generally have to provide an explicit declaration. 

Cheers
Rick Jelliffe

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.