Subject: Re: [xsl] Condition Based Count of Sections From: "Ragulf Pickaxe" <ragulf.pickaxe@xxxxxxxxx> Date: Wed, 18 Apr 2007 09:54:52 +0200 |
You have not explicitly stated your required output (only given an example), but it seems to me that you do not want count and level attributes on the first sect1 child elements of a given chapter (nor their subsequent children).
So it seems that you have two conditions (besides the one about have paragraphs as child elements [p]), and you need to distinguish between these two. For all sect1[p] elements you will have to check to see if it is the first sect1 element under that given paragraph <xsl:if test="preceding-sibling::sect1">..</ If true, then you add the element and attributes as you already do. If false, then the attributes must not be added (if I understand correctly), and you should just do a deep copy: <xsl:copy-of select="."/>
I hope I understand your requirements correctly, and would add that explicitly stating your requirements, as well as giving an example, makes it easier for people to help you.
Regards, Ragulf Pickaxe :-)
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Condition Based Count of , J. S. Rawat | Thread | Re: [xsl] Condition Based Count of , Ragulf Pickaxe |
Re: [xsl] Condition Based Count of , J. S. Rawat | Date | Re: [xsl] Condition Based Count of , Ragulf Pickaxe |
Month |