[xsl] grouping after filtering (follow on question: about meucheun method)

Subject: [xsl] grouping after filtering (follow on question: about meucheun method)
From: 林 子芯 <minikittygo@xxxxxxxxxxx>
Date: Thu, 04 Jul 2002 14:56:11 +0000
Hi,

Thanks for the reply, however, i was wondering how could i group the data after the orginial xml has been filtered (without writing an intermediate file)?

in the previous example
...
<book>
<author>author1</author>
<name>x box</name>
<type>sc-fi</type>
</book>
<book>
<author>author2</author>
<name>elf story</name>
<type>adventure</type>
</book>
<book>
<author>author1</author>
<name>the return of Dr who</name>
<type>sc-fi</type>
</book>
<book>
<author>author2</author>
<name>something2</name>
<type>sc-fi</type>
</book>
...

what happen if you wish to filter some data out before grouping the item?

for instance

<xsl:template match="book">
<xsl:if test="author='author2'">
<xsl:call-template select="test"/>
</xsl:if>
</xsl:template>

<xsl:template name="test"/>
<!--start grouping the data-->

</xsl:template>

however, if i started to group at this stage (which i want to group it at this stage) using the mucheun method, it will group the unwanted data (the filtered out data) as well as the wanted data which could result to losing data, therefore i was wondering whether it is possible to do so, or do i need to look for another way of grouping them? any feed back would be a great assist.

Many thanks

Regards
Kit





_________________________________________________________________
在您的行動裝置上傳送接收 Hotmail 郵件,請移至:http://mobile.msn.com


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread