Subject: Re: [xsl] xsl:number query From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Mon, 08 Mar 2010 16:55:39 -0500 |
I am having trouble getting an accurate count using xsl:number.
Here is a snippet of my input document:
<div class="story">
<p class="test">A</p>
<p class="head-testname">READING COMPREHENSION</p>
<p class="bodytext-directionsrevise">Directions: Read the
selection. Then answer the questions that follow.</p>
<p class="head-selectiontitle">Jason and the Golden Fleece</p>
...
<p class="bodytext-directionsrule1">Directions: Read the
selection. Then answer the questions that follow.</p>
<p class="head-selectiontitle">Freight</p>
<p class="bodytext-selectionintro">This is an ... Underground
Railroad.</p>
<p class="bodytext-subhead">Cast of Characters</p>
</div>
I am attempting to include in the same sequence both <p class="bodytext-directionsrevise"> and <p class="bodytext- directionsrule1">.
Here is the relevant template from my 2.0 stylesheet:
<xsl:template match="p[@class='bodytext-directionsrevise'] | p[@class='bodytext-directionsrule1']"> <narrative> <xsl:attribute name="name"><xsl:number select="." count="*" from="story"></xsl:number></xsl:attribute>
count="p[@class='bodytext-directionsrevise'] | p[@class='bodytext-directionsrule1']"
How can I tell xsl:number to count the specified attributes?
-- XSLT/XQuery training: after http://XMLPrague.cz 2010-03-15/19 XSLT/XQuery training: San Carlos, California 2010-04-26/30 Principles of XSLT for XQuery Writers: San Francisco,CA 2010-05-03 XSLT/XQuery training: Ottawa, Canada 2010-05-10/14 XSLT/XQuery/UBL/Code List training: Trondheim,Norway 2010-06-02/11 Vote for your XML training: http://www.CraneSoftwrights.com/s/i/ Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] xsl:number query, Terry Ofner | Thread | RE: [xsl] xsl:number query, Michael Kay |
[xsl] xsl:number query, Terry Ofner | Date | Re: [xsl] reading a .xsv file in xs, Michael Ludwig |
Month |