rdf:XMLLiteral                                       

Definition

The class rdf:XMLLiteral is the class of XML literal values (copied below).

rdf:XMLLiteral is an instance of rdfs:Datatype and a subclass of rdfs:Literal.

EXAMPLE:    

Schema

    <rdfs:Datatype rdf:about="http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral">

        <rdfs:subClassOf rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>

        <rdfs:isDefinedBy rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/>

        <rdfs:label>XMLLiteral</rdfs:label>

        <rdfs:comment>The class of XML literal values.</rdfs:comment>

    </rdfs:Datatype>

Example listing

Triple

 

RDF/XML

    <rdf:Description rdf:about="http://example.org/item01">

        <ex:prop rdf:parseType="Literal" xmlns:a="http://example.org/a#">

            <a:Box required="true">

                <a:widget size="10" />

                <a:grommit id="23" />

            </a:Box>

        </ex:prop>

    </rdf:Description>

 

The green part is an XML Literal.

Other information

RDF provides for XML content as a possible literal value. This typically originates from the use of rdf:parseType="Literal" in the RDF/XML Syntax [RDF-SYNTAX].

Such content is indicated in an RDF graph using a typed literal whose datatype is a special built-in datatype rdf:XMLLiteral, defined as follows.

A URI reference for identifying this datatype
is http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral.
The lexical space
is the set of all strings:
The value space
is a set of entities, called XML values, which is:
The lexical-to-value mapping
is a one-one mapping from the lexical space onto the value space, i.e. it is both injective and surjective.

Note: Not all values of this datatype are compliant with XML 1.1 [XML 1.1]. If compliance with XML 1.1 is desired, then only those values that are fully normalized according to XML 1.1 should be used.

Note: XML values can be thought of as the [XML-INFOSET] or the [XPATH] nodeset corresponding to the lexical form, with an appropriate equality function.

Note: RDF applications may use additional equivalence relations, such as that which relates an xsd:string with an rdf:XMLLiteral corresponding to a single text node of the same string.

Use in ISO 15926