Subject: RE: [xsl] XSL Processing to avoid repetitions - Part 2 From: "Fabien Tillier" <f.tillier@xxxxxxxx> Date: Thu, 17 Jun 2010 10:48:11 +0200 |
Hi. So, now I have an XSL Stylesheet that did work nicely. My problem is that I am using the docbook stylesheets, which are expecting an XSLT processor 1.0. I have used Kernow for testing (so Saxon) and then added Saxon (9) to my java app. Sadly, my app failed when transforming my docbook xml to html because my XSLT processor is now saxon, and not the default 1.0 one (or so I assume it is the case). I know the XSLT 2.0 version of the DB stylesheets are experimental, thus I cannot use them (or so it seems). I have two options. - change the XSL provided to a version 1.0 (thus, as I just understood the 2.0 fashion, and version 1.0 seems a lot more complicated, I am a bit afraid) - use a different processor "on demand" (which seems complicated too), either Java internal Xalan or saxon. Or I may be completely wrong (when using saxon in my app, the message I get is Error on line 357 of docbook.xsl: Cannot find a matching 1-argument function named {http://exslt.org/common}node-set() ; SystemID: jndi:/localhost/CerepWeb/xsl/docBook/xsl/html/docbook.xsl; Line#: 357; Column#: -1 net.sf.saxon.trans.XPathException: Cannot find a matching 1-argument function named {http://exslt.org/common}node-set() ) Any help from you, guys ? Best regards, Fabien -----Message d'origine----- De : Fabien Tillier [mailto:f.tillier@xxxxxxxx] Envoyi : mercredi 16 juin 2010 16:37 @ : xsl-list@xxxxxxxxxxxxxxxxxxxxxx Objet : RE: [xsl] XSL Processing to avoid repetitions Yes ! Sorry for being so blind. Your code works. It is just (I think) that I was messing with the way to set the "fields" Thanks a lot Best regards, Fabien -----Message d'origine----- De : Martin Honnen [mailto:Martin.Honnen@xxxxxx] Envoyi : mercredi 16 juin 2010 16:30 @ : xsl-list@xxxxxxxxxxxxxxxxxxxxxx Objet : Re: [xsl] XSL Processing to avoid repetitions Fabien Tillier wrote: > Thanks for your answer, but it doesn't work for me. > I have resent a message with my real data. > Maybe your solution would work if I don't change it to fit my data :) Andrew already suggested what to do, you simply can nest for-each-group e.g. <ol> <xsl:for-each-group select="/Results/Row" group-by="CONTRACT"> <li> <xsl:value-of select="current-grouping-key()"/> <ol> <xsl:for-each-group select="current-group()" group-by="CODE"> <li> <xsl:value-of select="current-grouping-key()"/> <ol> <xsl:for-each select="current-group()/NUMERO"> <li> <xsl:value-of select="."/> </li> </xsl:for-each> </ol> </li> </xsl:for-each-group> </ol> </li> </xsl:for-each-group> </ol> -- Martin Honnen http://msmvps.com/blogs/martin_honnen/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] XSL Processing to avoid r, Fabien Tillier | Thread | Re: [xsl] XSL Processing to avoid r, Michael Kay |
Re: [xsl] An unintended incompatibi, Dimitre Novatchev | Date | [xsl] filtering problem, Adrian Herscu |
Month |