UPDATED 2007-03-05 - changed URLs
UPDATED 2007-02-24 - fixed extenders and combiners
RDF/XML requires predicates to be represented as a namespaced XML element or attribute. This requires the predicate IRI to be split at an arbitary place into a namespace URI and an XML NCName. The problem is that the predicate can actually be an IRI; and the namespace IRI and local-name must both be valid. This requires the position to be chosen carefully.
This transform implements the algorithm to split an IRI in pure XSLT 1.0: http://djpowell.net/schemas/treetriples/1/xslt/splitns.xsl. WARNING - this transform contains a large table of Unicode characters which may take a long time to render in your browser or editor. Also note that the transform is encoded in UTF-16.
Also provided are some test cases which will run in your browser. (Don't worry, the transform loads quickly when called by a client, it is just rendering it that is slow). The test cases are here, and are implemented using this test stylesheet.
This transform should be very useful for GRDDL transforms.