[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Display more than one table in generic xslt - reg

Subject: Re: Display more than one table in generic xslt - reg
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Fri, 26 Mar 2010 16:38:43 +0100
Re:  Display more than one table in generic xslt - reg
Ramesh Kumar wrote:

Is this technique called as Muenchian Grouping technique ?

Yes, the stylesheet below uses Muenchian grouping to identify second level elements of the same name and group them into a "tr" element containing a single "td" element with a single "table" element.
See also http://www.jenitennison.com/xslt/grouping/index.xml


 <xsl:output method="html" indent="yes"/>
 <xsl:strip-space elements="*"/>

 <xsl:key name="by-name"
          use="concat('{', namespace-uri(), '}', local-name())"/>

 <xsl:template match="/">
           <xsl:apply-templates select="*/*[generate-id() =
generate-id(key('by-name', concat('{', namespace-uri(), '}',
local-name()))[1])]" mode="table"/>

 <xsl:template match="/*/*" mode="table">
      <table border="1">
            <xsl:apply-templates mode="th"/>
          <xsl:apply-templates select="key('by-name', concat('{',
namespace-uri(), '}', local-name()))"/>
  <xsl:if test="position() != last()">

 <xsl:template match="/*/*/*" mode="th">
     <xsl:value-of select="local-name()"/>

 <xsl:template match="/*/*">

 <xsl:template match="/*/*/*">
     <xsl:value-of select="."/>



	Martin Honnen

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.