Subject: [xsl] Enforcing element order From: ms <mina_hurray@xxxxxxxxx> Date: Wed, 2 May 2007 12:53:32 -0700 (PDT) |
Hi: I have an xml input file as shown below: <mfunc> <text><para> </para></ text> <image><title> </title>< /image> <table></table> <text><para> </para></ text> <text><para> </para></ text> <image><title> </title>< /image> <l1> ..... </l1> <image><title> </title>< /image> <table></table> <text><para> </para></ text> </mfunc> 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> The issue I am facing here is: 1) becos of "<xsl:apply- templates select="*[not( self::image) ...." Any image that appears before <l1> is forced to the end after l1. 2) The same holds true for text and table elements. Can anyone suggest a different apprach to this problem? Thanks in advance for your help. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] How is memory allocated i, Abel Braaksma | Thread | Re: [xsl] Enforcing element order, Abel Braaksma |
Re: [xsl] How is memory allocated i, Rashmi Rubdi | Date | Re: [xsl] How is memory allocated i, Rashmi Rubdi |
Month |