]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Removed temporary debug code.
authorJeremias Maerki <jeremias@apache.org>
Wed, 13 Aug 2008 06:56:32 +0000 (06:56 +0000)
committerJeremias Maerki <jeremias@apache.org>
Wed, 13 Aug 2008 06:56:32 +0000 (06:56 +0000)
Switched tests to changed namespace URI for document navigation.
Added IF checks for fox:destionation.

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

test/java/org/apache/fop/layoutengine/EvalCheck.java
test/layoutengine/standard-testcases/bookmarks_1.xml
test/layoutengine/standard-testcases/fox_destination_1.xml

index 01804d55e05a200369882185e01020e96b3ed63f..32d9e689b03318141fea05ebe46556949d17b484 100644 (file)
@@ -62,7 +62,7 @@ public class EvalCheck implements LayoutEngineCheck, IFCheck {
         if (nd != null) {
             this.tolerance = Double.parseDouble(nd.getNodeValue());
         }
-        this.prefixResolver = new MyPrefixResolver(new PrefixResolverDefault(node));
+        this.prefixResolver = new PrefixResolverDefault(node);
     }
 
     /** {@inheritDoc} */
@@ -105,40 +105,4 @@ public class EvalCheck implements LayoutEngineCheck, IFCheck {
         return "XPath: " + xpath;
     }
 
-    private static class MyPrefixResolver implements PrefixResolver {
-
-        private PrefixResolver delegate;
-
-        public MyPrefixResolver(PrefixResolver delegate) {
-            this.delegate = delegate;
-        }
-
-        /** {@inheritDoc} */
-        public String getBaseIdentifier() {
-            String s = delegate.getBaseIdentifier();
-            System.out.println(s);
-            return s;
-        }
-
-        /** {@inheritDoc} */
-        public String getNamespaceForPrefix(String prefix) {
-            String s = delegate.getNamespaceForPrefix(prefix);
-            System.out.println(s);
-            return s;
-        }
-
-        /** {@inheritDoc} */
-        public String getNamespaceForPrefix(String prefix, Node context) {
-            String s = delegate.getNamespaceForPrefix(prefix, context);
-            System.out.println(s);
-            return s;
-        }
-
-        /** {@inheritDoc} */
-        public boolean handlesNullPrefixes() {
-            return delegate.handlesNullPrefixes();
-        }
-
-    }
-
 }
index 36214e204a21d601dcc9eeb15a5b4988cd4cd844..b4aa0990dc5dea661b11264011abb0736997e666 100644 (file)
     <eval expected="(P2,chapter2-sec1)" xpath="//bookmarkTree/bookmark[2]/bookmark[1]/@internal-link"/>
     <eval expected="(P2,chapter2-sec2)" xpath="//bookmarkTree/bookmark[2]/bookmark[2]/@internal-link"/>
   </checks>
-  <if-checks xmlns:bm="http://xmlgraphics.apache.org/fop/intermediate/bookmarks">
-    <eval expected="show" xpath="//bm:bookmark-tree/bm:bookmark[1]/@starting-state"/>
-    <eval expected="Chapter 1" xpath="//bm:bookmark-tree/bm:bookmark[1]/@title"/>
-    <eval expected="0" xpath="//bm:bookmark-tree/bm:bookmark[1]/bm:goto-xy/@page-index"/>
-    <eval expected="20000" xpath="//bm:bookmark-tree/bm:bookmark[1]/bm:goto-xy/@x"/>
-    <eval expected="20000" xpath="//bm:bookmark-tree/bm:bookmark[1]/bm:goto-xy/@y"/>
+  <if-checks xmlns:n="http://xmlgraphics.apache.org/fop/intermediate/document-navigation">
+    <eval expected="show" xpath="//n:bookmark-tree/n:bookmark[1]/@starting-state"/>
+    <eval expected="Chapter 1" xpath="//n:bookmark-tree/n:bookmark[1]/@title"/>
+    <eval expected="0" xpath="//n:bookmark-tree/n:bookmark[1]/n:goto-xy/@page-index"/>
+    <eval expected="20000" xpath="//n:bookmark-tree/n:bookmark[1]/n:goto-xy/@x"/>
+    <eval expected="20000" xpath="//n:bookmark-tree/n:bookmark[1]/n:goto-xy/@y"/>
 
-    <eval expected="hide" xpath="//bm:bookmark-tree/bm:bookmark[2]/@starting-state"/>
-    <eval expected="Chapter 2" xpath="//bm:bookmark-tree/bm:bookmark[2]/@title"/>
-    <eval expected="1" xpath="//bm:bookmark-tree/bm:bookmark[2]/bm:goto-xy/@page-index"/>
-    <eval expected="20000" xpath="//bm:bookmark-tree/bm:bookmark[2]/bm:goto-xy/@x"/>
-    <eval expected="20000" xpath="//bm:bookmark-tree/bm:bookmark[2]/bm:goto-xy/@y"/>
+    <eval expected="hide" xpath="//n:bookmark-tree/n:bookmark[2]/@starting-state"/>
+    <eval expected="Chapter 2" xpath="//n:bookmark-tree/n:bookmark[2]/@title"/>
+    <eval expected="1" xpath="//n:bookmark-tree/n:bookmark[2]/n:goto-xy/@page-index"/>
+    <eval expected="20000" xpath="//n:bookmark-tree/n:bookmark[2]/n:goto-xy/@x"/>
+    <eval expected="20000" xpath="//n:bookmark-tree/n:bookmark[2]/n:goto-xy/@y"/>
 
-    <eval expected="show" xpath="//bm:bookmark-tree/bm:bookmark[2]/bm:bookmark[1]/@starting-state"/>
-    <eval expected="Section 1" xpath="//bm:bookmark-tree/bm:bookmark[2]/bm:bookmark[1]/@title"/>
-    <eval expected="1" xpath="//bm:bookmark-tree/bm:bookmark[2]/bm:bookmark[1]/bm:goto-xy/@page-index"/>
-    <eval expected="20000" xpath="//bm:bookmark-tree/bm:bookmark[2]/bm:bookmark[1]/bm:goto-xy/@x"/>
-    <eval expected="51680" xpath="//bm:bookmark-tree/bm:bookmark[2]/bm:bookmark[1]/bm:goto-xy/@y"/>
+    <eval expected="show" xpath="//n:bookmark-tree/n:bookmark[2]/n:bookmark[1]/@starting-state"/>
+    <eval expected="Section 1" xpath="//n:bookmark-tree/n:bookmark[2]/n:bookmark[1]/@title"/>
+    <eval expected="1" xpath="//n:bookmark-tree/n:bookmark[2]/n:bookmark[1]/n:goto-xy/@page-index"/>
+    <eval expected="20000" xpath="//n:bookmark-tree/n:bookmark[2]/n:bookmark[1]/n:goto-xy/@x"/>
+    <eval expected="51680" xpath="//n:bookmark-tree/n:bookmark[2]/n:bookmark[1]/n:goto-xy/@y"/>
     
-    <eval expected="show" xpath="//bm:bookmark-tree/bm:bookmark[3]/@starting-state"/>
-    <eval expected="Fixed Block Container" xpath="//bm:bookmark-tree/bm:bookmark[3]/@title"/>
-    <eval expected="1" xpath="//bm:bookmark-tree/bm:bookmark[3]/bm:goto-xy/@page-index"/>
-    <eval expected="216000" xpath="//bm:bookmark-tree/bm:bookmark[3]/bm:goto-xy/@x"/>
-    <eval expected="216000" xpath="//bm:bookmark-tree/bm:bookmark[3]/bm:goto-xy/@y"/>
+    <eval expected="show" xpath="//n:bookmark-tree/n:bookmark[3]/@starting-state"/>
+    <eval expected="Fixed Block Container" xpath="//n:bookmark-tree/n:bookmark[3]/@title"/>
+    <eval expected="1" xpath="//n:bookmark-tree/n:bookmark[3]/n:goto-xy/@page-index"/>
+    <eval expected="216000" xpath="//n:bookmark-tree/n:bookmark[3]/n:goto-xy/@x"/>
+    <eval expected="216000" xpath="//n:bookmark-tree/n:bookmark[3]/n:goto-xy/@y"/>
   </if-checks>
 </testcase>
index 54d6f7e720ee0756d5d42ad20e809cb0a28a7c35..401123dd5c7dc8d5132d7538026e6b5d0f9b26ed 100644 (file)
     <eval expected="(P2,chapter2-sec1)" xpath="//destination[3]/@internal-link"/>
     <eval expected="(P2,chapter2-sec2)" xpath="//destination[4]/@internal-link"/>
   </checks>
+  <if-checks xmlns:n="http://xmlgraphics.apache.org/fop/intermediate/document-navigation">
+    <eval expected="0" xpath="//n:named-destination[@name='chapter1']/n:goto-xy/@page-index"/>
+    <eval expected="0" xpath="//n:named-destination[@name='chapter1']/n:goto-xy/@x"/>
+    <eval expected="0" xpath="//n:named-destination[@name='chapter1']/n:goto-xy/@y"/>
+    
+    <eval expected="1" xpath="//n:named-destination[@name='chapter2']/n:goto-xy/@page-index"/>
+    <eval expected="0" xpath="//n:named-destination[@name='chapter2']/n:goto-xy/@x"/>
+    <eval expected="0" xpath="//n:named-destination[@name='chapter2']/n:goto-xy/@y"/>
+    
+    <eval expected="1" xpath="//n:named-destination[@name='chapter2-sec1']/n:goto-xy/@page-index"/>
+    <eval expected="0" xpath="//n:named-destination[@name='chapter2-sec1']/n:goto-xy/@x"/>
+    <eval expected="31680" xpath="//n:named-destination[@name='chapter2-sec1']/n:goto-xy/@y"/>
+
+    <eval expected="1" xpath="//n:named-destination[@name='chapter2-sec2']/n:goto-xy/@page-index"/>
+    <eval expected="0" xpath="//n:named-destination[@name='chapter2-sec2']/n:goto-xy/@x"/>
+    <eval expected="60480" xpath="//n:named-destination[@name='chapter2-sec2']/n:goto-xy/@y"/>
+  </if-checks>
 </testcase>