|
Subject: [xsl] preceding-sibling question and node set as param to template From: Matts Isuls <matts.isuls@xxxxxxxxxxx> Date: Wed, 11 Dec 2002 15:54:23 +0200 |
Hi list
Working with MS-Excel XML files and has run into something i can't resolve
on my own.
q1::
What i would like to do is this:
Get first preceding-sibling of current node that has the ss:Index attrib
set. Then count the 'ss:Index' node's preceding-siblings. I hope you
understand what i mean.
count(preceding-sibling::node()/@ss:Index/preceding-sibling::node())
but it doesn't work. result = 0
q2::
Is it possible to send a node set to a template as param? Something like
this below?
<xsl:template match="/">
...
...
<xsl:for-each select="ss:Cell">
<xsl:call-template name="testlate">
<xsl:with-param name="pp"><xsl:copy-of
select="preceding-sibling::node()"/></xsl:with-param>
</xsl:call-template>
</xsl:for-each>
...
...
</xsl:template>
<xsl:template name="testlate">
<xsl:param name="pp"/>
<!-- do this and that -->
<xsl:value-of select="count($pp)"/>
</xsl:template>
Matts Isuls
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] Deleting, Erasing or Hidi, Jarno . Elovirta | Thread | Re: [xsl] preceding-sibling questio, David Carlisle |
| RE: [xsl] Deleting, Erasing or Hidi, Jarno . Elovirta | Date | RE: [xsl] preceding-sibling questio, TSchutzerWeissmann |
| Month |