Re: Human Friendly Trix

Hi again,

I've updated this to include support for nested elements. 
E.g.

		<foaf:Person hr:qname="pd:phildawes">
			<foaf:name>Phil Dawes</foaf:name>
			<foaf:nick>Phil</foaf:nick>
			<foaf:homepage uri="http://www.phildawes.net/"/>
			<pd:commutesTo hr:qname="pd:city/London"/>
			<pd:eats hr:qname="pd:cabbage">
				<rdfs:label>Cabbage</rdfs:label>
			</pd:eats>
		</foaf:Person>

Still no anonymous nodes yet tho.

Cheers,

Phil



Phil Dawes writes:
 > 
 > Hi Jeremy, Patrick, www-rdf-interest,
 > 
 > Have been reading about TriX with interest. The primary client
 > interface at my work is browser javascript/xsl/xhtml, so being able
 > read and manipulate RDF using XML tools is a definite advantage of
 > trix over RDF/XML for me.
 > 
 > I do however agree with the 'xml in rdf' comments - there is a large
 > group of people who want their metadata to 'look' like xml, and
 > encouraging xml people to use RDF is of great importance to the
 > semantic web IMHO.
 > 
 > I've been experimenting with writing a simple xsl transform to convert
 > some human-readable xml-ish TriX into the native triples form.
 > 
 > An example of the xml is at:
 > http://www.phildawes.net/2004/01/trix/humanreadable.xml
 > 
 > The transform is at:
 > http://www.phildawes.net/2004/01/trix/humanreadable-trix.xsl
 > 
 > (N.B. your browser may attempt to transform this on the fly.
 > linux users can transform it using:
 > xsltproc http://www.phildawes.net/2004/01/trix/humanreadable.xml)
 > 
 > It (so far) supports qualified names (foo:bah), element-names as
 > rdf-properties and the rdfs:type in the outer element name. It doesn't
 > do nested or anonymous nodes yet.
 > E.g.
 > 		<foaf:Person hr:qname="pd:phildawes">
 > 			<foaf:nick>Phil</foaf:nick>
 > 			<pd:commutesTo hr:qname="pd:city/London"/>
 > 			<foaf:homepage uri="http://www.phildawes.net/"/>
 > 		</foaf:Person>
 > 
 > Notes:
 > 
 > - I had to use the xslt namespace axis to convert qnames into
 > uris. This is unfortunate because not all xslt engines support this,
 > most particularly the one built into mozilla and firefox. Does anybody
 > have any tips for removing this dependancy?
 > 
 > - The namespace for TriX doesn't seem very persistence-friendly to me:
 > It's built using a domain name you don't control, and there's no date
 > identifier. Wouldn't something like http://purl.org/TriX/2004/02/ be
 > better?
 > 
 > - The xslt is pretty messy, due to bugs in my xslt transformer, and in
 > my understanding of xslt.
 > 
 > Comments?
 > 
 > Cheers,
 > 
 > Phil
 > 
 > 

-- 

Received on Monday, 16 February 2004 07:27:45 UTC