adultinternetusers > Tutorials > Surf Clothing board shorts and Relax NG Tutorial
Index | >> Example 4 / 10 << | Prev | Next |
Contents > Wildcard patterns > Attributes from some particular namespace

Attributes from some particular namespace

  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: anyAttribute
Relax NG keys: nsName

1. Surf Clothing Schema

The root element named "root" can have an arbitrary number of attributes from some particular namespaces, let's say "http://bar" and "http://baz". The "namespace" attribute will be set to value "http://bar http://baz".

Valid document


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

Valid document


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

Invalid document
Attribute is from null namespace (that's not allowed).


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

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


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

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:anyAttribute namespace="http://bar http://baz" processContents="skip"/>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>

2. Relax NG

We will specify all attributes from namespaces "http://bar" and "http://baz" using the "nsName" element.

Valid document


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

Valid document


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

Invalid document
Attribute is from null namespace (that's not allowed).


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

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


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

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>
        <attribute>
          <choice>
            <nsName ns="http://bar"/>
            <nsName ns="http://baz"/>
          </choice>
          <text/>
        </attribute>
      </zeroOrMore>
      <text/>
    </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