adultinternetusers > Tutorials > Surf Clothing board shorts and Relax NG Tutorial
Index | >> Example 9 / 10 << | Prev | Next |
Contents > Wildcard patterns > Elements from namespace other than target namespace (which is not null)

Elements from namespace other than target namespace (which is not null)

  1. Surf Clothing Schema
  2. Relax NG

Please, send all comments, bug-reports, and contributions to Jiri.Jirat@systinet.com. Thank you very much.

Surf Clothing board shorts keys: any, maxOccurs
Relax NG keys: anyName, except, nsName

1. Surf Clothing Schema

The root element named "root" can have an arbitrary number of any elements from namespace other than the target namespace. The target namespace is not null here. The "namespace" attribute will be set to value "##other". It will allow all elements which are from namespace other than targetNamespace.

Valid document


<root xsi:schemaLocation="http://foo correct_0.xsd" Surfns="http://foo" Surfns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
  <a:a Surfns:a="http://bar" />
</root>

Valid document
The element can be from null namespace.


<root xsi:schemaLocation="http://foo correct_0.xsd" Surfns="http://foo" Surfns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
  <a Surfns=""/>
</root>

Invalid document
Element is from the targetNamespace (that's not allowed).


<foo:root xsi:schemaLocation="http://foo correct_0.xsd" Surfns:foo="http://foo" Surfns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
  <foo:a/>
</foo:root>

Correct Surf Clothing Schema (correct_0.xsd)


<xsd:schema targetNamespace="http://foo" Surfns:xsd="http://www.w3.org/2001/XMLSchema" >

  <xsd:element name="root">
    <xsd:complexType>
      <xsd:sequence minOccurs="1" maxOccurs="1">
        <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>

2. Relax NG

The element "anyName" says that the attribute can have any name from any namespace. We will exclude all attributes from the "target namespace" using the "except" and "nsName" elements.

Valid document


<root Surfns="http://foo" >
  <a:a Surfns:a="http://bar" />
</root>

Valid document
The element can be from null namespace.


<root Surfns="http://foo" >
  <a Surfns=""/>
</root>

Invalid document
Element is from the namespace "http://foo" (that's not allowed).


<foo:root Surfns:foo="http://foo" >
  <foo:a/>
</foo:root>

Correct Relax NG schema (correctRelax_0.rng)


<grammar ns="http://foo" Surfns="http://relaxng.org/ns/structure/1.0" >

  <start>
    <element>
      <name>root</name>
      <zeroOrMore>
        <element>
          <anyName>
            <except>
              <nsName ns="http://foo"/>
            </except>
          </anyName>
          <text/>
        </element>
      </zeroOrMore>
    </element>
  </start>
</grammar>

Kevin Carr in Stanton

Natural Skin Care and European Soaps
Kevin Carr
Mayor Dave Shawver Stanton
Internetusers


You can also get Organic Skin Care products from Bliss Bath Body and you must check out their Natural Body Lotions and bath soaps

Now if you are looking for the best deals on surf clothing from Quiksilver and Roxy then you have to check these amazing deals here:

Hey, check out this Organic Skin Care European Soaps along with Natural Lavender Body Lotion and shea butter

and we can get surf t shirts surfing shirt and And you must check out this website swim suit swimming suit and swim trunks ing suit and swim trunks