Subject: RE: [xsl] Extending xsltproc? From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx> Date: Thu, 25 Apr 2002 15:45:53 +0100 |
You seem to be mixing questions about what XSLT can do with questions about what xsltproc can do. Even if you are committed to xsltproc, you need to be clear that these are different questions. > > Then again, maybe I don't need to extend it. The two transforms I > would like to implement seem easy and commonplace, but are proving > elusive: 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, Yes, this is a very common requirement and is easily solved. You'll find the techniques in any XSLT textbook or on the FAQ for this site. The first thing is to realize that XSLT is producing nodes in a result tree, not tags in a serialized output file. > and I'd also like to be able to present > a node-set in a new random order on each call. There's no random() function in XSLT, but you can pass a random number into the stylesheet as a parameter and use it to pseudo-randomize the output order, e.g. by doing <xsl:sort select="translate(generate-id(), "1234567890", string($random))" Michael Kay Software AG home: Michael.H.Kay@xxxxxxxxxxxx work: Michael.Kay@xxxxxxxxxxxxxx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Extending xsltproc?, Gary Lawrence Murphy | Thread | Re: [xsl] Extending xsltproc?, Gary Lawrence Murphy |
Re: [xsl] Setting a global variable, Thomas B. Passin | Date | Re: [xsl] Extending xsltproc?, David Carlisle |
Month |