How to put your pet on the Semantic Web

You should read through the instructions below first, but basically you'll need to create a profile, store it somewhere and then point to it from your FOAF Profile.

* Storing the Profile here

The easiest approach at present is to store your pets profile on this site, although there isn't as yet a way of editing the profile once stored.

  1. Use the Pet-a-matic to generate the Pet Profile Document

If you chose to store the file here, your pet is already on the Semantic Web. If you want to host the profile yourself, You may now wish to add a reference to the Pet Profile in your FOAF Profile.

* Storing the Profile on your own site, using XSLT and CSS Styling

This gives a better result than CSS alone in most browsers.

  1. Save the result as a text file (a filename extension of .xml is probably best).
  2. Add the following files to the same directory as the Profile : pet.xsl , pet.css
  3. You may wish to copy the image of your pet to the same directory, in which case adjust the address in foaf:depicts accordingly

* Storing the Profile on your own site, using CSS Styling

Simpler but not as versatile/pretty.

  1. Save the result as a text file (a filename extension of .xml is probably best).
  2. Add the following files to the same directory as the Profile : pet-rdf.css, ie-namespace.htc (the latter will hopefully help later with Internet Explorer support)
  3. Add a picture, size 200x200 pixels of your pet, to the directory - call it image.jpg
  4. Edit your Pet Profile document so the top lines include:
    <?xml-stylesheet type="text/css" href="pet-rdf.css"?>
    rather than
    <?xml-stylesheet type="text/xsl" href="pet.xsl"?>
  5. Upload all the files to a web server

 

Add a reference to the Pet Profile in your FOAF Profile

<rdf:RDF
xmlns="http://xmlns.com/foaf/0.1/" ... xmlns:pet="http://purl.org/stuff/pets/"> ... <Person> <name>Daniel Ayers</name> ... <pet:hasPet> <pet:Pet> <foaf:name>name of your pet</foaf:name> <pet:hasProfile rdf:resource="http://address-of-the-profile-doc" /> </pet:Pet> </pet:hasPet> ... </person> ... </rdf:RDF>

If you have any problems with anything around here, have any suggestions or spot any mistakes, please mail me.