From b6cd67bd3b033962d35295bb1426d2d0dcd31a68 Mon Sep 17 00:00:00 2001
From: Joe Wang
- * This method is exactly like error(String, Object[]); except that
- * the underlying TransformerException is
- * XpathStylesheetDOM3Exception (which extends TransformerException).
- *
- * So older XPath code in Xalan is not affected by this. To older XPath code
- * the behavior of whether error() or errorForDOM3() is called because it is
- * always catching TransformerException objects and is oblivious to
- * the new subclass of XPathStylesheetDOM3Exception. Older XPath code
- * runs as before.
- *
- * However, newer DOM3 XPath code upon catching a TransformerException can
- * can check if the exception is an instance of XPathStylesheetDOM3Exception
- * and take appropriate action.
- *
- * @param msg An error msgkey that corresponds to one of the constants found
- * in {@link com.sun.org.apache.xpath.internal.res.XPATHErrorResources}, which is
- * a key for a format string.
- * @param args An array of arguments represented in the format string, which
- * may be null.
- *
- * @throws TransformerException if the current ErrorListoner determines to
- * throw an exception.
- */
- void errorForDOM3(String msg, Object[] args) throws TransformerException
- {
-
- String fmsg = XSLMessages.createXPATHMessage(msg, args);
- ErrorListener ehandler = this.getErrorListener();
-
- TransformerException te = new XPathStylesheetDOM3Exception(fmsg, m_sourceLocator);
- if (null != ehandler)
- {
- // TO DO: Need to get stylesheet Locator from here.
- ehandler.fatalError(te);
- }
- else
- {
- // System.err.println(fmsg);
- throw te;
- }
- }
/**
* Dump the remaining token queue.
* Thanks to Craig for this.
diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/domapi/XPathEvaluatorImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/domapi/XPathEvaluatorImpl.java
deleted file mode 100644
index 096a232e3a5..00000000000
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/domapi/XPathEvaluatorImpl.java
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
- */
-/*
- * Copyright 2002-2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/*
- * $Id: XPathEvaluatorImpl.java,v 1.2.4.1 2005/09/10 04:04:07 jeffsuttor Exp $
- */
-
-package com.sun.org.apache.xpath.internal.domapi;
-
-import javax.xml.transform.TransformerException;
-
-import com.sun.org.apache.xml.internal.utils.PrefixResolver;
-import com.sun.org.apache.xpath.internal.XPath;
-import com.sun.org.apache.xpath.internal.res.XPATHErrorResources;
-import com.sun.org.apache.xpath.internal.res.XPATHMessages;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.xpath.XPathEvaluator;
-import org.w3c.dom.xpath.XPathException;
-import org.w3c.dom.xpath.XPathExpression;
-import org.w3c.dom.xpath.XPathNSResolver;
-
-/**
- *
- * The class provides an implementation of XPathEvaluator according
- * to the DOM L3 XPath Specification, Working Group Note 26 February 2004.
- *
- * See also the Document Object Model (DOM) Level 3 XPath Specification.
XPathEvaluator
, which will provide evaluation of XPath 1.0
- * expressions with no specialized extension functions or variables. It is
- * expected that the XPathEvaluator
interface will be
- * implemented on the same object which implements the Document
- * interface in an implementation which supports the XPath DOM module.
- * XPathEvaluator
implementations may be available from other
- * sources that may provide support for special extension functions or
- * variables which are not defined in this specification.
- *
- * @see org.w3c.dom.xpath.XPathEvaluator
- *
- * @xsl.usage internal
- */
-public final class XPathEvaluatorImpl implements XPathEvaluator {
-
- /**
- * This prefix resolver is created whenever null is passed to the
- * evaluate method. Its purpose is to satisfy the DOM L3 XPath API
- * requirement that if a null prefix resolver is used, an exception
- * should only be thrown when an attempt is made to resolve a prefix.
- */
- private class DummyPrefixResolver implements PrefixResolver {
-
- /**
- * Constructor for DummyPrefixResolver.
- */
- DummyPrefixResolver() {}
-
- /**
- * @exception DOMException
- * NAMESPACE_ERR: Always throws this exceptionn
- *
- * @see com.sun.org.apache.xml.internal.utils.PrefixResolver#getNamespaceForPrefix(String, Node)
- */
- public String getNamespaceForPrefix(String prefix, Node context) {
- String fmsg = XPATHMessages.createXPATHMessage(XPATHErrorResources.ER_NULL_RESOLVER, null);
- throw new DOMException(DOMException.NAMESPACE_ERR, fmsg); // Unable to resolve prefix with null prefix resolver.
- }
-
- /**
- * @exception DOMException
- * NAMESPACE_ERR: Always throws this exceptionn
- *
- * @see com.sun.org.apache.xml.internal.utils.PrefixResolver#getNamespaceForPrefix(String)
- */
- public String getNamespaceForPrefix(String prefix) {
- return getNamespaceForPrefix(prefix,null);
- }
-
- /**
- * @see com.sun.org.apache.xml.internal.utils.PrefixResolver#handlesNullPrefixes()
- */
- public boolean handlesNullPrefixes() {
- return false;
- }
-
- /**
- * @see com.sun.org.apache.xml.internal.utils.PrefixResolver#getBaseIdentifier()
- */
- public String getBaseIdentifier() {
- return null;
- }
-
- }
-
- /**
- * The document to be searched to parallel the case where the XPathEvaluator
- * is obtained by casting a Document.
- */
- private final Document m_doc;
-
- /**
- * Constructor for XPathEvaluatorImpl.
- *
- * @param doc The document to be searched, to parallel the case where''
- * the XPathEvaluator is obtained by casting the document.
- */
- public XPathEvaluatorImpl(Document doc) {
- m_doc = doc;
- }
-
- /**
- * Constructor in the case that the XPath expression can be evaluated
- * without needing an XML document at all.
- *
- */
- public XPathEvaluatorImpl() {
- m_doc = null;
- }
-
- /**
- * Creates a parsed XPath expression with resolved namespaces. This is
- * useful when an expression will be reused in an application since it
- * makes it possible to compile the expression string into a more
- * efficient internal form and preresolve all namespace prefixes which
- * occur within the expression.
- *
- * @param expression The XPath expression string to be parsed.
- * @param resolver The resolver
permits translation of
- * prefixes within the XPath expression into appropriate namespace URIs
- * . If this is specified as null
, any namespace prefix
- * within the expression will result in DOMException
- * being thrown with the code NAMESPACE_ERR
.
- * @return The compiled form of the XPath expression.
- * @exception XPathException
- * INVALID_EXPRESSION_ERR: Raised if the expression is not legal
- * according to the rules of the XPathEvaluator
i
- * @exception DOMException
- * NAMESPACE_ERR: Raised if the expression contains namespace prefixes
- * which cannot be resolved by the specified
- * XPathNSResolver
.
- *
- * @see org.w3c.dom.xpath.XPathEvaluator#createExpression(String, XPathNSResolver)
- */
- public XPathExpression createExpression(
- String expression,
- XPathNSResolver resolver)
- throws XPathException, DOMException {
-
- try {
-
- // If the resolver is null, create a dummy prefix resolver
- XPath xpath = new XPath(expression,null,
- ((null == resolver) ? new DummyPrefixResolver() : ((PrefixResolver)resolver)),
- XPath.SELECT);
-
- return new XPathExpressionImpl(xpath, m_doc);
-
- } catch (TransformerException e) {
- // Need to pass back exception code DOMException.NAMESPACE_ERR also.
- // Error found in DOM Level 3 XPath Test Suite.
- if(e instanceof XPathStylesheetDOM3Exception)
- throw new DOMException(DOMException.NAMESPACE_ERR,e.getMessageAndLocation());
- else
- throw new XPathException(XPathException.INVALID_EXPRESSION_ERR,e.getMessageAndLocation());
-
- }
- }
-
- /**
- * Adapts any DOM node to resolve namespaces so that an XPath expression
- * can be easily evaluated relative to the context of the node where it
- * appeared within the document. This adapter works like the DOM Level 3
- * method lookupNamespaceURI
on nodes in resolving the
- * namespaceURI from a given prefix using the current information available
- * in the node's hierarchy at the time lookupNamespaceURI is called, also
- * correctly resolving the implicit xml prefix.
- *
- * @param nodeResolver The node to be used as a context for namespace
- * resolution.
- * @return XPathNSResolver
which resolves namespaces with
- * respect to the definitions in scope for a specified node.
- *
- * @see org.w3c.dom.xpath.XPathEvaluator#createNSResolver(Node)
- */
- public XPathNSResolver createNSResolver(Node nodeResolver) {
-
- return new XPathNSResolverImpl((nodeResolver.getNodeType() == Node.DOCUMENT_NODE)
- ? ((Document) nodeResolver).getDocumentElement() : nodeResolver);
- }
-
- /**
- * Evaluates an XPath expression string and returns a result of the
- * specified type if possible.
- *
- * @param expression The XPath expression string to be parsed and
- * evaluated.
- * @param contextNode The context
is context node for the
- * evaluation of this XPath expression. If the XPathEvaluator was
- * obtained by casting the Document
then this must be
- * owned by the same document and must be a Document
,
- * Element
, Attribute
, Text
,
- * CDATASection
, Comment
,
- * ProcessingInstruction
, or XPathNamespace
- * node. If the context node is a Text
or a
- * CDATASection
, then the context is interpreted as the
- * whole logical text node as seen by XPath, unless the node is empty
- * in which case it may not serve as the XPath context.
- * @param resolver The resolver
permits translation of
- * prefixes within the XPath expression into appropriate namespace URIs
- * . If this is specified as null
, any namespace prefix
- * within the expression will result in DOMException
- * being thrown with the code NAMESPACE_ERR
.
- * @param type If a specific type
is specified, then the
- * result will be coerced to return the specified type relying on
- * XPath type conversions and fail if the desired coercion is not
- * possible. This must be one of the type codes of
- * XPathResult
.
- * @param result The result
specifies a specific result
- * object which may be reused and returned by this method. If this is
- * specified as null
or the implementation does not reuse
- * the specified result, a new result object will be constructed and
- * returned.For XPath 1.0 results, this object will be of type
- * XPathResult
.
- * @return The result of the evaluation of the XPath expression.For XPath
- * 1.0 results, this object will be of type XPathResult
.
- * @exception XPathException
- * INVALID_EXPRESSION_ERR: Raised if the expression is not legal
- * according to the rules of the XPathEvaluator
i
- * XPathNSResolver
.
- * See also the Document Object Model (DOM) Level 3 XPath Specification.
- * - *The XPathExpression
interface represents a parsed and resolved
- * XPath expression.
See also the Document Object Model (DOM) Level 3 XPath Specification.
- * - *Evaluates this XPath expression and returns a result.
- * @param contextNode Thecontext
is context node for the
- * evaluation of this XPath expression.If the XPathEvaluator was
- * obtained by casting the Document
then this must be
- * owned by the same document and must be a Document
,
- * Element
, Attribute
, Text
,
- * CDATASection
, Comment
,
- * ProcessingInstruction
, or XPathNamespace
- * node.If the context node is a Text
or a
- * CDATASection
, then the context is interpreted as the
- * whole logical text node as seen by XPath, unless the node is empty
- * in which case it may not serve as the XPath context.
- * @param type If a specific type
is specified, then the
- * result will be coerced to return the specified type relying on
- * XPath conversions and fail if the desired coercion is not possible.
- * This must be one of the type codes of XPathResult
.
- * @param result The result
specifies a specific result
- * object which may be reused and returned by this method. If this is
- * specified as null
or the implementation does not reuse
- * the specified result, a new result object will be constructed and
- * returned.For XPath 1.0 results, this object will be of type
- * XPathResult
.
- * @return The result of the evaluation of the XPath expression.For XPath
- * 1.0 results, this object will be of type XPathResult
.
- * @exception XPathException
- * TYPE_ERR: Raised if the result cannot be converted to return the
- * specified type.
- * @exception DOMException
- * WRONG_DOCUMENT_ERR: The Node is from a document that is not supported
- * by the XPathEvaluator that created this
- * XPathExpression
.
- * See also the Document Object Model (DOM) Level 3 XPath Specification.
- * - *The XPathNSResolver
interface permit prefix
- * strings in the expression to be properly bound to
- * namespaceURI
strings. XPathEvaluator
can
- * construct an implementation of XPathNSResolver
from a node,
- * or the interface may be implemented by any application.
XPathNamespace
interface is returned by
- * XPathResult
interfaces to represent the XPath namespace node
- * type that DOM lacks. There is no public constructor for this node type.
- * Attempts to place it into a hierarchy or a NamedNodeMap result in a
- * DOMException
with the code HIERARCHY_REQUEST_ERR
- * . This node is read only, so methods or setting of attributes that would
- * mutate the node result in a DOMException with the code
- * NO_MODIFICATION_ALLOWED_ERR
.
- * The core specification describes attributes of the Node
- * interface that are different for different node node types but does not
- * describe XPATH_NAMESPACE_NODE
, so here is a description of
- * those attributes for this node type. All attributes of Node
- * not described in this section have a null
or
- * false
value.
- *
ownerDocument
matches the ownerDocument
of the
- * ownerElement
even if the element is later adopted.
- *
prefix
is the prefix of the namespace represented by the
- * node.
- *
nodeName
is the same as prefix
.
- *
nodeType
is equal to XPATH_NAMESPACE_NODE
.
- *
namespaceURI
is the namespace URI of the namespace
- * represented by the node.
- *
adoptNode
, cloneNode
, and
- * importNode
fail on this node type by raising a
- * DOMException
with the code NOT_SUPPORTED_ERR
.In
- * future versions of the XPath specification, the definition of a namespace
- * node may be changed incomatibly, in which case incompatible changes to
- * field values may be required to implement versions beyond XPath 1.0.
- *
See also the Document Object Model (DOM) Level 3 XPath Specification. - * - * This implementation wraps the DOM attribute node that contained the - * namespace declaration. - * @xsl.usage internal - */ - -class XPathNamespaceImpl implements XPathNamespace { - - // Node that XPathNamespaceImpl wraps - final private Node m_attributeNode; - - /** - * Constructor for XPathNamespaceImpl. - */ - XPathNamespaceImpl(Node node) { - m_attributeNode = node; - } - - /** - * @see com.sun.org.apache.xalan.internal.dom3.xpath.XPathNamespace#getOwnerElement() - */ - public Element getOwnerElement() { - return ((Attr)m_attributeNode).getOwnerElement(); - } - - /** - * @see org.w3c.dom.Node#getNodeName() - */ - public String getNodeName() { - return "#namespace"; - } - - /** - * @see org.w3c.dom.Node#getNodeValue() - */ - public String getNodeValue() throws DOMException { - return m_attributeNode.getNodeValue(); - } - - /** - * @see org.w3c.dom.Node#setNodeValue(String) - */ - public void setNodeValue(String arg0) throws DOMException { - } - - /** - * @see org.w3c.dom.Node#getNodeType() - */ - public short getNodeType() { - return XPathNamespace.XPATH_NAMESPACE_NODE; - } - - /** - * @see org.w3c.dom.Node#getParentNode() - */ - public Node getParentNode() { - return m_attributeNode.getParentNode(); - } - - /** - * @see org.w3c.dom.Node#getChildNodes() - */ - public NodeList getChildNodes() { - return m_attributeNode.getChildNodes(); - } - - /** - * @see org.w3c.dom.Node#getFirstChild() - */ - public Node getFirstChild() { - return m_attributeNode.getFirstChild(); - } - - /** - * @see org.w3c.dom.Node#getLastChild() - */ - public Node getLastChild() { - return m_attributeNode.getLastChild(); - } - - /** - * @see org.w3c.dom.Node#getPreviousSibling() - */ - public Node getPreviousSibling() { - return m_attributeNode.getPreviousSibling(); - } - - /** - * @see org.w3c.dom.Node#getNextSibling() - */ - public Node getNextSibling() { - return m_attributeNode.getNextSibling(); - } - - /** - * @see org.w3c.dom.Node#getAttributes() - */ - public NamedNodeMap getAttributes() { - return m_attributeNode.getAttributes(); - } - - /** - * @see org.w3c.dom.Node#getOwnerDocument() - */ - public Document getOwnerDocument() { - return m_attributeNode.getOwnerDocument(); - } - - /** - * @see org.w3c.dom.Node#insertBefore(Node, Node) - */ - public Node insertBefore(Node arg0, Node arg1) throws DOMException { - return null; - } - - /** - * @see org.w3c.dom.Node#replaceChild(Node, Node) - */ - public Node replaceChild(Node arg0, Node arg1) throws DOMException { - return null; - } - - /** - * @see org.w3c.dom.Node#removeChild(Node) - */ - public Node removeChild(Node arg0) throws DOMException { - return null; - } - - /** - * @see org.w3c.dom.Node#appendChild(Node) - */ - public Node appendChild(Node arg0) throws DOMException { - return null; - } - - /** - * @see org.w3c.dom.Node#hasChildNodes() - */ - public boolean hasChildNodes() { - return false; - } - - /** - * @see org.w3c.dom.Node#cloneNode(boolean) - */ - public Node cloneNode(boolean arg0) { - throw new DOMException(DOMException.NOT_SUPPORTED_ERR,null); - } - - /** - * @see org.w3c.dom.Node#normalize() - */ - public void normalize() { - m_attributeNode.normalize(); - } - - /** - * @see org.w3c.dom.Node#isSupported(String, String) - */ - public boolean isSupported(String arg0, String arg1) { - return m_attributeNode.isSupported(arg0, arg1); - } - - /** - * @see org.w3c.dom.Node#getNamespaceURI() - */ - public String getNamespaceURI() { - - // For namespace node, the namespaceURI is the namespace URI - // of the namespace represented by the node. - return m_attributeNode.getNodeValue(); - } - - /** - * @see org.w3c.dom.Node#getPrefix() - */ - public String getPrefix() { - return m_attributeNode.getPrefix(); - } - - /** - * @see org.w3c.dom.Node#setPrefix(String) - */ - public void setPrefix(String arg0) throws DOMException { - } - - /** - * @see org.w3c.dom.Node#getLocalName() - */ - public String getLocalName() { - - // For namespace node, the local name is the same as the prefix - return m_attributeNode.getPrefix(); - } - - /** - * @see org.w3c.dom.Node#hasAttributes() - */ - public boolean hasAttributes() { - return m_attributeNode.hasAttributes(); - } - - public String getBaseURI ( ) { - return null; - } - - public short compareDocumentPosition(Node other) throws DOMException { - return 0; - } - - private String textContent; - - public String getTextContent() throws DOMException { - return textContent; - } - - public void setTextContent(String textContent) throws DOMException { - this.textContent = textContent; - } - - public boolean isSameNode(Node other) { - return false; - } - - public String lookupPrefix(String namespaceURI) { - return ""; //PENDING - } - - public boolean isDefaultNamespace(String namespaceURI) { - return false; - } - - public String lookupNamespaceURI(String prefix) { - return null; - } - - public boolean isEqualNode(Node arg) { - return false; - } - - public Object getFeature(String feature, String version) { - return null; //PENDING - } - - public Object setUserData(String key, - Object data, - UserDataHandler handler) { - return null; //PENDING - } - - public Object getUserData(String key) { - return null; - } -} diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/domapi/XPathResultImpl.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/domapi/XPathResultImpl.java deleted file mode 100644 index 76576f4cc51..00000000000 --- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/domapi/XPathResultImpl.java +++ /dev/null @@ -1,512 +0,0 @@ -/* - * reserved comment block - * DO NOT REMOVE OR ALTER! - */ -/* - * Copyright 2002-2005 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/* - * $Id: XPathResultImpl.java,v 1.2.4.1 2005/09/10 04:18:54 jeffsuttor Exp $ - */ - - -package com.sun.org.apache.xpath.internal.domapi; - -import javax.xml.transform.TransformerException; - -import com.sun.org.apache.xpath.internal.XPath; -import com.sun.org.apache.xpath.internal.objects.XObject; -import com.sun.org.apache.xpath.internal.res.XPATHErrorResources; -import com.sun.org.apache.xpath.internal.res.XPATHMessages; -import org.w3c.dom.DOMException; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.w3c.dom.events.Event; -import org.w3c.dom.events.EventListener; -import org.w3c.dom.events.EventTarget; -import org.w3c.dom.traversal.NodeIterator; -import org.w3c.dom.xpath.XPathException; -import org.w3c.dom.xpath.XPathResult; - -/** - * - * The class provides an implementation XPathResult according - * to the DOM L3 XPath Specification, Working Group Note 26 February 2004. - * - *
See also the Document Object Model (DOM) Level 3 XPath Specification.
- * - *The XPathResult
interface represents the result of the
- * evaluation of an XPath expression within the context of a particular
- * node. Since evaluation of an XPath expression can result in various
- * result types, this object makes it possible to discover and manipulate
- * the type and value of the result.
This implementation wraps an XObject
.
- *
- * @see com.sun.org.apache.xpath.internal.objects.XObject
- * @see org.w3c.dom.xpath.XPathResult
- *
- * @xsl.usage internal
- */
-class XPathResultImpl implements XPathResult, EventListener {
-
- /**
- * The wrapped XObject
- */
- final private XObject m_resultObj;
-
- /**
- * The xpath object that wraps the expression used for this result.
- */
- final private XPath m_xpath;
-
- /**
- * This the type specified by the user during construction. Typically
- * the constructor will be called by com.sun.org.apache.xpath.internal.XPath.evaluate().
- */
- final private short m_resultType;
-
- private boolean m_isInvalidIteratorState = false;
-
- /**
- * Only used to attach a mutation event handler when specified
- * type is an iterator type.
- */
- final private Node m_contextNode;
-
- /**
- * The iterator, if this is an iterator type.
- */
- private NodeIterator m_iterator = null;;
-
- /**
- * The list, if this is a snapshot type.
- */
- private NodeList m_list = null;
-
-
- /**
- * Constructor for XPathResultImpl.
- *
- * For internal use only.
- */
- XPathResultImpl(short type, XObject result, Node contextNode, XPath xpath) {
- // Check that the type is valid
- if (!isValidType(type)) {
- String fmsg = XPATHMessages.createXPATHMessage(XPATHErrorResources.ER_INVALID_XPATH_TYPE, new Object[] {new Integer(type)});
- throw new XPathException(XPathException.TYPE_ERR,fmsg); // Invalid XPath type argument: {0}
- }
-
- // Result object should never be null!
- if (null == result) {
- String fmsg = XPATHMessages.createXPATHMessage(XPATHErrorResources.ER_EMPTY_XPATH_RESULT, null);
- throw new XPathException(XPathException.INVALID_EXPRESSION_ERR,fmsg); // Empty XPath result object
- }
-
- this.m_resultObj = result;
- this.m_contextNode = contextNode;
- this.m_xpath = xpath;
-
- // If specified result was ANY_TYPE, determine XObject type
- if (type == ANY_TYPE) {
- this.m_resultType = getTypeFromXObject(result);
- } else {
- this.m_resultType = type;
- }
-
- // If the context node supports DOM Events and the type is one of the iterator
- // types register this result as an event listener
- if (((m_resultType == XPathResult.ORDERED_NODE_ITERATOR_TYPE) ||
- (m_resultType == XPathResult.UNORDERED_NODE_ITERATOR_TYPE))) {
- addEventListener();
-
- }// else can we handle iterator types if contextNode doesn't support EventTarget??
-
- // If this is an iterator type get the iterator
- if ((m_resultType == ORDERED_NODE_ITERATOR_TYPE) ||
- (m_resultType == UNORDERED_NODE_ITERATOR_TYPE) ||
- (m_resultType == ANY_UNORDERED_NODE_TYPE) ||
- (m_resultType == FIRST_ORDERED_NODE_TYPE)) {
-
- try {
- m_iterator = m_resultObj.nodeset();
- } catch (TransformerException te) {
- // probably not a node type
- String fmsg = XPATHMessages.createXPATHMessage(XPATHErrorResources.ER_INCOMPATIBLE_TYPES, new Object[] {m_xpath.getPatternString(), getTypeString(getTypeFromXObject(m_resultObj)),getTypeString(m_resultType)});
- throw new XPathException(XPathException.TYPE_ERR, fmsg); // "The XPathResult of XPath expression {0} has an XPathResultType of {1} which cannot be coerced into the specified XPathResultType of {2}."},
- }
-
- // If user requested ordered nodeset and result is unordered
- // need to sort...TODO
- // if ((m_resultType == ORDERED_NODE_ITERATOR_TYPE) &&
- // (!(((DTMNodeIterator)m_iterator).getDTMIterator().isDocOrdered()))) {
- //
- // }
-
- // If it's a snapshot type, get the nodelist
- } else if ((m_resultType == UNORDERED_NODE_SNAPSHOT_TYPE) ||
- (m_resultType == ORDERED_NODE_SNAPSHOT_TYPE)) {
- try {
- m_list = m_resultObj.nodelist();
- } catch (TransformerException te) {
- // probably not a node type
- String fmsg = XPATHMessages.createXPATHMessage(XPATHErrorResources.ER_INCOMPATIBLE_TYPES, new Object[] {m_xpath.getPatternString(), getTypeString(getTypeFromXObject(m_resultObj)),getTypeString(m_resultType)});
- throw new XPathException(XPathException.TYPE_ERR, fmsg); // "The XPathResult of XPath expression {0} has an XPathResultType of {1} which cannot be coerced into the specified XPathResultType of {2}."},
- }
- }
- }
-
- /**
- * @see org.w3c.dom.xpath.XPathResult#getResultType()
- */
- public short getResultType() {
- return m_resultType;
- }
-
- /**
- * The value of this number result.
- * @exception XPathException
- * TYPE_ERR: raised if resultType
is not
- * NUMBER_TYPE
.
- * @see org.w3c.dom.xpath.XPathResult#getNumberValue()
- */
- public double getNumberValue() throws XPathException {
- if (getResultType() != NUMBER_TYPE) {
- String fmsg = XPATHMessages.createXPATHMessage(XPATHErrorResources.ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER, new Object[] {m_xpath.getPatternString(), getTypeString(m_resultType)});
- throw new XPathException(XPathException.TYPE_ERR,fmsg);
-// "The XPathResult of XPath expression {0} has an XPathResultType of {1} which cannot be converted to a number"
- } else {
- try {
- return m_resultObj.num();
- } catch (Exception e) {
- // Type check above should prevent this exception from occurring.
- throw new XPathException(XPathException.TYPE_ERR,e.getMessage());
- }
- }
- }
-
- /**
- * The value of this string result.
- * @exception XPathException
- * TYPE_ERR: raised if resultType
is not
- * STRING_TYPE
.
- *
- * @see org.w3c.dom.xpath.XPathResult#getStringValue()
- */
- public String getStringValue() throws XPathException {
- if (getResultType() != STRING_TYPE) {
- String fmsg = XPATHMessages.createXPATHMessage(XPATHErrorResources.ER_CANT_CONVERT_TO_STRING, new Object[] {m_xpath.getPatternString(), m_resultObj.getTypeString()});
- throw new XPathException(XPathException.TYPE_ERR,fmsg);
-// "The XPathResult of XPath expression {0} has an XPathResultType of {1} which cannot be converted to a string."
- } else {
- try {
- return m_resultObj.str();
- } catch (Exception e) {
- // Type check above should prevent this exception from occurring.
- throw new XPathException(XPathException.TYPE_ERR,e.getMessage());
- }
- }
- }
-
- /**
- * @see org.w3c.dom.xpath.XPathResult#getBooleanValue()
- */
- public boolean getBooleanValue() throws XPathException {
- if (getResultType() != BOOLEAN_TYPE) {
- String fmsg = XPATHMessages.createXPATHMessage(XPATHErrorResources.ER_CANT_CONVERT_TO_BOOLEAN, new Object[] {m_xpath.getPatternString(), getTypeString(m_resultType)});
- throw new XPathException(XPathException.TYPE_ERR,fmsg);
-// "The XPathResult of XPath expression {0} has an XPathResultType of {1} which cannot be converted to a boolean."
- } else {
- try {
- return m_resultObj.bool();
- } catch (TransformerException e) {
- // Type check above should prevent this exception from occurring.
- throw new XPathException(XPathException.TYPE_ERR,e.getMessage());
- }
- }
- }
-
- /**
- * The value of this single node result, which may be null
.
- * @exception XPathException
- * TYPE_ERR: raised if resultType
is not
- * ANY_UNORDERED_NODE_TYPE
or
- * FIRST_ORDERED_NODE_TYPE
.
- *
- * @see org.w3c.dom.xpath.XPathResult#getSingleNodeValue()
- */
- public Node getSingleNodeValue() throws XPathException {
-
- if ((m_resultType != ANY_UNORDERED_NODE_TYPE) &&
- (m_resultType != FIRST_ORDERED_NODE_TYPE)) {
- String fmsg = XPATHMessages.createXPATHMessage(XPATHErrorResources.ER_CANT_CONVERT_TO_SINGLENODE, new Object[] {m_xpath.getPatternString(), getTypeString(m_resultType)});
- throw new XPathException(XPathException.TYPE_ERR,fmsg);
-// "The XPathResult of XPath expression {0} has an XPathResultType of {1} which cannot be converted to a single node.
-// This method applies only to types ANY_UNORDERED_NODE_TYPE and FIRST_ORDERED_NODE_TYPE."
- }
-
- NodeIterator result = null;
- try {
- result = m_resultObj.nodeset();
- } catch (TransformerException te) {
- throw new XPathException(XPathException.TYPE_ERR,te.getMessage());
- }
-
- if (null == result) return null;
-
- Node node = result.nextNode();
-
- // Wrap "namespace node" in an XPathNamespace
- if (isNamespaceNode(node)) {
- return new XPathNamespaceImpl(node);
- } else {
- return node;
- }
- }
-
- /**
- * @see org.w3c.dom.xpath.XPathResult#getInvalidIteratorState()
- */
- public boolean getInvalidIteratorState() {
- return m_isInvalidIteratorState;
- }
-
- /**
- * The number of nodes in the result snapshot. Valid values for
- * snapshotItem indices are 0
to
- * snapshotLength-1
inclusive.
- * @exception XPathException
- * TYPE_ERR: raised if resultType
is not
- * UNORDERED_NODE_SNAPSHOT_TYPE
or
- * ORDERED_NODE_SNAPSHOT_TYPE
.
- *
- * @see org.w3c.dom.xpath.XPathResult#getSnapshotLength()
- */
- public int getSnapshotLength() throws XPathException {
-
- if ((m_resultType != UNORDERED_NODE_SNAPSHOT_TYPE) &&
- (m_resultType != ORDERED_NODE_SNAPSHOT_TYPE)) {
- String fmsg = XPATHMessages.createXPATHMessage(XPATHErrorResources.ER_CANT_GET_SNAPSHOT_LENGTH, new Object[] {m_xpath.getPatternString(), getTypeString(m_resultType)});
- throw new XPathException(XPathException.TYPE_ERR,fmsg);
-// "The method getSnapshotLength cannot be called on the XPathResult of XPath expression {0} because its XPathResultType is {1}.
- }
-
- return m_list.getLength();
- }
-
- /**
- * Iterates and returns the next node from the node set or
- * null
if there are no more nodes.
- * @return Returns the next node.
- * @exception XPathException
- * TYPE_ERR: raised if resultType
is not
- * UNORDERED_NODE_ITERATOR_TYPE
or
- * ORDERED_NODE_ITERATOR_TYPE
.
- * @exception DOMException
- * INVALID_STATE_ERR: The document has been mutated since the result was
- * returned.
- * @see org.w3c.dom.xpath.XPathResult#iterateNext()
- */
- public Node iterateNext() throws XPathException, DOMException {
- if ((m_resultType != UNORDERED_NODE_ITERATOR_TYPE) &&
- (m_resultType != ORDERED_NODE_ITERATOR_TYPE)) {
- String fmsg = XPATHMessages.createXPATHMessage(XPATHErrorResources.ER_NON_ITERATOR_TYPE, new Object[] {m_xpath.getPatternString(), getTypeString(m_resultType)});
- throw new XPathException(XPathException.TYPE_ERR, fmsg);
-// "The method iterateNext cannot be called on the XPathResult of XPath expression {0} because its XPathResultType is {1}.
-// This method applies only to types UNORDERED_NODE_ITERATOR_TYPE and ORDERED_NODE_ITERATOR_TYPE."},
- }
-
- if (getInvalidIteratorState()) {
- String fmsg = XPATHMessages.createXPATHMessage(XPATHErrorResources.ER_DOC_MUTATED, null);
- throw new DOMException(DOMException.INVALID_STATE_ERR,fmsg); // Document mutated since result was returned. Iterator is invalid.
- }
-
- Node node = m_iterator.nextNode();
- if(null == node)
- removeEventListener(); // JIRA 1673
- // Wrap "namespace node" in an XPathNamespace
- if (isNamespaceNode(node)) {
- return new XPathNamespaceImpl(node);
- } else {
- return node;
- }
- }
-
- /**
- * Returns the index
th item in the snapshot collection. If
- * index
is greater than or equal to the number of nodes in
- * the list, this method returns null
. Unlike the iterator
- * result, the snapshot does not become invalid, but may not correspond
- * to the current document if it is mutated.
- * @param index Index into the snapshot collection.
- * @return The node at the index
th position in the
- * NodeList
, or null
if that is not a valid
- * index.
- * @exception XPathException
- * TYPE_ERR: raised if resultType
is not
- * UNORDERED_NODE_SNAPSHOT_TYPE
or
- * ORDERED_NODE_SNAPSHOT_TYPE
.
- *
- * @see org.w3c.dom.xpath.XPathResult#snapshotItem(int)
- */
- public Node snapshotItem(int index) throws XPathException {
-
- if ((m_resultType != UNORDERED_NODE_SNAPSHOT_TYPE) &&
- (m_resultType != ORDERED_NODE_SNAPSHOT_TYPE)) {
- String fmsg = XPATHMessages.createXPATHMessage(XPATHErrorResources.ER_NON_SNAPSHOT_TYPE, new Object[] {m_xpath.getPatternString(), getTypeString(m_resultType)});
- throw new XPathException(XPathException.TYPE_ERR, fmsg);
-// "The method snapshotItem cannot be called on the XPathResult of XPath expression {0} because its XPathResultType is {1}.
-// This method applies only to types UNORDERED_NODE_SNAPSHOT_TYPE and ORDERED_NODE_SNAPSHOT_TYPE."},
- }
-
- Node node = m_list.item(index);
-
- // Wrap "namespace node" in an XPathNamespace
- if (isNamespaceNode(node)) {
- return new XPathNamespaceImpl(node);
- } else {
- return node;
- }
- }
-
-
- /**
- * Check if the specified type is one of the supported types.
- * @param type The specified type
- *
- * @return true If the specified type is supported; otherwise, returns false.
- */
- static boolean isValidType( short type ) {
- switch (type) {
- case ANY_TYPE:
- case NUMBER_TYPE:
- case STRING_TYPE:
- case BOOLEAN_TYPE:
- case UNORDERED_NODE_ITERATOR_TYPE:
- case ORDERED_NODE_ITERATOR_TYPE:
- case UNORDERED_NODE_SNAPSHOT_TYPE:
- case ORDERED_NODE_SNAPSHOT_TYPE:
- case ANY_UNORDERED_NODE_TYPE:
- case FIRST_ORDERED_NODE_TYPE: return true;
- default: return false;
- }
- }
-
- /**
- * @see org.w3c.dom.events.EventListener#handleEvent(Event)
- */
- public void handleEvent(Event event) {
-
- if (event.getType().equals("DOMSubtreeModified")) {
- // invalidate the iterator
- m_isInvalidIteratorState = true;
-
- // deregister as a listener to reduce computational load
- removeEventListener();
- }
- }
-
- /**
- * Given a request type, return the equivalent string.
- * For diagnostic purposes.
- *
- * @return type string
- */
- private String getTypeString(int type)
- {
- switch (type) {
- case ANY_TYPE: return "ANY_TYPE";
- case ANY_UNORDERED_NODE_TYPE: return "ANY_UNORDERED_NODE_TYPE";
- case BOOLEAN_TYPE: return "BOOLEAN";
- case FIRST_ORDERED_NODE_TYPE: return "FIRST_ORDERED_NODE_TYPE";
- case NUMBER_TYPE: return "NUMBER_TYPE";
- case ORDERED_NODE_ITERATOR_TYPE: return "ORDERED_NODE_ITERATOR_TYPE";
- case ORDERED_NODE_SNAPSHOT_TYPE: return "ORDERED_NODE_SNAPSHOT_TYPE";
- case STRING_TYPE: return "STRING_TYPE";
- case UNORDERED_NODE_ITERATOR_TYPE: return "UNORDERED_NODE_ITERATOR_TYPE";
- case UNORDERED_NODE_SNAPSHOT_TYPE: return "UNORDERED_NODE_SNAPSHOT_TYPE";
- default: return "#UNKNOWN";
- }
- }
-
- /**
- * Given an XObject, determine the corresponding DOM XPath type
- *
- * @return type string
- */
- private short getTypeFromXObject(XObject object) {
- switch (object.getType()) {
- case XObject.CLASS_BOOLEAN: return BOOLEAN_TYPE;
- case XObject.CLASS_NODESET: return UNORDERED_NODE_ITERATOR_TYPE;
- case XObject.CLASS_NUMBER: return NUMBER_TYPE;
- case XObject.CLASS_STRING: return STRING_TYPE;
- // XPath 2.0 types
-// case XObject.CLASS_DATE:
-// case XObject.CLASS_DATETIME:
-// case XObject.CLASS_DTDURATION:
-// case XObject.CLASS_GDAY:
-// case XObject.CLASS_GMONTH:
-// case XObject.CLASS_GMONTHDAY:
-// case XObject.CLASS_GYEAR:
-// case XObject.CLASS_GYEARMONTH:
-// case XObject.CLASS_TIME:
-// case XObject.CLASS_YMDURATION: return STRING_TYPE; // treat all date types as strings?
-
- case XObject.CLASS_RTREEFRAG: return UNORDERED_NODE_ITERATOR_TYPE;
- case XObject.CLASS_NULL: return ANY_TYPE; // throw exception ?
- default: return ANY_TYPE; // throw exception ?
- }
-
- }
-
-/**
- * Given a node, determine if it is a namespace node.
- *
- * @param node
- *
- * @return boolean Returns true if this is a namespace node; otherwise, returns false.
- */
- private boolean isNamespaceNode(Node node) {
-
- if ((null != node) &&
- (node.getNodeType() == Node.ATTRIBUTE_NODE) &&
- (node.getNodeName().startsWith("xmlns:") || node.getNodeName().equals("xmlns"))) {
- return true;
- } else {
- return false;
- }
- }
-
-/**
- * Add m_contextNode to Event Listner to listen for Mutations Events
- *
- */
- private void addEventListener(){
- if(m_contextNode instanceof EventTarget)
- ((EventTarget)m_contextNode).addEventListener("DOMSubtreeModified",this,true);
-
- }
-
-
-/**
- * Remove m_contextNode to Event Listner to listen for Mutations Events
- *
- */
-private void removeEventListener(){
- if(m_contextNode instanceof EventTarget)
- ((EventTarget)m_contextNode).removeEventListener("DOMSubtreeModified",this,true);
-}
-
-}
diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/domapi/XPathStylesheetDOM3Exception.java b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/domapi/XPathStylesheetDOM3Exception.java
deleted file mode 100644
index c232003f98e..00000000000
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/domapi/XPathStylesheetDOM3Exception.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code 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
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * This file is available under and governed by the GNU General Public
- * License version 2 only, as published by the Free Software Foundation.
- * However, the following notice accompanied the original version of this
- * file and, per its terms, should not be removed:
- *
- * Copyright (c) 2002 World Wide Web Consortium,
- * (Massachusetts Institute of Technology, Institut National de
- * Recherche en Informatique et en Automatique, Keio University). All
- * Rights Reserved. This program is distributed under the W3C's Software
- * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more details.
- */
-
-package com.sun.org.apache.xpath.internal.domapi;
-
-import javax.xml.transform.SourceLocator;
-import javax.xml.transform.TransformerException;
-
-/**
- *
- * A new exception to add support for DOM Level 3 XPath API.
- * This class is needed to throw a org.w3c.dom.DOMException with proper error code in
- * createExpression method of XPathEvaluatorImpl (a DOM Level 3 class).
- *
- * This class extends TransformerException because the error message includes information
- * about where the XPath problem is in the stylesheet as well as the XPath expression itself.
- *
- * @xsl.usage internal
- */
-final public class XPathStylesheetDOM3Exception extends TransformerException {
- public XPathStylesheetDOM3Exception(String msg, SourceLocator arg1)
- {
- super(msg, arg1);
- }
-}
diff --git a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/domapi/package.html b/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/domapi/package.html
deleted file mode 100644
index f70d0c4fb25..00000000000
--- a/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/domapi/package.html
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
Implements DOM Level 3 XPath API
- - - - diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/css/CSS2Properties.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/CSS2Properties.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/css/CSS2Properties.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/CSS2Properties.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/css/CSSCharsetRule.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/CSSCharsetRule.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/css/CSSCharsetRule.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/CSSCharsetRule.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/css/CSSFontFaceRule.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/CSSFontFaceRule.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/css/CSSFontFaceRule.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/CSSFontFaceRule.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/css/CSSImportRule.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/CSSImportRule.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/css/CSSImportRule.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/CSSImportRule.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/css/CSSMediaRule.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/CSSMediaRule.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/css/CSSMediaRule.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/CSSMediaRule.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/css/CSSPageRule.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/CSSPageRule.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/css/CSSPageRule.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/CSSPageRule.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/css/CSSPrimitiveValue.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/CSSPrimitiveValue.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/css/CSSPrimitiveValue.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/CSSPrimitiveValue.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/css/CSSRule.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/CSSRule.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/css/CSSRule.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/CSSRule.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/css/CSSRuleList.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/CSSRuleList.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/css/CSSRuleList.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/CSSRuleList.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/css/CSSStyleDeclaration.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/CSSStyleDeclaration.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/css/CSSStyleDeclaration.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/CSSStyleDeclaration.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/css/CSSStyleRule.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/CSSStyleRule.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/css/CSSStyleRule.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/CSSStyleRule.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/css/CSSStyleSheet.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/CSSStyleSheet.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/css/CSSStyleSheet.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/CSSStyleSheet.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/css/CSSUnknownRule.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/CSSUnknownRule.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/css/CSSUnknownRule.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/CSSUnknownRule.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/css/CSSValue.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/CSSValue.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/css/CSSValue.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/CSSValue.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/css/CSSValueList.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/CSSValueList.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/css/CSSValueList.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/CSSValueList.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/css/Counter.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/Counter.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/css/Counter.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/Counter.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/css/DOMImplementationCSS.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/DOMImplementationCSS.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/css/DOMImplementationCSS.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/DOMImplementationCSS.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/css/DocumentCSS.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/DocumentCSS.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/css/DocumentCSS.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/DocumentCSS.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/css/ElementCSSInlineStyle.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/ElementCSSInlineStyle.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/css/ElementCSSInlineStyle.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/ElementCSSInlineStyle.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/css/RGBColor.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/RGBColor.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/css/RGBColor.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/RGBColor.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/css/Rect.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/Rect.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/css/Rect.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/Rect.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/css/ViewCSS.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/ViewCSS.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/css/ViewCSS.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/css/ViewCSS.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLAnchorElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLAnchorElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLAnchorElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLAnchorElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLAppletElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLAppletElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLAppletElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLAppletElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLAreaElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLAreaElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLAreaElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLAreaElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLBRElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLBRElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLBRElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLBRElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLBaseElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLBaseElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLBaseElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLBaseElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLBaseFontElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLBaseFontElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLBaseFontElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLBaseFontElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLBodyElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLBodyElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLBodyElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLBodyElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLButtonElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLButtonElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLButtonElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLButtonElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLCollection.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLCollection.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLCollection.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLCollection.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLDListElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLDListElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLDListElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLDListElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLDOMImplementation.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLDOMImplementation.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLDOMImplementation.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLDOMImplementation.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLDirectoryElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLDirectoryElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLDirectoryElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLDirectoryElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLDivElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLDivElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLDivElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLDivElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLDocument.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLDocument.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLDocument.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLDocument.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLFieldSetElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLFieldSetElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLFieldSetElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLFieldSetElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLFontElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLFontElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLFontElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLFontElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLFormElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLFormElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLFormElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLFormElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLFrameElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLFrameElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLFrameElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLFrameElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLFrameSetElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLFrameSetElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLFrameSetElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLFrameSetElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLHRElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLHRElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLHRElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLHRElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLHeadElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLHeadElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLHeadElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLHeadElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLHeadingElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLHeadingElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLHeadingElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLHeadingElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLHtmlElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLHtmlElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLHtmlElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLHtmlElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLIFrameElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLIFrameElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLIFrameElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLIFrameElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLImageElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLImageElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLImageElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLImageElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLInputElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLInputElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLInputElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLInputElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLIsIndexElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLIsIndexElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLIsIndexElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLIsIndexElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLLIElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLLIElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLLIElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLLIElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLLabelElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLLabelElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLLabelElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLLabelElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLLegendElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLLegendElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLLegendElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLLegendElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLLinkElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLLinkElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLLinkElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLLinkElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLMapElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLMapElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLMapElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLMapElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLMenuElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLMenuElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLMenuElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLMenuElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLMetaElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLMetaElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLMetaElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLMetaElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLModElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLModElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLModElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLModElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLOListElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLOListElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLOListElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLOListElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLObjectElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLObjectElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLObjectElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLObjectElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLOptGroupElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLOptGroupElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLOptGroupElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLOptGroupElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLOptionElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLOptionElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLOptionElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLOptionElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLParagraphElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLParagraphElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLParagraphElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLParagraphElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLParamElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLParamElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLParamElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLParamElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLPreElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLPreElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLPreElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLPreElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLQuoteElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLQuoteElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLQuoteElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLQuoteElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLScriptElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLScriptElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLScriptElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLScriptElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLSelectElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLSelectElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLSelectElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLSelectElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLStyleElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLStyleElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLStyleElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLStyleElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLTableCaptionElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLTableCaptionElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLTableCaptionElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLTableCaptionElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLTableCellElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLTableCellElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLTableCellElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLTableCellElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLTableColElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLTableColElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLTableColElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLTableColElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLTableElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLTableElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLTableElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLTableElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLTableRowElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLTableRowElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLTableRowElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLTableRowElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLTableSectionElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLTableSectionElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLTableSectionElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLTableSectionElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLTextAreaElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLTextAreaElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLTextAreaElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLTextAreaElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLTitleElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLTitleElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLTitleElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLTitleElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLUListElement.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLUListElement.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/html/HTMLUListElement.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/html/HTMLUListElement.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/stylesheets/DocumentStyle.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/stylesheets/DocumentStyle.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/stylesheets/DocumentStyle.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/stylesheets/DocumentStyle.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/stylesheets/LinkStyle.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/stylesheets/LinkStyle.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/stylesheets/LinkStyle.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/stylesheets/LinkStyle.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/stylesheets/MediaList.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/stylesheets/MediaList.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/stylesheets/MediaList.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/stylesheets/MediaList.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/stylesheets/StyleSheet.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/stylesheets/StyleSheet.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/stylesheets/StyleSheet.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/stylesheets/StyleSheet.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/stylesheets/StyleSheetList.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/stylesheets/StyleSheetList.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/stylesheets/StyleSheetList.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/stylesheets/StyleSheetList.java diff --git a/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/xpath/COPYRIGHT.html b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/xpath/COPYRIGHT.html new file mode 100644 index 00000000000..c7e0e497a5f --- /dev/null +++ b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/xpath/COPYRIGHT.html @@ -0,0 +1,106 @@ + + +
+ ++ The DOM bindings are published under the W3C Software Copyright Notice + and License. The software license requires "Notice of any changes or + modifications to the W3C files, including the date changes were made." + Consequently, modified versions of the DOM bindings must document that + they do not conform to the W3C standard; in the case of the IDL + definitions, the pragma prefix can no longer be 'w3c.org'; in the case of + the Java language binding, the package names can no longer be in the + 'org.w3c' package. +
++ Note: The original version of the W3C Software Copyright Notice + and License could be found at http://www.w3.org/Consortium/Legal/copyright-software-19980720 +
++ This W3C work (including software, documents, or other related items) is + being provided by the copyright holders under the following license. By + obtaining, using and/or copying this work, you (the licensee) agree that + you have read, understood, and will comply with the following terms and + conditions: +
++ Permission to use, copy, and modify this software and its documentation, + with or without modification, for any purpose and without fee or + royalty is hereby granted, provided that you include the following on ALL + copies of the software and documentation or portions thereof, including + modifications, that you make: +
++ THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT + HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, + INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS + FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR + DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, + TRADEMARKS OR OTHER RIGHTS. +
++ COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR + CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR + DOCUMENTATION. +
++ The name and trademarks of copyright holders may NOT be used in + advertising or publicity pertaining to the software without specific, + written prior permission. Title to copyright in this software and any + associated documentation will at all times remain with copyright + holders. +
+ + diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/xpath/XPathEvaluator.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/xpath/XPathEvaluator.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/xpath/XPathEvaluator.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/xpath/XPathEvaluator.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/xpath/XPathException.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/xpath/XPathException.java similarity index 97% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/xpath/XPathException.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/xpath/XPathException.java index 75121d48025..2a13869df45 100644 --- a/jaxp/src/java.xml/share/classes/org/w3c/dom/xpath/XPathException.java +++ b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/xpath/XPathException.java @@ -47,6 +47,8 @@ package org.w3c.dom.xpath; *See also the Document Object Model (DOM) Level 3 XPath Specification. */ public class XPathException extends RuntimeException { + private static final long serialVersionUID = 3471034171575979943L; + public XPathException(short code, String message) { super(message); this.code = code; diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/xpath/XPathExpression.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/xpath/XPathExpression.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/xpath/XPathExpression.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/xpath/XPathExpression.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/xpath/XPathNSResolver.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/xpath/XPathNSResolver.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/xpath/XPathNSResolver.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/xpath/XPathNSResolver.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/xpath/XPathNamespace.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/xpath/XPathNamespace.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/xpath/XPathNamespace.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/xpath/XPathNamespace.java diff --git a/jaxp/src/java.xml/share/classes/org/w3c/dom/xpath/XPathResult.java b/jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/xpath/XPathResult.java similarity index 100% rename from jaxp/src/java.xml/share/classes/org/w3c/dom/xpath/XPathResult.java rename to jaxp/src/jdk.xml.dom/share/classes/org/w3c/dom/xpath/XPathResult.java diff --git a/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/DOMXPathTest.java b/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/DOMXPathTest.java new file mode 100644 index 00000000000..fa92dc7175b --- /dev/null +++ b/jaxp/test/javax/xml/jaxp/unittest/org/w3c/dom/DOMXPathTest.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. + * + * This code 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 + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ +package org.w3c.dom; + +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import org.testng.Assert; +import org.testng.annotations.Test; + +/* + * @bug 8042244 + * @summary Verifies that the experimental DOM L3 XPath implementation is no longer available. + */ +public class DOMXPathTest { + /* + Verifies that DOMImplementation::hasFeature returns false and getFeature + returns null for DOM L3 XPath. + */ + @Test + public void test() throws ParserConfigurationException { + DOMImplementation domImpl = DocumentBuilderFactory.newInstance() + .newDocumentBuilder() + .getDOMImplementation(); + + Assert.assertFalse(domImpl.hasFeature("+XPath", "3.0")); + Assert.assertEquals(domImpl.getFeature("+XPath", "3.0"), null); + } +}