xsl-list
[Top] [All Lists]

RE: [xsl] XSL Processing to avoid repetitions - Part 2

2010-06-17 03:48:12
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(_dot_)tillier(_at_)cerep(_dot_)fr] 
Envoyé : mercredi 16 juin 2010 16:37
À : xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
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(_dot_)Honnen(_at_)gmx(_dot_)de] 
Envoyé : mercredi 16 juin 2010 16:30
À : xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
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/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--