|
Subject: Re: [xsl] postion gives me 2 instead of 1 From: Paul Tremblay <phthenry@xxxxxxxxxxxxx> Date: Fri, 20 Jun 2003 11:58:38 -0400 |
On Fri, Jun 20, 2003 at 09:54:59AM +0100, Jeni Tennison wrote:
>
> > I want to put a number just in front of the first paragraphs in each
> > listitem.
> >
> > Here is a try from my xslt stylesheet:
> >
> > <xsl:template match = "listitem/para[1]">
> > <block>
> > <xsl:value-of select = "../@number"/>
> > <xsl:apply-templates/>
> > </block>
> > </xsl:template>
> >
> > This doesn't work. For some reason, xslt gives the position number
> > as 2 for the first paragraph.
>
>
> So I don't understand in what way your first template doesn't work,
> given that you say that your second template does. Perhaps showing
> more of the stylesheet and showing the output that you're getting
> would help.
>
Okay, I've found the culprit. If I use *just* the above fragment in my
xslt stylesheet, then it works. However, if I add this:
<xsl:template match = "listitem/para">
<block left-indent = "3">
<xsl:apply-templates/>
</block>
</xsl:template>
Thenn it does not work. The processor applies the second template with
no predicate.
I don't understand why this is so. I thought the templates that were
most specific got applied before the ones that were more general?
Thaks
Paul
************************
*Paul Tremblay *
*phthenry@xxxxxxxxxxxxx*
************************
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] postion gives me 2 instea, Jeni Tennison | Thread | RE: [xsl] postion gives me 2 instea, Lars Huttar |
| RE: [xsl] xsl:number problem, Yan, Charlene | Date | RE: [xsl] doctype declaration and m, Wendell Piez |
| Month |