SYNTAX: bNode ids in XSLT

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 UTC