aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo
diff options
context:
space:
mode:
authorJay Bryant <jbryant@apache.org>2007-04-01 14:46:38 +0000
committerJay Bryant <jbryant@apache.org>2007-04-01 14:46:38 +0000
commit35ff72dafabb125fccdfe8e0bcbec7470996fdb2 (patch)
tree13bbf41c648069f584d1509d93ca9138b87a2af7 /src/java/org/apache/fop/fo
parent13da3fc6ed957f04204fe0dca3c3e92512b5ad56 (diff)
downloadxmlgraphics-fop-35ff72dafabb125fccdfe8e0bcbec7470996fdb2.tar.gz
xmlgraphics-fop-35ff72dafabb125fccdfe8e0bcbec7470996fdb2.zip
changes to support named destination
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@524601 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo')
-rw-r--r--src/java/org/apache/fop/fo/ElementMappingRegistry.java1
-rw-r--r--src/java/org/apache/fop/fo/FONode.java1
-rw-r--r--src/java/org/apache/fop/fo/FOTreeBuilder.java9
3 files changed, 6 insertions, 5 deletions
diff --git a/src/java/org/apache/fop/fo/ElementMappingRegistry.java b/src/java/org/apache/fop/fo/ElementMappingRegistry.java
index 105a956a2..887fe8b55 100644
--- a/src/java/org/apache/fop/fo/ElementMappingRegistry.java
+++ b/src/java/org/apache/fop/fo/ElementMappingRegistry.java
@@ -90,7 +90,6 @@ public class ElementMappingRegistry {
*/
public void addElementMapping(String mappingClassName)
throws IllegalArgumentException {
-
try {
ElementMapping mapping
= (ElementMapping)Class.forName(mappingClassName).newInstance();
diff --git a/src/java/org/apache/fop/fo/FONode.java b/src/java/org/apache/fop/fo/FONode.java
index 91817b87f..baf964935 100644
--- a/src/java/org/apache/fop/fo/FONode.java
+++ b/src/java/org/apache/fop/fo/FONode.java
@@ -45,6 +45,7 @@ public abstract class FONode implements Cloneable {
/** the XSL-FO namespace URI */
protected static final String FO_URI = FOElementMapping.URI;
+ protected static final String FOX_URI = ExtensionElementMapping.URI;
/** Parent FO node */
protected FONode parent;
diff --git a/src/java/org/apache/fop/fo/FOTreeBuilder.java b/src/java/org/apache/fop/fo/FOTreeBuilder.java
index 4c754520d..2f1b53f1d 100644
--- a/src/java/org/apache/fop/fo/FOTreeBuilder.java
+++ b/src/java/org/apache/fop/fo/FOTreeBuilder.java
@@ -23,6 +23,7 @@ import java.io.OutputStream;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.apache.fop.fo.extensions.ExtensionElementMapping;
import org.apache.fop.apps.FOPException;
import org.apache.fop.apps.FOUserAgent;
import org.apache.fop.apps.FormattingResults;
@@ -296,9 +297,8 @@ public class FOTreeBuilder extends DefaultHandler {
+ " Please make sure you're producing a valid XSL-FO document.");
}
} else { // check that incoming node is valid for currentFObj
- if (namespaceURI.equals(FOElementMapping.URI)) {
- // currently no fox: elements to validate
- // || namespaceURI.equals(ExtensionElementMapping.URI) */) {
+ if (namespaceURI.equals(FOElementMapping.URI)
+ || namespaceURI.equals(ExtensionElementMapping.URI)) {
try {
currentFObj.validateChildNode(locator, namespaceURI, localName);
} catch (ValidationException e) {
@@ -368,7 +368,8 @@ public class FOTreeBuilder extends DefaultHandler {
throw new IllegalStateException(
"endElement() called for " + rawName
+ " where there is no current element.");
- } else if (!currentFObj.getLocalName().equals(localName)
+ } else
+ if (!currentFObj.getLocalName().equals(localName)
|| !currentFObj.getNamespaceURI().equals(uri)) {
log.warn("Mismatch: " + currentFObj.getLocalName()
+ " (" + currentFObj.getNamespaceURI()