diff options
author | Chris Burdess <dog@bluezoo.org> | 2005-07-09 20:38:33 +0000 |
---|---|---|
committer | Chris Burdess <dog@bluezoo.org> | 2005-07-09 20:38:33 +0000 |
commit | 55e6004315b2ec5cf1d801689fb67e08ef58a500 (patch) | |
tree | 85b23bd63d20011c08122fa0ccf7862456c274b5 /javax/xml | |
parent | 7a86e8a0bcbada1881ab8c46560094e2b466b943 (diff) | |
download | classpath-55e6004315b2ec5cf1d801689fb67e08ef58a500.tar.gz |
2005-07-09 Chris Burdess <dog@gnu.org>
* gnu/xml/transform/AbstractNumberNode.java,
gnu/xml/transform/ApplyImportsNode.java,
gnu/xml/transform/ApplyTemplatesNode.java,
gnu/xml/transform/AttributeNode.java,
gnu/xml/transform/Bindings.java,
gnu/xml/transform/CallTemplateNode.java,
gnu/xml/transform/CopyOfNode.java,
gnu/xml/transform/CurrentFunction.java,
gnu/xml/transform/DocumentFunction.java,
gnu/xml/transform/ElementAvailableFunction.java,
gnu/xml/transform/ElementNode.java,
gnu/xml/transform/ForEachNode.java,
gnu/xml/transform/FormatNumberFunction.java,
gnu/xml/transform/FunctionAvailableFunction.java,
gnu/xml/transform/GenerateIdFunction.java,
gnu/xml/transform/IfNode.java,
gnu/xml/transform/KeyFunction.java,
gnu/xml/transform/ParameterNode.java,
gnu/xml/transform/SortKey.java,
gnu/xml/transform/StreamSerializer.java,
gnu/xml/transform/Stylesheet.java,
gnu/xml/transform/SystemPropertyFunction.java,
gnu/xml/transform/TemplateNode.java,
gnu/xml/transform/TransformerImpl.java,
gnu/xml/transform/UnparsedEntityUriFunction.java,
gnu/xml/transform/ValueOfNode.java,
gnu/xml/transform/WhenNode.java,
gnu/xml/transform/WithParam.java,
gnu/xml/xpath/AndExpr.java,
gnu/xml/xpath/ArithmeticExpr.java,
gnu/xml/xpath/BooleanFunction.java,
gnu/xml/xpath/CeilingFunction.java,
gnu/xml/xpath/ConcatFunction.java,
gnu/xml/xpath/Constant.java,
gnu/xml/xpath/ContainsFunction.java,
gnu/xml/xpath/CountFunction.java,
gnu/xml/xpath/EqualityExpr.java,
gnu/xml/xpath/Expr.java,
gnu/xml/xpath/FalseFunction.java,
gnu/xml/xpath/FloorFunction.java,
gnu/xml/xpath/FunctionCall.java,
gnu/xml/xpath/IdFunction.java,
gnu/xml/xpath/LangFunction.java,
gnu/xml/xpath/LastFunction.java,
gnu/xml/xpath/LocalNameFunction.java,
gnu/xml/xpath/NameFunction.java,
gnu/xml/xpath/NameTest.java,
gnu/xml/xpath/NamespaceTest.java,
gnu/xml/xpath/NamespaceUriFunction.java,
gnu/xml/xpath/NegativeExpr.java,
gnu/xml/xpath/NodeTypeTest.java,
gnu/xml/xpath/NormalizeSpaceFunction.java,
gnu/xml/xpath/NotFunction.java,
gnu/xml/xpath/NumberFunction.java,
gnu/xml/xpath/OrExpr.java,
gnu/xml/xpath/ParenthesizedExpr.java,
gnu/xml/xpath/Pattern.java,
gnu/xml/xpath/PositionFunction.java,
gnu/xml/xpath/Predicate.java,
gnu/xml/xpath/RelationalExpr.java,
gnu/xml/xpath/Root.java,
gnu/xml/xpath/RoundFunction.java,
gnu/xml/xpath/Selector.java,
gnu/xml/xpath/StartsWithFunction.java,
gnu/xml/xpath/Steps.java,
gnu/xml/xpath/StringFunction.java,
gnu/xml/xpath/StringLengthFunction.java,
gnu/xml/xpath/SubstringAfterFunction.java,
gnu/xml/xpath/SubstringBeforeFunction.java,
gnu/xml/xpath/SubstringFunction.java,
gnu/xml/xpath/SumFunction.java,
gnu/xml/xpath/Test.java,
gnu/xml/xpath/TranslateFunction.java,
gnu/xml/xpath/TrueFunction.java,
gnu/xml/xpath/UnionExpr.java,
gnu/xml/xpath/VariableReference.java,
gnu/xml/xpath/XPathParser.java,
gnu/xml/xpath/XPathParser.y,
javax/xml/namespace/QName.java: Corrections to handling of XSL
variables and minor conformance updates.
Diffstat (limited to 'javax/xml')
-rw-r--r-- | javax/xml/namespace/QName.java | 87 |
1 files changed, 49 insertions, 38 deletions
diff --git a/javax/xml/namespace/QName.java b/javax/xml/namespace/QName.java index 2e8d1243c..c1ec4519d 100644 --- a/javax/xml/namespace/QName.java +++ b/javax/xml/namespace/QName.java @@ -1,39 +1,40 @@ -/* QName.java -- - Copyright (C) 2004, 2005 Free Software Foundation, Inc. - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ +/* + * QName.java + * Copyright (C) 2004 The Free Software Foundation + * + * This file is part of GNU JAXP, a library. + * + * GNU JAXP is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * GNU JAXP is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Linking this library statically or dynamically with other modules is + * making a combined work based on this library. Thus, the terms and + * conditions of the GNU General Public License cover the whole + * combination. + * + * As a special exception, the copyright holders of this library give you + * permission to link this library with independent modules to produce an + * executable, regardless of the license terms of these independent + * modules, and to copy and distribute the resulting executable under + * terms of your choice, provided that you also meet, for each linked + * independent module, the terms and conditions of the license of that + * module. An independent module is a module which is not derived from + * or based on this library. If you modify this library, you may extend + * this exception to your version of the library, but you are not + * obliged to do so. If you do not wish to do so, delete this + * exception statement from your version. + */ package javax.xml.namespace; @@ -43,7 +44,7 @@ import javax.xml.XMLConstants; * An XML * <a href='http://www.w3.org/TR/REC-xml-names/#ns-qualnames'>qualified name</a>. * - * @author (a href='mailto:dog@gnu.org'>Chris Burdess</a) + * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a> * @since 1.3 */ public class QName @@ -53,6 +54,7 @@ public class QName private final String localPart; private final String prefix; private final String qName; + int hashCode = -1; public QName(String namespaceURI, String localPart) { @@ -126,7 +128,16 @@ public class QName public final int hashCode() { - return qName.hashCode(); + if (hashCode == -1) + { + StringBuffer buf = new StringBuffer(); + buf.append('{'); + buf.append(namespaceURI); + buf.append('}'); + buf.append(localPart); + hashCode = buf.toString().hashCode(); + } + return hashCode; } public String toString() |