You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by s-...@artefrance.fr on 2003/02/20 17:57:54 UTC
[repost] break-before attribute and xpath following sibling axis
I repost this message because I haven't find the solution yet !
This test always return TRUE :
<xsl:if test="not(string(./SOUSTHEME) = string(following-sibling ::
./SOUSTHEME))">
And the old one always return FALSE :
<xsl:if test="SOUSTHEME != following-sibling :: SOUSTHEME">
Please someone, any idea ?
I thought it was an error with sorting, here's my apply templates FICHE
tag :
<xsl:apply-templates select="FICHE">
<xsl:sort select="SOUSTHEME" />
</xsl:apply-templates>
But I removed it and nothing change ... Pleas heeeeeelp a poor beginner in
needs ! ;o)
Thanks.
Simon
------------------------------------------------------------------------------------------------------------------------------------------
Hi,
I am trying to use the break-before attribute to put a page break when I
test a category changement in the XML.
Here is my XSL code :
---------------------------------------------------------------------
<xsl:template match="FICHE">
<fo:table table-layout="fixed">
<xsl:if test="SOUSTHEME != following-sibling :: SOUSTHEME">
<xsl:attribute name="break-before">page</xsl:attribute>
</xsl:if>
<!-- [...] end of the template after [...] -->
---------------------------------------------------------------------
I think my XPath expression is right : "SOUSTHEME != following-sibling ::
SOUSTHEME".
Here's a part of the XML datas incoming from a servlet :
---------------------------------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<CATALOGUE>
<FICHE cdId="663" catanetId="13343" type="P" lang="FRA">
<TITRE>140 000 CHINOIS POUR LA GRANDE GUERRE</TITRE>
<THEME>Histoire</THEME>
<SOUSTHEME>Histoire Contemporaine</SOUSTHEME>
<GENERIQUE>
<!-- [...] lot of subtags here [...] -->
</GENERIQUE>
<PRESENTATION>
<!-- [...] lot of subtags here [...] -->
</PRESENTATION>
</FICHE>
<FICHE cdId="1997" catanetId="49205" type="P" lang="FRA">
<TITRE>1929, LE SPECTRE DE LA CRISE</TITRE>
<THEME>Histoire</THEME>
<SOUSTHEME>Documentaires musicaux</SOUSTHEME>
<GENERIQUE>
<!-- [...] lot of subtags here [...] -->
</GENERIQUE>
<PRESENTATION>
<!-- [...] lot of subtags here [...] -->
</PRESENTATION>
</FICHE>
---------------------------------------------------------------------
If someone can help me to find my error... Maybe I didn't understand the
break-before attribute well.
Thanks,
Simon
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org
RE: [repost] break-before attribute and xpath following sibling axis
Posted by Roland Neilands <rn...@pulsemining.com.au>.
> I repost this message because I haven't find the solution yet !
This is probably one for the XSL experts:
http://www.mulberrytech.com/xsl/xsl-list/
Cheers,
Roland
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org