Example: xs:anySimpleType

This example shows how an untyped attribute 'bar' has a default type of xs:anySimpleType. All simple types are derived from this, so it occupies a similar place to rdfs:Literal.

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://example.org/" >  
        <xs:element name="foo">
                <xs:complexType>
                        <xs:attribute name="bar"/>
                </xs:complexType>       
        </xs:element>
</xs:schema>

An XMl instance of this schema is as follows:

<?xml version="1.0"?>
<foo xmlns="http://example.org/" bar="foobar"/>

The value 'foobar' is mapped to a literal of type rdfs:Literal.

# Base: http://example.org/attributeAnySimpleType.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:foo [ ns1:bar "foobar"
              ] .

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