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

Ways to express "what I don't want"

  • From: "Costello, Roger L." <costello@mitre.org>
  • To: "xml-dev@lists.xml.org" <xml-dev@lists.xml.org>
  • Date: Mon, 16 May 2011 09:23:00 -0400

Ways to express "what I don't want"
Hi Folks,

This XML Schema:

     <any namespace="http://www.digital-camera.com"/>  

means  "I want elements from the http://www.digital-camera.com namespace"

It expresses what I want; specifically, I want extension elements to come from the http://www.digital-camera.com namespace.


Conversely, this XML Schema: 

     <any notNamespace="http://www.film-camera.com"/>  

means "I don't want elements from the http://www.film-camera.com namespace"

It expresses what I don't want; specifically, I don't want extension elements to come from http://www.film-camera.com namespace.


I am documenting the various ways that the XML technologies can express "what I don't want". The notNamespace attribute is one way. Below I have listed the ways. Have I missed any?  /Roger


-----------------------------------------
XML
-----------------------------------------

I can't think of any. Can you?


-----------------------------------------
XML Schema
-----------------------------------------

1. The notNamespace attribute of the <any> and <anyAttribute> elements

2. The notQName attribute of the <any> and <anyAttribute> elements

3. All the things listed in the Regular Expressions section below

4. All the things listed in the XPath section below


-----------------------------------------
XSLT
-----------------------------------------

1. All the things listed in the Regular Expressions section below

2. All the things listed in the XPath section below


-----------------------------------------
XPath
-----------------------------------------

1. Selecting a set of nodes as long as the node is not XYX, e.g., ./*[not(self::XYZ)] means "I don't want the XYZ child nodes"

2. Selecting a set of nodes as long as the node does not have the value ABC, e.g., ./*[. ne ABC] means "I don't want the child nodes with value ABC"

3. All the things listed in the Regular Expressions section below


-----------------------------------------
Schematron
-----------------------------------------

1. All the things listed in the Regular Expressions section below

2. All the things listed in the XPath section above


-----------------------------------------
Regular Expressions
-----------------------------------------

1. The ^ negation character, e.g., [^0-9]* means "I don't want the digits 0-9"

2. The \P{...} complement category, e.g., \P{Sc} means "I don't want a currency symbol"

3. The \S symbol means "I don't want a whitespace character"

4. The \I symbol means "I don't want an initial name character"

5. The \W symbol means "I don't want a word character"

6. The \D symbol means "I don't want a digit"

7. The \C symbol means "I don't want a name character"


[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.