diff options
Diffstat (limited to 'libjava/classpath/gnu/xml/transform/AttributeNode.java')
-rw-r--r-- | libjava/classpath/gnu/xml/transform/AttributeNode.java | 54 |
1 files changed, 16 insertions, 38 deletions
diff --git a/libjava/classpath/gnu/xml/transform/AttributeNode.java b/libjava/classpath/gnu/xml/transform/AttributeNode.java index 1e0eb1e961a..bc5bc30c9c1 100644 --- a/libjava/classpath/gnu/xml/transform/AttributeNode.java +++ b/libjava/classpath/gnu/xml/transform/AttributeNode.java @@ -1,5 +1,5 @@ /* AttributeNode.java -- - Copyright (C) 2004 Free Software Foundation, Inc. + Copyright (C) 2004,2006 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -75,13 +75,9 @@ final class AttributeNode namespace.clone(stylesheet), source); if (children != null) - { - ret.children = children.clone(stylesheet); - } + ret.children = children.clone(stylesheet); if (next != null) - { - ret.next = next.clone(stylesheet); - } + ret.next = next.clone(stylesheet); return ret; } @@ -113,9 +109,7 @@ final class AttributeNode // Use XPath string-value of fragment namespaceValue = Expr.stringValue(fragment); if (namespaceValue.length() == 0) - { - namespaceValue = null; - } + namespaceValue = null; } String prefix = getPrefix(nameValue); @@ -124,9 +118,7 @@ final class AttributeNode if (prefix != null) { if (XMLConstants.XML_NS_PREFIX.equals(prefix)) - { - namespaceValue = XMLConstants.XML_NS_URI; - } + namespaceValue = XMLConstants.XML_NS_URI; else { // Resolve namespace for this prefix @@ -153,9 +145,7 @@ final class AttributeNode // Resolve prefix for this namespace prefix = source.lookupPrefix(namespaceValue); if (prefix != null) - { - nameValue = prefix + ":" + nameValue; - } + nameValue = prefix + ":" + nameValue; else { if (namespaceValue != null) @@ -196,27 +186,19 @@ final class AttributeNode if (attrs != null) { if (namespace != null) - { - attrs.setNamedItemNS(attr); - } + attrs.setNamedItemNS(attr); else - { - attrs.setNamedItem(attr); - } + attrs.setNamedItem(attr); } if (children != null) - { - children.apply(stylesheet, mode, - context, pos, len, - attr, null); - } + children.apply(stylesheet, mode, + context, pos, len, + attr, null); } if (next != null) - { - next.apply(stylesheet, mode, - context, pos, len, - parent, nextSibling); - } + next.apply(stylesheet, mode, + context, pos, len, + parent, nextSibling); } final String getPrefix(String name) @@ -241,13 +223,9 @@ final class AttributeNode public boolean references(QName var) { if (name != null && name.references(var)) - { - return true; - } + return true; if (namespace != null && namespace.references(var)) - { - return true; - } + return true; return super.references(var); } |