[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Linenumbering & word index

Subject: Re: Linenumbering & word index
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 6 Aug 2004 18:06:52 +0100
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
________________________________________________________________________

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.