2011年4月23日土曜日

[XML VQG] 2. XSLT (3)

I've finished creating my example related to vCard and RDF.


  • Original vCard

    BEGIN:VCARD
    VERSION:3.0
    N:Corky Crystal
    FN:Corky Crystal
    SOUND;X-IRMC-N:Corky;
    SORT-STRING:Corky
    X-PHONETIC-FIRST-NAME:Corky
    X-PHONETIC-LAST-NAME:Crystal
    TEL;HOME;VOIDE:+61 7 5555 5555
    EMAIL:corky@example.com
    ADR;HOME:;;111 Lake Drive;WonderCity;;5555;Australia
    END:VCARD


  • RDF vCard

    <?xml version="1.0"?>
    <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:v="http://www.w3.org/2006/vcard/ns#">

    <v:VCard rdf:about = "http://example.com/me/corky" >
    <v:n>Corky Crystal</v:n>
    <v:fn>Corky Crystal</v:fn>
    <v:sound>
    <rdf:Description>
    <rdf:value>Corky</rdf:value>
    <rdf:type rdf:resource="@@@X-irmc-n@@@"/>
    </rdf:Description>
    </v:sound>
    <v:sort-string>Corky</v:sort-string>
    <v:x-phonetic-first-name>Corky</v:x-phonetic-first-name>
    <v:x-phonetic-last-name>Crystal</v:x-phonetic-last-name>
    <v:tel>
    <rdf:Description>
    <rdf:value>+61 7 5555 5555</rdf:value>
    <rdf:type rdf:resource="http://www.w3.org/2006/vcard/ns#Home"/>
    <rdf:type rdf:resource="http://www.w3.org/2006/vcard/ns#Voice"/>
    </rdf:Description>
    </v:tel>
    <v:email rdf:resource="mailto:corky@example.com"/>
    <v:adr>
    <rdf:Description>
    <v:street-address>111 Lake Drive</v:street-address>
    <v:locality>WonderCity</v:locality>
    <v:postal-code>5555</v:postal-code>
    <v:country-name>Australia</v:country-name>
    <rdf:type rdf:resource="http://www.w3.org/2006/vcard/ns#Home"/>
    </rdf:Description>
    </v:adr>
    </v:VCard>
    </rdf:RDF>


0 件のコメント: