W3C home > Mailing lists > Public > w3c-rdfcore-wg@w3.org > October 2001

SYNTAX: bNode ids in XSLT

From: Jeremy Carroll <jjc@hplb.hpl.hp.com>
Date: Tue, 2 Oct 2001 15:46:47 +0100
To: "Jan Grant" <Jan.Grant@bristol.ac.uk>
Cc: "w3c-rdfcore-wg" <w3c-rdfcore-wg@w3.org>
Message-ID: <JAEBJCLMIFLKLOJGMELDAEEHCCAA.jjc@hplb.hpl.hp.com>



Jan:
> The difference between XSLT validation and spitting out of ntriples is
> that the latter is harder. Principally (and I've just begun sketching
> this) because we've a requirement to output approprately unique
> identifiers for anonymous nodes when producing RDF.


I haven't yet produced any ids but I was imagining cheating.

This is hardly a vital part of the implementation. XSLT in some
implementations provides an escape to Java, use it to provide a unique
identifier.

If you're doing the transform in one go, the XSLT function generate-id() is
probably enough.

Even in a multi-pass method, (my preference); one could use generate-id() by
a first pass that added e.g. "snail:gensym='{generate-id()}'"  to ever
element, where snail is bound to some private namespace, and this is
explicitly ignored by other non bNode inducing rules.

Then at any later point there is a locally unique name if you need it.

Since the XSLT implementation is non-normative, I think it is acceptable to
hack the corners with a Java escape mechanism, this will be the route of
least pain.

Jeremy
Received on Tuesday, 2 October 2001 10:48:38 EDT

This archive was generated by hypermail pre-2.1.9 : Wednesday, 3 September 2003 09:40:56 EDT