Next: Attributions, Previous: Using DTDs, Up: XML/XPath/XSL packages [Index]
I spent a night the other week trying to figure out how to get the XSL libraries to do anything. I no longer need it now, but I did discover some things others with an immediate need may want to be aware of.
A code snippet for doing just that appears below.
| rules xmlDoc htmlDoc |
rules := XSL.RuleDatabase new readFileNamed: 'paymentspending.xsl'.
xmlDoc := XML.SAXParser defaultParserClass
processDocumentInFilename: 'paymentspending.xml'
beforeScanDo: [ :p | p validate: false ].
htmlDoc := rules process: xmlDoc.
There is also a readString: method which can be used
instead of readFileNamed:.
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
position() and count() aren’t
implemented, or if they are, aren’t implemented in the way other XSL
tools implement it.