|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Linenumbering & word index
Oh I meant to say:
> Applies the original mode a match for divs only
> to head and lg/l (modes...yes, must use modes more.)
> > <xsl:template mode="a" match="div">
> > <div poem="{position()}">
> > <xsl:apply-templates mode="a" select="head"/>
> > <xsl:apply-templates mode="a" select="lg/l"/>
> > </div>
> > </xsl:template>
> >
getting position() right in the template for l
<xsl:template mode="a" match="l">
<l n="{position()}">
is the reason for having two apply-templates.
if you went
<xsl:apply-templates mode="a" select="head|lg/l"/>
youe would select the same nodes in the same order, and apply the same
templates but your line counts would include the head lines as well as
the l lines as position{} would reflect the position in the node set
selected by head|lg/l rather than that selected by lg/l
David
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
|
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








