[Home] [By Thread] [By Date] [Recent Entries]

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

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]


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member