« Lunch: Lunch with Doc Searls | Main | Out to dinner in San »
July 25, 2002
Stupid XSLT Tricks Doug Tidwell.
Stupid XSLT Tricks Doug Tidwell. The room is packed. I'm sitting on the floor. XSLT basics. Hello World example. Small templates help reuse. You don't have to transform to a markup language. Small demonstration shows how to generate XML into different output versions. Asks briefly if anyone uses Cocoon. Demonstration also generates Java source code. SVG example. Creating multiple output files using xslt: Use extensions (supported e.g. by xalan - redirect extension). This works by first defining a namespace and then using the namespace inside the xsl stylesheet. Exslt is working on providing extensions in a community process. Next example uses document() function. Question from the floor: "Is it easy to write extensions?" Answer: "If you read my book it is" :-). Next shows recursion and iteration. Recursion is done using named templates. Using document() and sort() together. Document(' ') with an empty string and you can use it to lookup stuff in a lookup table. This means you can put the data into the stylesheet itself. The lookup table must have a different namespace. Use document() function for grouping.
Toot-o-matic: Automated tutorial generation using XSLT to generate complete tutorial documentation (HTML, PDF etc.) for IBM DeveloperWorks.
Posted by Matthew at July 25, 2002 10:50 PM