Element Identity

This example includes an element 'foobar' with xs:ID content. This identifies the immediately containing element , 'foobar' itself.

<?xml version="1.0" encoding="UTF-8"?>
<identity xmlns="http://example.org/">
        <foo>foobar</foo>
        <bar>foobar</bar>
</identity>
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
        targetNamespace="http://example.org/" elementFormDefault="qualified">
        
        <xs:element name="identity">
                <xs:complexType>
                        <xs:sequence>
                                <xs:element name="foo" type="xs:ID" />
                                <xs:element name="bar" type="xs:IDREF" />
                        </xs:sequence>
                </xs:complexType>
        </xs:element>

</xs:schema>
# Base: http://example.org/elementIdentity1.xml
@prefix ns1:     <http://example.org/def/> .
@prefix xs:      <http://www.w3.org/2001/XMLSchema> .
@prefix ns2:     <http://example.org/> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xs_:     <http://www.w3.org/2001/XMLSchema#> .
@prefix :        <#> .

<>    ns2:identity
              [ ns2:bar :foobar ;
                ns2:foo :foobar
              ] .

Generated on Mon Jun 18 16:02:38 2007 for Gloze by  doxygen 1.5.0