Subject: [xsl] Retrieving values From: "peter verhaar" <peter.verhaar1@xxxxxxxxx> Date: Thu, 8 Jan 2009 15:39:00 +0100 |
Hello, I have 2 beginner questions: QUESTION 1: Assume: <books> <book><code>1</code><title>TitleA</title></book> </books> And: <xsl:template match="books"> <xsl:for-each-group select="book" group-by="code"> <xsl:message select="current-grouping-key()"/> <xsl:message select="current-group()/title"/> <xsl:message select="count(current-group()/title)"/> </xsl:for-each-group> </xsl:template> Output: 1 <title>TitleA</title> 1 Question: How to get a Sequence of values so ('TitleA',......)? I modified the selection to the following but this doesn't work: <xsl:message select="current-group()/@title"/> <xsl:message select="count(current-group()/@title)"/> Output 1 <empty> 0 QUESTION 2: How to run a XPath selection on a Sequence. E.g.: <xsl:variable name="titles" select="('titleA','titleB')"/> <xsl:variable name="selectedBooks" select="/books/book[@title ISINSEQUENCE $titles]"/> Is this possible to check a attribute does exist in a sequence? Thanks Peter
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Categorise Node by Unique, William Warby | Thread | Re: [xsl] Retrieving values, David Carlisle |
Re: [xsl] XSLT, Web applications, a, ac | Date | Re: [xsl] Retrieving values, David Carlisle |
Month |