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
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--