Examples of RDF/XML serialization

This document show serializations of the RDF models presented here.

Please note that some of the namespaces are changed. In original examples short strings were used for illustration. This document uses real namespaces where the corresponding schemas can be retrieved. You may want to have a look at some of them by following the links.

In the examples below, the abbreviated serialization syntax is used.

You can browse through all currently defined schemas here.
 

Bare-bones search request

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:DL="http://www-diglib.stanford.edu/diglib/ginf/Search/Core#">

<DL:Search query="color AND printers"/>

</rdf:RDF>

More specific request

Obsolete version:

<rdf:RDF xmlns:rdf="http://www.w3.org/RDF/TR/WD-rdf-syntax#"
    xmlns:DL="http://www-diglib.stanford.edu/diglib/ginf/Search/Core#">

<DL:Search
     query="color AND printers"
     numDocs="10">
    <DL:queryLang rdf:resource="http://nis.org/bool"/>
    <DL:subcols rdf:resource="http://elib.stanford.edu/CS-TR"/>
</DL:Search>

</rdf:RDF>

Current version:

(TODO: integrate queryLang)

<rdf:RDF xmlns:rdf="http://www.w3.org/RDF/TR/WD-rdf-syntax#"
    xmlns:DL="http://www-diglib.stanford.edu/diglib/ginf/Search/Core#">

<DL:Search
     queryString="color AND printers"
     limit="10">
    <DL:scope rdf:resource="http://elib.stanford.edu/CS-TR"/>
</DL:Search>

</rdf:RDF>
 

Adding state maintainance support

Obsolete version:

<rdf:RDF xmlns:rdf="http://www.w3.org/RDF/TR/WD-rdf-syntax#"
    xmlns:DL="http://www-diglib.stanford.edu/diglib/ginf/Search/Core#"
    xmlns:SM="http://www.ucsb.edu/DL/State">

<DL:Search
     query="color AND printers"
     numDocs="10"
     SM:clientSID="1234567"
     SM:stateTimeoutReq="300">
    <DL:queryLang rdf:resource="http://nis.org/bool"/>
    <DL:subcols rdf:resource="http://elib.stanford.edu/CS-TR"/>
</DL:Search>

</rdf:RDF>

Current version:

<rdf:RDF xmlns:rdf="http://www.w3.org/RDF/TR/WD-rdf-syntax#"
    xmlns:DL="http://www-diglib.stanford.edu/diglib/ginf/Search/Core#"
    xmlns:SM="http://www-diglib.stanford.edu/diglib/ginf/Search/StateMaintainance#"
    xmlns:CSM="http://www-diglib.stanford.edu/diglib/ginf/Comm/StateMaintainance#">

<DL:Search
     queryString="color AND printers"
     limit="10"
     SM:by="300">
    <DL:scope rdf:resource="http://elib.stanford.edu/CS-TR"/>
    <rdf:type resource="http://www-diglib.stanford.edu/diglib/ginf/Search/StateMaintainance#Prolongation"/>
    <CSM:state>
        <CSM:StateInfo rdf:about="someURIprefix:1234567"/>
    </CSM:state>
</DL:Search>

</rdf:RDF>

Search result

Obsolete version:

<rdf:RDF xmlns:rdf="http://www.w3.org/RDF/TR/WD-rdf-syntax#"
    xmlns:DL="http://www-diglib.stanford.edu/diglib/ginf/Search/Core#"
    xmlns:DC="http://purl.org/metadata/dublin_core#">

<DL:Result>
    <rdf:li>
        <rdf:Description about="http://mycorp.org/library/1923-543"
            DC:Creator="Samuel Batler"
            DC:Title="Darwin Among The Machines"/>
    </rdf:li>
    <rdf:li>
        <rdf:Description about="ISBN:1-85702-308-0"
            DC:Creator="Kevin Kelly"
            DC:Title="Out Of Control"/>
    </rdf:li>
</DL:Result>

</rdf:RDF>

Current version:

<rdf:RDF xmlns:rdf="http://www.w3.org/RDF/TR/WD-rdf-syntax#"
    xmlns:DL="http://www-diglib.stanford.edu/diglib/ginf/Search/Core#"
    xmlns:DC="http://purl.org/metadata/dublin_core#">

<DL:Result>
    <DL:resultItem
        <DL:ResultItem about="http://mycorp.org/library/1923-543"
            DC:Creator="Samuel Batler"
            DC:Title="Darwin Among The Machines"/>
    </DL:resultItem>
    <DL:resultItem>
        <DL:ResultItem about="ISBN:1-85702-308-0"
            DC:Creator="Kevin Kelly"
            DC:Title="Out Of Control"/>
    </DL:resultItem>
</DL:Result>

</rdf:RDF>

NOTICE: Examples of authentication and annotation were given for illustration purposes only. Therefore they are not presented here.