Subject: Re: [xsl] Extending xsltproc? From: Gary Lawrence Murphy <garym@xxxxxxxxxx> Date: 25 Apr 2002 12:38:26 -0400 |
>>>>> "M" == Michael Kay <michael.h.kay@xxxxxxxxxxxx> writes: M> You seem to be mixing questions about what XSLT can do with M> questions about what xsltproc can do. Even if you are committed M> to xsltproc, you need to be clear that these are different M> questions. Absolutely. It's just so adorably cute that I can't resist putting it to different uses, but being C based, it obviously doesn't automatically play well with other langauges. I'm also very new at this stuff, so if I can beg one more novice question about extensions: If I write an extension for XSL, is it portable among xslt implementations, or do they each use their own methods? My guess is the latter only because the only two I know about, xalan and xsltproc, are rooted in very different technologies. >> ... I would like to render a node-set into rows of columns >> without resorting to disable-output-escaping to insert the >> modulo-column </tr><tr> break, M> Yes, this is a very common requirement and is easily M> solved. You'll find the techniques in any XSLT textbook Sadly not in the XSLT book I have :( If it is in Tidwell's book, I can't find it -- I'll check the FAQ. M> ... The first thing is to realize that XSLT is producing nodes M> in a result tree, not tags in a serialized output file. This is what I'd thought, which is why I was surprised when the only example I could find, the stylesheets in the recommended Amazon XML package, used the doe method in a serialized output; it just seemed wrong. M> There's no random() function in XSLT, but you can pass a random M> number into the stylesheet as a parameter and use it to M> pseudo-randomize the output order, e.g. by doing M> <xsl:sort select="translate(generate-id(), "1234567890", M> string($random))" Oh, yes! That's exactly what I need! Thanks, this is a great help; I tried a few tests of passing parameters with not much success -- this example opens a lot of new avenues. -- Gary Lawrence Murphy <garym@xxxxxxxxxxx> TeleDynamics Communications Inc Business Innovations Through Open Source Systems: http://www.teledyn.com "Computers are useless. They can only give you answers."(Pablo Picasso) XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Extending xsltproc?, Michael Kay | Thread | Re: [xsl] Extending xsltproc?, Thomas B. Passin |
[xsl] Re: Extending xsltproc?, Dimitre Novatchev | Date | Re: [xsl] Extending xsltproc?, Gary Lawrence Murphy |
Month |