Subject: Re: [xsl] Enforcing element order From: Abel Braaksma <abel.online@xxxxxxxxx> Date: Wed, 02 May 2007 22:51:49 +0200 |
Hi:
I have an xml input file as shown below:
As you can see elements image, table and text can
appear before and
after <l1>. Now in the PDF, I want all image, text and
table elements
to appear before l1 and the ones after to appear after
l1.
Here is my XSLFO piece for tjis part:
<xsl:choose> <xsl:when test="*[self: :image[following -sibling: :table] or self::image[ following- sibling:: text] or self::image] "> <xsl:apply-template s select="*[not( self::image) and not(self::table[ preceding: :image]) and not(self::text[ preceding: :image])] "/> </xsl:when> <xsl:otherwise> <xsl:apply-template s/> </xsl:otherwise> </xsl:choose>
<xsl:template match="/"> <xsl:apply-templates select="mfunc/*" /> </xsl:template>
<xsl:template match="l1"> ... do something with l1... <xsl:apply-templates /> </xsl:template>
<xsl:template match="image"> ... do something with image ... <xsl:apply-templates /> </xsl:template>
<xsl:template match="text"> ... do something with text ... <xsl:apply-templates /> </xsl:template>
Can anyone suggest a different apprach to this
problem?
Cheers, -- Abel Braaksma
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Enforcing element order, ms | Thread | Re: [xsl] Enforcing element order, ms |
Re: [xsl] How is memory allocated i, Rashmi Rubdi | Date | Re: [xsl] How is memory allocated i, Abel Braaksma |
Month |