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

Re: Help - any/anyAttribute - notNamespace, notQName

  • From: Michael Kay <mike@saxonica.com>
  • To: xml-dev@lists.xml.org
  • Date: Fri, 17 Dec 2010 13:38:42 +0000

Re:  Help - any/anyAttribute - notNamespace
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]


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.