diff options
author | Jeremias Maerki <jeremias@apache.org> | 2006-05-18 12:44:15 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2006-05-18 12:44:15 +0000 |
commit | eb1ad60936a14f46c93fd97e64fc62a8c3d9d4e2 (patch) | |
tree | 64aee903db63f0864ec696bc32b6e62a5e10596a /src/java/org/apache/fop/util | |
parent | 436c9f26ea62ed151f38a5eaf4e5e69fa67afda1 (diff) | |
download | xmlgraphics-fop-eb1ad60936a14f46c93fd97e64fc62a8c3d9d4e2.tar.gz xmlgraphics-fop-eb1ad60936a14f46c93fd97e64fc62a8c3d9d4e2.zip |
Extended PageViewport to carry foreign attributes.
Foreign attributes from simple-page-master are transferred to the PageViewport.
Added foreign attributes handling in AreaTreeParser.
Fixed proper generation of foreign attributes in XMLRenderer.
EvalCheck extended so it can use namespace prefix mappings in its context.
Test case for foreign attributes.
Paper source/tray support for PCL (pcl:paper-source="<tray-code>" on s-p-m)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@407541 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/util')
-rw-r--r-- | src/java/org/apache/fop/util/QName.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/util/QName.java b/src/java/org/apache/fop/util/QName.java index ccfe05638..91c9ab812 100644 --- a/src/java/org/apache/fop/util/QName.java +++ b/src/java/org/apache/fop/util/QName.java @@ -54,6 +54,30 @@ public class QName implements Serializable { this.hashCode = toHashString().hashCode(); } + /** + * Main constructor. + * @param namespaceURI the namespace URI + * @param qName the qualified name + */ + public QName(String namespaceURI, String qName) { + if (qName == null) { + throw new NullPointerException("Parameter localName must not be null"); + } + if (qName.length() == 0) { + throw new IllegalArgumentException("Parameter localName must not be empty"); + } + this.namespaceURI = namespaceURI; + int p = qName.indexOf(':'); + if (p > 0) { + this.prefix = qName.substring(0, p); + this.localName = qName.substring(p + 1); + } else { + this.prefix = null; + this.localName = qName; + } + this.hashCode = toHashString().hashCode(); + } + /** @return the namespace URI */ public String getNamespaceURI() { return this.namespaceURI; |