Jiří Kosek on node-set()
Jiří Kosek on node-set()
Jiří Kosek surprised me with his article Understanding the node-set() Function
. My colleagues Ruda and Tom and I had spent plenty of time puzzling over how to use an XSLT template to operate on XML data that
was neither part of the XML source nor loaded by the document() function.
There is a solution. The node-set() function converts a result tree fragment into a node set, and that’s the key. For example, we can create other XML data in a variable and
use the function to turn it into a node set we can then work with.
Originally I was going to wait to link to this article until my XSLT series for
the Sova v síti newsletter was underway. I wasn’t trying to keep it to myself. I just didn’t want it
to get lost among the other posts, which would have been a great shame. There are
pitfalls and techniques you won’t find in the specifications.
I’ll add a funny story that puts this very useful article in perspective. At a course on writing
user documentation, primarily using DocBook, taught by Jiří Kosek, something made me laugh.
I don’t remember the precise context, but somebody asked a tricky question along the lines of
how to get a handle to the Services window. Jiří Kosek sat up straight and addressed
the room with a memorable sentence that began, “I may be an XML guru …” Believe me, he really is an XML guru.
Related articles
Related CZ Podcast episodes
- #217 · Ivo Lukačovič
On Windy, JavaScript and building companies. · Czech audio
- #3 · Java 6 SE, Vývoj webových aplikací
Dagi and Filemon discuss Java 6 and web application frameworks. · Czech audio