rdf:_n                                                       

Definition

To describe a resource as being one of these types of containers, the resource is given an rdf:type property whose value is one of the predefined resources rdf:Bag, rdf:Seq, or rdf:Alt (whichever is appropriate).

The container resource (which may either be a blank node or a resource with a URIref) denotes the group as a whole. The members of the container can be described by defining a container membership property for each member with the container resource as its subject and the member as its object.

These container membership properties have names of the form rdf:_n, where n is a decimal integer greater than zero, with no leading zeros, e.g., rdf:_1, rdf:_2, rdf:_3, and so on, and are used specifically for describing the members of containers.

Example listing

Triple

<http://example.org/favourite-fruit>   <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>   <http://www.w3.org/1999/02/22-rdf-syntax-ns#Seq> .

<http://example.org/favourite-fruit>   <http://www.w3.org/1999/02/22-rdf-syntax-ns#_1>       <http://example.org/banana> .

<http://example.org/favourite-fruit>   <http://www.w3.org/1999/02/22-rdf-syntax-ns#_2>       <http://example.org/apple> .

<http://example.org/favourite-fruit>   <http://www.w3.org/1999/02/22-rdf-syntax-ns#_3>       <http://example.org/pear> . 

RDF/XML

    <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">

        <rdf:Seq rdf:about="http://example.org/favourite-fruit">

            <rdf:li rdf:resource="http://example.org/banana"/>

            <rdf:li rdf:resource="http://example.org/apple"/>

            <rdf:li rdf:resource="http://example.org/pear"/>

        </rdf:Seq>

    </rdf:RDF>

This example shows that RDF/XML provides rdf:li as a convenience element to avoid having to explicitly number each membership property. The numbered properties rdf:_1, rdf:_2, and so on are generated from the rdf:li elements in forming the corresponding graph:

    <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">

        <rdf:Seq rdf:about="http://example.org/favourite-fruit">

            <rdf:_1 rdf:resource="http://example.org/banana"/>

            <rdf:_2 rdf:resource="http://example.org/apple"/>

            <rdf:_3 rdf:resource="http://example.org/pear"/>

        </rdf:Seq>

    </rdf:RDF>

Other information

Container resources may also have other properties that describe the container, in addition to the container membership properties and the rdf:type property.

Use in ISO 15926