Re: [xsl] create a xsl rule

Subject: Re: [xsl] create a xsl rule
From: "Dr. Robert Spiske" <spiske@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 20 Mar 2003 14:26:42 +0100
Hi Lionel!

First of all, it seems to me, that your xml structure does not meet your needs.
If the graphic section and your (a)'s belong together why is there no tag around the whole block?


Secondly your para rule is handling all para tag's so none should be displayed.
If the (a)'s get displayed and the (b)'s don't, than there is some code in your xsl directly accessing the (a)'s. That a new para rule won't solve your problem.


Keeping your stucture you would need to rewrite the etm's parent rule.
There you can access the etm-siblings withing an for-each loop and process the following para siblings in a second nestled for-each structure using an apply-templates for the para's with a mod-attribute or a with-param tag.
I'd need more details to say what's best.


Robert


At 13:35 20.03.2003 +0100, you wrote:
Hello, I have a little trouble.

Here is the xml file :

<etm><graphic></graphic></etm>

<etm><para>blabla</para><etm> (a)
<etm><para>blabla</para><etm> (a)
<etm><para>blabla</para><etm> (a)

<etm><table></table></etm>

<etm><para>blabla</para><etm> (b)
<etm><para>blabla</para><etm> (b)
<etm><para>blabla</para><etm> (b)



In my XSL :


1/ I have a rule that match graphic and get the para (a) below using a generate-id.
<xsl:template match="etm[graphic]">
... ->there I use the generate-id
</xsl:template>


2/ My "para" rule is :
<xsl:template match="para">
</xsl:template>
obviously, this rule is to not display the para a second time. I can 't change it. Other rule would be influenced.


QUESTION : Where I'm stuck is that the para beside the table are not displayed, so I want to write a new "para" rule that match :
the first element above the para (b) that is not a graphic (so the table here).
Is it possible ?



Lionel



XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list





XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread