W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2003

RE: Validating lax ANY content with W3C XML Schema validators

From: Dare Obasanjo <dareo@microsoft.com>
Date: Wed, 15 Jan 2003 12:16:30 -0800
Message-ID: <B885BEDCB3664E4AB1C72F1D85CB29F804B54AF7@RED-MSG-10.redmond.corp.microsoft.com>
To: "Anthony B. Coates" <abcoates@londonmarketsystems.com>, <xmlschema-dev@w3.org>

Lax validation means that validation occurs if a schema for the
declaration or type definition references is seen. It is not enough for
the element or attribute appearing in the wildcard to share the same
namespace as the target namespace of an available schema. 

So if you have a schema that defines an element myns:Foo and you see a
myns:Foo element in the wildcard content then validation occurs. However
if a myns:NotFoo is seen in content then validation doesn't occur and
the content is skipped since there is no declaration for it in the

The ideal vacation cottage is one that visits twelve but sleeps two.

This posting is provided "AS IS" with no warranties, and confers no

> -----Original Message-----
> From: Anthony B. Coates [mailto:abcoates@londonmarketsystems.com] 
> Sent: Wednesday, January 15, 2003 3:04 AM
> To: xmlschema-dev@w3.org
> This is an issue that came out of a discussion on the public 
> "newsml" list. 
> NewsML has a "DataContent" element which can contain any 
> non-NewsML content, and the "xsd:any" validation is set to 
> "lax".  Some NewsML users were unclear how to add a Schema 
> for the non-NewsML content, so I posted some examples (270K ZIP file):
> http://www.londonmarketsystems.com/newsml/newml-embedded-content.zip
> In one of my examples, "invalidContent.xml", the "xsd:any" 
> content has a Schema, and the content is intentionally 
> invalid.  As I read the W3C XML Schema spec, the "xsd:any" 
> content should be validated using the Schema, and the error 
> should be flagged.  Turbo XML & XSV both flag the error as I 
> would expect, but XML Spy doesn't.  Xerces is ruled out 
> because it ignores "xsi:noNamespaceSchemaLocation" if there 
> is also an "xsi:schemaLocation", and so it can't validate my 
> examples correctly.
> Am I right in my expectation here, that lax "xsd:any" content 
> should be able to cause real validation errors whenever a 
> Schema for that content can be found?
> 	Cheers,
> 		Tony.
> ====
> Anthony B. Coates
> London Market Systems Limited
> 33 Throgmorton Street, London, EC2N 2BR 
> http://www.londonmarketsystems.com/
> mailto:abcoates@londonmarketsystems.com
> Mobile/Cell: +44 (79) 0543 9026
> [MDDL Editor (Market Data Definition Language), 
> http://www.mddl.org/] [FpML Arch WG Member (Financial 
> Products Markup Language), http://www.fpml.org/]
> --------------------------------------------------------------
> ---------
> This Email may contain confidential information and/or 
> copyright material and is intended for the use of the addressee only.
> Any unauthorised use may be unlawful. If you receive this 
> Email by mistake please advise the sender immediately by 
> using the reply  facility in your e-mail software.
> Email is not a secure method of communication and London 
> Market Systems Limited cannot accept responsibility for the 
> accuracy or completeness of this message or any 
> attachment(s). Please examine this email for virus infection, 
> for which London Market Systems Limited accepts no 
> responsibility. If verification of this email is sought then 
> please request a hard copy. Unless otherwise stated any views 
> or opinions presented are solely those of the author and do 
> not represent those of London Market Systems Limited.
Received on Wednesday, 15 January 2003 15:17:07 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:59 UTC