W3C home > Mailing lists > Public > www-rdf-interest@w3.org > June 2004

Re: XSLT for literal mapping/conversion

From: Damian Steer <damste@hplb.hpl.hp.com>
Date: Fri, 04 Jun 2004 13:39:35 +0100
Message-ID: <40C06D87.2090009@hplb.hpl.hp.com>
To: danny666@virgilio.it
Cc: www-rdf-interest@w3.org

Hash: SHA1

Danny Ayers wrote:
| Something that just occurred to me, here half-baked before I forget.
| By way of example. Say there are two RDF/XML vocabularies, each of which
| has a literal date property. They are the same in meaning except one
| uses the RFC 822 email format, the other ISO 8601, i.e.
| <r1:date>2004-06-04</r1:date>
| <r2:date>4th June 2004</r2:date>
| Does the following look a feasible way of using the two together:
| <r1:date>
|    <xxx:transform rdf:resource="http://example.org/r2-to-r1.xsl" />
|    <rdf:value>4th June 2004</rdf:value>
| </r1:date>
| Where r2-to-r1.xsl will be an XSLT transformation applied to the document:
| <rdf:value xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">4th
| June 2004</rdf:value>

That's a cute idea, but I'm not sure you need XSLT for this case. How
about just using XPath, which will presumably be doing most of the work

Also would it be better to relate the classes r1:date and r2:date? eg:

<rdfs:Class rdf:about="&r1;date">
		<rdfs:Class rdf:about="&r2;date"/>

(where ...munge.... takes 2004-06-04 and spits out the r2 version)

You could create the necessary XSLT from this, btw.

| I'm not sure how this would run alongside xsd datatypes.

XPath 2.0 should cope - he said rashly :-)

| Cheers,
| Danny.

Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

Received on Friday, 4 June 2004 08:40:05 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:07:51 UTC