|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] grouping help (...probably)
hi people, i've got (type of) this xml: <root> <foo> <bar xml:lang="de">1de</bar> </foo> <foo> <bar xml:lang="en">2en</bar> <bar xml:lang="de">2de</bar> </foo> <foo> <bar xml:lang="en">3en</bar> </foo> <foo> <bar xml:lang="en">4en</bar> <bar xml:lang="de">4de</bar> </foo> </root> and an xsl that allows to choose a language, and, if there is no item in the selected language, falls back to the default language, which usually is English. <xsl:template match="foo"> <xsl:choose> <xsl:when test="bar[@lang=$selectedLanguage]"> <xsl:apply-templates select="bar[@xml:lang=$selectedLanguage]"/> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="bar[@xml:lang=$defaultLanguage]"/> </xsl:otherwise> </xsl:choose> </xsl:template> but now i need only the first 3 (a param) entries, so that when de is the selected language i get: 1de - 2de - 3 en an when it's en 2en - 3en - 4en and I don't know how to do this. I somehow get the feeling that grouping might be involved, but have no clue how to really make it work... anyone can help me? -- Jan http://www.limpens.com
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








