xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rita Greenberg <rgreenb...@medata.com>
Subject Understanding Following-Sibling
Date Mon, 19 Sep 2011 23:48:18 GMT
Hello.

Could somebody please explain the following code I found in a .fo file.

Here is my XML file.
                  <RCDATA>
                    <RCDATALINE>
                        <RC>ZE</RC>
                        <RCANSI>W1</RCANSI>
                        <TRC/>
                        <RCREDUCTION> 5878.14</RCREDUCTION>
                        <RCOVERRIDE/>
                        <RCMODIFIED/>
                    </RCDATALINE>
                    <RCDATALINE>
                        <RC>NR</RC>
                        <RCANSI>45</RCANSI>
                        <TRC/>
                        <RCREDUCTION> 0.00</RCREDUCTION>
                        <RCOVERRIDE/>
                        <RCMODIFIED/>
                    </RCDATALINE>

Here is the Following-sibling statement:
<xsl:if test="/doc/EOB/DETAIL/DETAILLINE/RCDATA/RCDATALINE/RC[.!='']/following-
sibling::*[.=''] and /doc/EOB/DETAIL/DETAILLINE/RCDATA/RCDATALINE/RC[.!
='']/following-sibling::*[.!='Y']">

My understanding of following-sibling::* is that the test is checking the 
(first RC element and it it's not '' (empty) and the following siblings 
(RCANSI, TRC, RCREDUCTION, RCOVERRIDE, RCMODIFIED) are = '' (empty)) 
AND
(first RC element and it it's not '' (empty) and the following siblings 
(RCANSI, TRC, RCREDUCTION, RCOVERRIDE, RCMODIFIED) are not = 'Y'.

With the values above the condition is met and a block of code executed but I 
don't understand how the first part of the test can be true since some of the 
following-siblings are not = ''.

Thanks,
Rita


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message