diff options
| author | Mark Wielaard <mark@gcc.gnu.org> | 2006-03-10 21:46:48 +0000 |
|---|---|---|
| committer | Mark Wielaard <mark@gcc.gnu.org> | 2006-03-10 21:46:48 +0000 |
| commit | 8aa540d2f783474d1d2e06f16744bf67b9c1facc (patch) | |
| tree | ea38c56431c5d4528fb54254c3f8e50f517bede3 /libjava/classpath/gnu/xml/transform/DocumentFunction.java | |
| parent | 27079765d00123f8e53d0e1ef7f9d46559266e6d (diff) | |
| download | gcc-8aa540d2f783474d1d2e06f16744bf67b9c1facc.tar.gz | |
Imported GNU Classpath 0.90
Imported GNU Classpath 0.90
* scripts/makemake.tcl: Set gnu/java/awt/peer/swing to ignore.
* gnu/classpath/jdwp/VMFrame.java (SIZE): New constant.
* java/lang/VMCompiler.java: Use gnu.java.security.hash.MD5.
* java/lang/Math.java: New override file.
* java/lang/Character.java: Merged from Classpath.
(start, end): Now 'int's.
(canonicalName): New field.
(CANONICAL_NAME, NO_SPACES_NAME, CONSTANT_NAME): New constants.
(UnicodeBlock): Added argument.
(of): New overload.
(forName): New method.
Updated unicode blocks.
(sets): Updated.
* sources.am: Regenerated.
* Makefile.in: Likewise.
From-SVN: r111942
Diffstat (limited to 'libjava/classpath/gnu/xml/transform/DocumentFunction.java')
| -rw-r--r-- | libjava/classpath/gnu/xml/transform/DocumentFunction.java | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/libjava/classpath/gnu/xml/transform/DocumentFunction.java b/libjava/classpath/gnu/xml/transform/DocumentFunction.java index d8f6090be66..29f3d4a4598 100644 --- a/libjava/classpath/gnu/xml/transform/DocumentFunction.java +++ b/libjava/classpath/gnu/xml/transform/DocumentFunction.java @@ -126,9 +126,7 @@ final class DocumentFunction Object arg1 = values.get(0); Object arg2 = values.get(1); if (!(arg2 instanceof Collection)) - { - throw new RuntimeException("second argument is not a node-set"); - } + throw new RuntimeException("second argument is not a node-set"); Collection arg2ns = (Collection) arg2; String base2 = arg2ns.isEmpty() ? null : ((Node) arg2ns.iterator().next()).getBaseURI(); @@ -166,9 +164,7 @@ final class DocumentFunction Collection document(String uri, String base) { if ("".equals(uri) || uri == null) - { - uri = this.base.getBaseURI(); - } + uri = this.base.getBaseURI(); // Get fragment Expr fragment = null; @@ -197,10 +193,10 @@ final class DocumentFunction source = resolver.resolveDOM(null, base, uri); } Node node = source.getNode(); + // Strip whitespace + TransformerImpl.strip(stylesheet, node); if (fragment == null) - { - return Collections.singleton(node); - } + return Collections.singleton(node); else { Object ret = fragment.evaluate(node, 1, 1); @@ -216,9 +212,7 @@ final class DocumentFunction { String msg = "can't open " + uri; if (base != null) - { - msg += " with base " + base; - } + msg += " with base " + base; throw new RuntimeException(msg); } } @@ -227,16 +221,12 @@ final class DocumentFunction { Stylesheet s = stylesheet; if (context instanceof Stylesheet) - { - s = (Stylesheet) context; - } + s = (Stylesheet) context; DocumentFunction f = new DocumentFunction(s, base); int len = args.size(); List args2 = new ArrayList(len); for (int i = 0; i < len; i++) - { - args2.add(((Expr) args.get(i)).clone(context)); - } + args2.add(((Expr) args.get(i)).clone(context)); f.setArguments(args2); return f; } @@ -246,9 +236,7 @@ final class DocumentFunction for (Iterator i = args.iterator(); i.hasNext(); ) { if (((Expr) i.next()).references(var)) - { - return true; - } + return true; } return false; } |
