]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Simpler and more robust XPath statements.
authorJeremias Maerki <jeremias@apache.org>
Sat, 12 Feb 2005 20:20:53 +0000 (20:20 +0000)
committerJeremias Maerki <jeremias@apache.org>
Sat, 12 Feb 2005 20:20:53 +0000 (20:20 +0000)
Suggested by: Simon Pepping

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198427 13f79535-47bb-0310-9956-ffa450edef68

test/layoutengine/testcases/breaks1.xml
test/layoutengine/testcases/breaks2.xml

index 758a2b1bbe6401bbe8a33036ee84490247ac8536..d0a5d8734368222793b442d5010f3da19eafa3a7 100644 (file)
     </fo:root>
   </fo>
   <checks>
-    <eval expected="1" xpath="//text[. = 'line1']/../../../../../../../../../@nr"/>
-    <eval expected="2" xpath="//text[. = 'line2']/../../../../../../../../../@nr"/>
-    <eval expected="2" xpath="//text[. = 'line3']/../../../../../../../../../@nr"/>
-    <eval expected="3" xpath="//text[. = 'line4']/../../../../../../../../../@nr"/>
-    <eval expected="3" xpath="//text[. = 'line5']/../../../../../../../../../@nr"/>
-    <eval expected="4" xpath="//text[. = 'line6']/../../../../../../../../../@nr"/>
-    <eval expected="4" xpath="//text[. = 'line7']/../../../../../../../../../@nr"/>
-    <eval expected="6" xpath="//text[. = 'line8']/../../../../../../../../../@nr"/>
-    <eval expected="6" xpath="//text[. = 'line9']/../../../../../../../../../@nr"/>
-    <eval expected="7" xpath="//text[. = 'line10']/../../../../../../../../../@nr"/>
-    <eval expected="7" xpath="//text[. = 'line11']/../../../../../../../../../@nr"/>
-    <eval expected="9" xpath="//text[. = 'line12']/../../../../../../../../../@nr"/>
-    <eval expected="9" xpath="//text[. = 'line13']/../../../../../../../../../@nr"/>
+    <eval expected="1" xpath="//lineArea[. = 'line1']/ancestor::pageViewport/@nr"/>
+    <eval expected="2" xpath="//lineArea[. = 'line2']/ancestor::pageViewport/@nr"/>
+    <eval expected="2" xpath="//lineArea[. = 'line3']/ancestor::pageViewport/@nr"/>
+    <eval expected="3" xpath="//lineArea[. = 'line4']/ancestor::pageViewport/@nr"/>
+    <eval expected="3" xpath="//lineArea[. = 'line5']/ancestor::pageViewport/@nr"/>
+    <eval expected="4" xpath="//lineArea[. = 'line6']/ancestor::pageViewport/@nr"/>
+    <eval expected="4" xpath="//lineArea[. = 'line7']/ancestor::pageViewport/@nr"/>
+    <eval expected="6" xpath="//lineArea[. = 'line8']/ancestor::pageViewport/@nr"/>
+    <eval expected="6" xpath="//lineArea[. = 'line9']/ancestor::pageViewport/@nr"/>
+    <eval expected="7" xpath="//lineArea[. = 'line10']/ancestor::pageViewport/@nr"/>
+    <eval expected="7" xpath="//lineArea[. = 'line11']/ancestor::pageViewport/@nr"/>
+    <eval expected="9" xpath="//lineArea[. = 'line12']/ancestor::pageViewport/@nr"/>
+    <eval expected="9" xpath="//lineArea[. = 'line13']/ancestor::pageViewport/@nr"/>
   </checks>
 </testcase>
index 9a259df9b907c3ef9ce2896e7a3feec0b9a33933..943152afdea50dd7a7b025870f9654ccf1ff9039 100644 (file)
     </fo:root>
   </fo>
   <checks>
-    <eval expected="1" xpath="//text[. = 'line1']/../../../../../../../../../@nr"/>
-    <eval expected="2" xpath="//text[. = 'line2']/../../../../../../../../../@nr"/>
-    <eval expected="2" xpath="//text[. = 'line3']/../../../../../../../../../@nr"/>
-    <eval expected="3" xpath="//text[. = 'line4']/../../../../../../../../../@nr"/>
-    <eval expected="3" xpath="//text[. = 'line5']/../../../../../../../../../@nr"/>
-    <eval expected="4" xpath="//text[. = 'line6']/../../../../../../../../../@nr"/>
-    <eval expected="4" xpath="//text[. = 'line7']/../../../../../../../../../@nr"/>
-    <eval expected="6" xpath="//text[. = 'line8']/../../../../../../../../../@nr"/>
-    <eval expected="6" xpath="//text[. = 'line9']/../../../../../../../../../@nr"/>
-    <eval expected="7" xpath="//text[. = 'line10']/../../../../../../../../../@nr"/>
-    <eval expected="7" xpath="//text[. = 'line11']/../../../../../../../../../@nr"/>
-    <eval expected="9" xpath="//text[. = 'line12']/../../../../../../../../../@nr"/>
-    <eval expected="9" xpath="//text[. = 'line13']/../../../../../../../../../@nr"/>
+    <eval expected="1" xpath="//lineArea[. = 'line1']/ancestor::pageViewport/@nr"/>
+    <eval expected="2" xpath="//lineArea[. = 'line2']/ancestor::pageViewport/@nr"/>
+    <eval expected="2" xpath="//lineArea[. = 'line3']/ancestor::pageViewport/@nr"/>
+    <eval expected="3" xpath="//lineArea[. = 'line4']/ancestor::pageViewport/@nr"/>
+    <eval expected="3" xpath="//lineArea[. = 'line5']/ancestor::pageViewport/@nr"/>
+    <eval expected="4" xpath="//lineArea[. = 'line6']/ancestor::pageViewport/@nr"/>
+    <eval expected="4" xpath="//lineArea[. = 'line7']/ancestor::pageViewport/@nr"/>
+    <eval expected="6" xpath="//lineArea[. = 'line8']/ancestor::pageViewport/@nr"/>
+    <eval expected="6" xpath="//lineArea[. = 'line9']/ancestor::pageViewport/@nr"/>
+    <eval expected="7" xpath="//lineArea[. = 'line10']/ancestor::pageViewport/@nr"/>
+    <eval expected="7" xpath="//lineArea[. = 'line11']/ancestor::pageViewport/@nr"/>
+    <eval expected="9" xpath="//lineArea[. = 'line12']/ancestor::pageViewport/@nr"/>
+    <eval expected="9" xpath="//lineArea[. = 'line13']/ancestor::pageViewport/@nr"/>
   </checks>
 </testcase>