Generating Links in Unstructured Documents
Before we leave the topic of linking, we’ll discuss one
more useful technique. So far, all of this chapter’s examples have been
structured nicely. When there was a relationship between two pieces of
information, we had an ID
and
IDREF
pair to match them. What
happens if the XML document you’re transforming isn’t written that way?
Fortunately, we can use the key()
function and the generate-id()
function to create structure where there isn’t any.
Get XSLT, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.