Subject: Re: [xsl] Count Ancestors Up To But Not Including a Given Type From: Eliot Kimber <ekimber@xxxxxxxxxxxx> Date: Tue, 05 Feb 2008 09:09:41 -0600 |
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:f="data:,f" >
<xsl:function name="f:same" as="element()*"> <xsl:param name="n" as="element()"/> <xsl:sequence select="$n,$n/../..[node-name(.)=node-name($n)]/f:same(.)"/> </xsl:function>
<xsl:template match="y"> :<xsl:value-of select="count(f:same(../..)/name())"/> </xsl:template>
-- Eliot Kimber Senior Solutions Architect "Bringing Strategy, Content, and Technology Together" Main: 610.631.6770 www.reallysi.com www.rsuitecms.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Count Ancestors Up To But, David Carlisle | Thread | Re: [xsl] Count Ancestors Up To But, David Carlisle |
RE: [xsl] Count Ancestors Up To But, Wendell Piez | Date | Re: [xsl] strip-spaces, David Carlisle |
Month |