XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Help - any/anyAttribute - notNamespace, notQName

They are slightly incorrect, in that the assert element is in the wrong 
place, and "{uri}abc" is a string rather than a QName, but your basic 
argument is perfectly correct - these constructs (and a great deal else 
in XSD) are technically redundant because the rules can be expressed 
using assertions.

I think the mindset of using assertions very widely in a schema hasn't 
yet been absorbed. They were introduced as a "last resort" for 
expressing constraints that can't be expressed any other way; they are 
going to be used much more as a "first resort", in my view.

Michael Kay
Saxonica

On 16/12/2010 22:52, Ramkumar Menon wrote:
> Gurus,
> I have a question.
> Are the following three definitions valid?
> 1.
> <any>
> <assert test="not(namespace-uri() = 'http://www.example.org'"/>
> </any>
> 2.
> <anyAttribute>
> <assert test="not(namespace-uri() = 'http://www.example.org'"/>
> </anyAttribute>
>  3.
> <any>
> <assert test="not(node-name()= '{http://www.example.org}value-of)'"/>
> </any>
> If they are valid, can someone help explain why we need the 
> notNamespace, notQName attributes explicitly?
> If the above definitions are *not* valid  - why?
> Ram
>
>
> -- 
> Shift to the left, shift to the right!
> Pop up, push down, byte, byte, byte!
>
> -Ramkumar Menon
>  A typical Macroprocessor



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS