This transformation produces FOAF data from XHTML, per RDF in XHTML proposal. (see also: demo.), with the following conventions:
class
set to foaf-person
class
set to foaf-name
, possibly detailed with sub-elements with class
set to foaf-family
and foaf-given
image
element with a class
set to foaf-depiction
refers to a picture of the personmailto:
link in this element is associated with as a mailbox of the persontel:
link in this element is associated with as a phone number for the personrel
attribute set to foaf-work
rel
attribute set to foaf-home
rel
set to foaf-knows
This is purely experimental, and has not been reviewed (and even less endorsed) by anybody involved in the FOAF project.
If you want to extend this style sheet to support additional properties embedded in the mark up structure as described above, this style sheet has an extensibility point in so that it calls a foafGrddl:extend
template in each foaf:Person
it creates; by importing this style sheet and overriding the foafGrddl:extend
template, you can scrape new properties. (foafGrddl
is linked to http://www.w3.org/2003/12/rdf-in-xhtml-xslts/grokFOAF
)