diff --git a/.hgtags b/.hgtags
index 18f00fc6ce6..56f428ed291 100644
--- a/.hgtags
+++ b/.hgtags
@@ -302,3 +302,5 @@ c97e2d1bad9708d379793ba2a4c848eda14c741e jdk9-b55
ddb95d8f169b09544cc17e72a6baaff2400092f5 jdk9-b57
f40752db7773ca0c737f2ad88371e35c57fdfed7 jdk9-b58
da950f343762a856d69751570a4c07cfa68a415b jdk9-b59
+38f98cb6b33562a926ec3b79c7b34128be37647d jdk9-b60
+ac3f5a39d4ff14d70c365e12cf5ec8f2abd52a04 jdk9-b61
diff --git a/.hgtags-top-repo b/.hgtags-top-repo
index 2b62f114837..b5bc828524d 100644
--- a/.hgtags-top-repo
+++ b/.hgtags-top-repo
@@ -302,3 +302,5 @@ eb7febe45865ba6b81f2ea68082262d0708a0b22 jdk9-b56
f25ee9f62427a9ba27418e5531a89754791a305b jdk9-b57
6e78dd9b121037719a065fe8fb25b936babdfecb jdk9-b58
39e8a131289e8386aa4c3e4b184faa812a7c0421 jdk9-b59
+9fa2185bee17462d1014538bff60af6e6f0b01e7 jdk9-b60
+ea38728b4f4bdd8fd0d7a89b18069f521cf05013 jdk9-b61
diff --git a/README-builds.html b/README-builds.html
index edc8f742d65..b0cc892f9c4 100644
--- a/README-builds.html
+++ b/README-builds.html
@@ -41,7 +41,8 @@
The build is now a "configure && make" style build
make -version"
+ Be sure the GNU make utility is version 3.81 (4.0 on
+ windows) or newer, e.g. run "make -version"
- * 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.
- * - * The evaluation of XPath expressions is provided by - *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 XPathEvaluatori
- * @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 nullor 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 XPathEvaluatori
- * 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 nullor 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
- * nullif 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 indexth 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 indexth 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/javax/xml/XMLConstants.java b/jaxp/src/java.xml/share/classes/javax/xml/XMLConstants.java index cca303c5d66..edcf17ae57b 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/XMLConstants.java +++ b/jaxp/src/java.xml/share/classes/javax/xml/XMLConstants.java @@ -26,7 +26,7 @@ package javax.xml; /** - *
Utility class to contain basic XML values as constants.
+ *Utility class to contain basic XML values as constants. * * @author Jeff Suttor * @see Extensible Markup Language (XML) 1.1 @@ -42,15 +42,15 @@ package javax.xml; public final class XMLConstants { /** - *
Private constructor to prevent instantiation.
+ * Private constructor to prevent instantiation. */ - private XMLConstants() { - } + private XMLConstants() { + } /** - *Namespace URI to use to represent that there is no Namespace.
+ * Namespace URI to use to represent that there is no Namespace. * - *Defined by the Namespace specification to be "".
+ *Defined by the Namespace specification to be "". * * @see * Namespaces in XML, 5.2 Namespace Defaulting @@ -58,9 +58,9 @@ public final class XMLConstants { public static final String NULL_NS_URI = ""; /** - *
Prefix to use to represent the default XML Namespace.
+ * Prefix to use to represent the default XML Namespace. * - *Defined by the XML specification to be "".
+ *Defined by the XML specification to be "".
*
* @see
@@ -69,10 +69,10 @@ public final class XMLConstants {
public static final String DEFAULT_NS_PREFIX = "";
/**
- * The official XML Namespace name URI. Defined by the XML specification to be
- * "{@code http://www.w3.org/XML/1998/namespace}". The official XML Namespace prefix. Defined by the XML specification to be "{@code xml}". Defined by the XML specification to be "{@code xml}".
*
* @see
- * Namespaces in XML, 3. Qualified Names<
+ * Namespaces in XML, 3. Qualified Names
The official XML attribute used for specifying XML Namespace + * The official XML attribute used for specifying XML Namespace * declarations, {@link #XMLNS_ATTRIBUTE - * XMLConstants.XMLNS_ATTRIBUTE}, Namespace name URI.
+ * XMLConstants.XMLNS_ATTRIBUTE}, Namespace name URI. * *Defined by the XML specification to be - * "{@code http://www.w3.org/2000/xmlns/}".
+ * "{@code http://www.w3.org/2000/xmlns/}". * * @see @@ -111,12 +111,12 @@ public final class XMLConstants { "http://www.w3.org/2000/xmlns/"; /** - *The official XML attribute used for specifying XML Namespace - * declarations.
+ * The official XML attribute used for specifying XML Namespace + * declarations. * *It is NOT valid to use as a * prefix. Defined by the XML specification to be - * "{@code xmlns}".
+ * "{@code xmlns}". * * @see @@ -125,7 +125,7 @@ public final class XMLConstants { public static final String XMLNS_ATTRIBUTE = "xmlns"; /** - *W3C XML Schema Namespace URI.
+ * W3C XML Schema Namespace URI. * *Defined to be "{@code http://www.w3.org/2001/XMLSchema}". * @@ -138,9 +138,9 @@ public final class XMLConstants { "http://www.w3.org/2001/XMLSchema"; /** - *
W3C XML Schema Instance Namespace URI.
+ * W3C XML Schema Instance Namespace URI. * - *Defined to be "{@code http://www.w3.org/2001/XMLSchema-instance}".
+ *Defined to be "{@code http://www.w3.org/2001/XMLSchema-instance}".
*
* @see
@@ -150,33 +150,33 @@ public final class XMLConstants {
public static final String W3C_XML_SCHEMA_INSTANCE_NS_URI =
"http://www.w3.org/2001/XMLSchema-instance";
- /**
- * W3C XPath Datatype Namespace URI. Defined to be "{@code http://www.w3.org/2003/11/xpath-datatypes}".
Defined to be "{@code http://www.w3.org/2003/11/xpath-datatypes}". + * + * @see XQuery 1.0 and XPath 2.0 Data Model + */ + public static final String W3C_XPATH_DATATYPE_NS_URI = "http://www.w3.org/2003/11/xpath-datatypes"; /** - *
XML Document Type Declaration Namespace URI as an arbitrary value.
+ * XML Document Type Declaration Namespace URI as an arbitrary value. * *Since not formally defined by any existing standard, arbitrarily define to be "{@code http://www.w3.org/TR/REC-xml}". */ public static final String XML_DTD_NS_URI = "http://www.w3.org/TR/REC-xml"; /** - *
RELAX NG Namespace URI.
+ * RELAX NG Namespace URI. * - *Defined to be "{@code http://relaxng.org/ns/structure/1.0}".
+ *Defined to be "{@code http://relaxng.org/ns/structure/1.0}". * * @see RELAX NG Specification */ public static final String RELAXNG_NS_URI = "http://relaxng.org/ns/structure/1.0"; /** - *
Feature for secure processing.
+ * Feature for secure processing. * *Property: accessExternalDTD
+ * Property: accessExternalDTD * ** Restrict access to external DTDs and external Entity References to the protocols specified. * If access is denied due to the restriction of this property, a runtime exception that * is specific to the context is thrown. In the case of {@link javax.xml.parsers.SAXParser} * for example, {@link org.xml.sax.SAXException} is thrown. - *
* ** Value: a list of protocols separated by comma. A protocol is the scheme portion of a @@ -221,7 +220,6 @@ public final class XMLConstants { * Examples of protocols are file, http, jar:file. * * - *
* ** Default value: The default value is implementation specific and therefore not specified. @@ -231,20 +229,19 @@ public final class XMLConstants { *
* Granting all access: the keyword "all" grants permission to all protocols. - *
+ * ** System Property: The value of this property can be set or overridden by * system property {@code javax.xml.accessExternalDTD}. - *
+ * * ** jaxp.properties: This configuration file is in standard @@ -252,11 +249,8 @@ public final class XMLConstants { * directory of the Java installation. If the file exists and the system * property is specified, its value will be used to override the default * of the property. - *
* - ** - *
* @since 1.7 */ public static final String ACCESS_EXTERNAL_DTD = "http://javax.xml.XMLConstants/property/accessExternalDTD"; @@ -270,7 +264,7 @@ public final class XMLConstants { * due to the restriction of this property, a runtime exception that is specific * to the context is thrown. In the case of {@link javax.xml.validation.SchemaFactory} * for example, org.xml.sax.SAXException is thrown. - * + * ** Value: a list of protocols separated by comma. A protocol is the scheme portion of a * {@link java.net.URI}, or in the case of the JAR protocol, "jar" plus the scheme portion @@ -290,9 +284,8 @@ public final class XMLConstants { * Examples of protocols are file, http, jar:file. * * - *
* - *+ *
* Default value: The default value is implementation specific and therefore not specified. * The following options are provided for consideration: *
@@ -300,20 +293,18 @@ public final class XMLConstants { *- an empty string to deny all access to external references;
*- a specific protocol, such as file, to give permission to only the protocol;
*- the keyword "all" to grant permission to all protocols.
- *
* Granting all access: the keyword "all" grants permission to all protocols. - *
* ** System Property: The value of this property can be set or overridden by * system property {@code javax.xml.accessExternalSchema} - *
* ** jaxp.properties: This configuration file is in standard @@ -323,12 +314,11 @@ public final class XMLConstants { * of the property. * * @since 1.7 - *
*/ public static final String ACCESS_EXTERNAL_SCHEMA = "http://javax.xml.XMLConstants/property/accessExternalSchema"; /** - *Property: accessExternalStylesheet
+ * Property: accessExternalStylesheet * ** Restrict access to the protocols specified for external references set by the @@ -338,7 +328,7 @@ public final class XMLConstants { * {@link javax.xml.transform.Transformer} for example, * {@link javax.xml.transform.TransformerConfigurationException} * will be thrown by the {@link javax.xml.transform.TransformerFactory}. - *
+ * ** Value: a list of protocols separated by comma. A protocol is the scheme portion of a * {@link java.net.URI}, or in the case of the JAR protocol, "jar" plus the scheme portion @@ -358,9 +348,8 @@ public final class XMLConstants { * Examples of protocols are file, http, jar:file. * * - *
* - *+ *
* Default value: The default value is implementation specific and therefore not specified. * The following options are provided for consideration: *
@@ -368,20 +357,18 @@ public final class XMLConstants { *- * + * *an empty string to deny all access to external references; *a specific protocol, such as file, to give permission to only the protocol; *the keyword "all" to grant permission to all protocols. - *
+ *
* When FEATURE_SECURE_PROCESSING is enabled, it is recommended that implementations * restrict external connections by default, though this may cause problems for applications * that process XML/XSD/XSL with external references. *
* Granting all access: the keyword "all" grants permission to all protocols. - *
* ** System Property: The value of this property can be set or overridden by * system property {@code javax.xml.accessExternalStylesheet} - *
* *
* jaxp.properties: This configuration file is in standard
diff --git a/jaxp/src/java.xml/share/classes/javax/xml/datatype/DatatypeFactory.java b/jaxp/src/java.xml/share/classes/javax/xml/datatype/DatatypeFactory.java
index d3afb25888e..001b682e42b 100644
--- a/jaxp/src/java.xml/share/classes/javax/xml/datatype/DatatypeFactory.java
+++ b/jaxp/src/java.xml/share/classes/javax/xml/datatype/DatatypeFactory.java
@@ -32,11 +32,10 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
- * Factory that creates new javax.xml.datatype Objects that map XML to/from Java Objects.
+ * Factory that creates new {@code javax.xml.datatype} {@code Object}s that map XML to/from Java {@code Object}s.
*
* A new instance of the {@code DatatypeFactory} is created through the {@link #newInstance()} method * that uses the following implementation resolution mechanisms to determine an implementation: - *
*
Default property name as defined in JSR 206: Java(TM) API for XML Processing (JAXP) 1.3.
+ * Default property name as defined in JSR 206: Java(TM) API for XML Processing (JAXP) 1.3. * - *Default value is {@code javax.xml.datatype.DatatypeFactory}.
+ *Default value is {@code javax.xml.datatype.DatatypeFactory}. */ public static final String DATATYPEFACTORY_PROPERTY = // We use a String constant here, rather than calling @@ -100,16 +99,15 @@ public abstract class DatatypeFactory { "javax.xml.datatype.DatatypeFactory"; /** - *
Default implementation class name as defined in - * JSR 206: Java(TM) API for XML Processing (JAXP) 1.3.
+ * Default implementation class name as defined in + * JSR 206: Java(TM) API for XML Processing (JAXP) 1.3. * *Implementers should specify the name of an appropriate class * to be instantiated if no other implementation resolution mechanism - * succeeds.
+ * succeeds. * *Users should not refer to this field; it is intended only to * document a factory implementation detail. - *
*/ public static final String DATATYPEFACTORY_IMPLEMENTATION_CLASS = // We use new String() here to prevent javadoc from generating @@ -130,18 +128,18 @@ public abstract class DatatypeFactory { Pattern.compile("[^YM]*[DT].*"); /** - *Protected constructor to prevent instantiation outside of package.
+ * Protected constructor to prevent instantiation outside of package. * - *Use {@link #newInstance()} to create a {@code DatatypeFactory}.
+ *Use {@link #newInstance()} to create a {@code DatatypeFactory}. */ protected DatatypeFactory() { } /** - *
Obtain a new instance of a {@code DatatypeFactory}.
+ * Obtain a new instance of a {@code DatatypeFactory}. * *The implementation resolution mechanisms are defined in this
- * Class's documentation.
Obtain a new instance of a {@code DatatypeFactory} from class name. + * Obtain a new instance of a {@code DatatypeFactory} from class name. * This function is useful when there are multiple providers in the classpath. * It gives more control to the application as it can specify which provider - * should be loaded.
+ * should be loaded. * *Once an application has obtained a reference to a {@code DatatypeFactory} - * it can use the factory to configure and obtain datatype instances.
+ * it can use the factory to configure and obtain datatype instances. * * *Setting the jaxp.debug system property will cause
+ *
Setting the {@code jaxp.debug} system property will cause
* this method to print a lot of debug messages
- * to System.err about what it is doing and where it is looking at.
If you have problems try:
+ *If you have problems try: *
* java -Djaxp.debug=1 YourProgram ....
*
*
* @param factoryClassName fully qualified factory class name that provides implementation of {@code javax.xml.datatype.DatatypeFactory}.
*
- * @param classLoader ClassLoader used to load the factory class. If null
- * current Thread's context classLoader is used to load the factory class.
+ * @param classLoader {@code ClassLoader} used to load the factory class. If {@code null}
+ * current {@code Thread}'s context classLoader is used to load the factory class.
*
* @return New instance of a {@code DatatypeFactory}
*
- * @throws DatatypeConfigurationException if factoryClassName is null, or
+ * @throws DatatypeConfigurationException if {@code factoryClassName} is {@code null}, or
* the factory class cannot be loaded, instantiated.
*
* @see #newInstance()
@@ -201,11 +199,11 @@ public abstract class DatatypeFactory {
}
/**
- * Obtain a new instance of a Duration
- * specifying the Duration as its string representation, "PnYnMnDTnHnMnS",
- * as defined in XML Schema 1.0 section 3.2.6.1.
XML Schema Part 2: Datatypes, 3.2.6 duration, defines duration as:
XML Schema Part 2: Datatypes, 3.2.6 duration, defines {@code duration} as: *
* duration represents a duration of time. * The value space of duration is a six-dimensional space where the coordinates designate the @@ -213,28 +211,28 @@ public abstract class DatatypeFactory { * These components are ordered in their significance by their order of appearance i.e. as * year, month, day, hour, minute, and second. *- *
All six values are set and available from the created {@link Duration}
+ *All six values are set and available from the created {@link Duration} * *
The XML Schema specification states that values can be of an arbitrary size. * Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values. * An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits - * if implementation capacities are exceeded.
+ * if implementation capacities are exceeded. * - * @param lexicalRepresentationString representation of a Duration.
+ * @param lexicalRepresentation {@code String} representation of a {@code Duration}.
*
- * @return New Duration created from parsing the lexicalRepresentation.
+ * @return New {@code Duration} created from parsing the {@code lexicalRepresentation}.
*
- * @throws IllegalArgumentException If lexicalRepresentation is not a valid representation of a Duration.
+ * @throws IllegalArgumentException If {@code lexicalRepresentation} is not a valid representation of a {@code Duration}.
* @throws UnsupportedOperationException If implementation cannot support requested values.
- * @throws NullPointerException if lexicalRepresentation is null.
+ * @throws NullPointerException if {@code lexicalRepresentation} is {@code null}.
*/
public abstract Duration newDuration(final String lexicalRepresentation);
/**
- * Obtain a new instance of a Duration
- * specifying the Duration as milliseconds.
XML Schema Part 2: Datatypes, 3.2.6 duration, defines duration as:
XML Schema Part 2: Datatypes, 3.2.6 duration, defines {@code duration} as: *
* duration represents a duration of time. * The value space of duration is a six-dimensional space where the coordinates designate the @@ -243,8 +241,8 @@ public abstract class DatatypeFactory { * year, month, day, hour, minute, and second. **
All six values are set by computing their values from the specified milliseconds
- * and are available using the get methods of the created {@link Duration}.
- * The values conform to and are defined by:
Duration representing durationInMilliSeconds.
+ * @return New {@code Duration} representing {@code durationInMilliSeconds}.
*/
public abstract Duration newDuration(final long durationInMilliSeconds);
/**
- * Obtain a new instance of a Duration
- * specifying the Duration as isPositive, years, months, days, hours, minutes, seconds.
The XML Schema specification states that values can be of an arbitrary size. * Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values. * An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits - * if implementation capacities are exceeded.
+ * if implementation capacities are exceeded. * - *A null value indicates that field is not set.
A {@code null} value indicates that field is not set.
*
- * @param isPositive Set to false to create a negative duration. When the length
+ * @param isPositive Set to {@code false} to create a negative duration. When the length
* of the duration is zero, this parameter will be ignored.
- * @param years of this Duration
- * @param months of this Duration
- * @param days of this Duration
- * @param hours of this Duration
- * @param minutes of this Duration
- * @param seconds of this Duration
+ * @param years of this {@code Duration}
+ * @param months of this {@code Duration}
+ * @param days of this {@code Duration}
+ * @param hours of this {@code Duration}
+ * @param minutes of this {@code Duration}
+ * @param seconds of this {@code Duration}
*
- * @return New Duration created from the specified values.
+ * @return New {@code Duration} created from the specified values.
*
* @throws IllegalArgumentException If the values are not a valid representation of a
- * Duration: if all the fields (years, months, ...) are null or
+ * {@code Duration}: if all the fields (years, months, ...) are null or
* if any of the fields is negative.
* @throws UnsupportedOperationException If implementation cannot support requested values.
*/
@@ -304,24 +302,24 @@ public abstract class DatatypeFactory {
final BigDecimal seconds);
/**
- *
Obtain a new instance of a Duration
- * specifying the Duration as isPositive, years, months, days, hours, minutes, seconds.
A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
+ *A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
*
- * @param isPositive Set to false to create a negative duration. When the length
+ * @param isPositive Set to {@code false} to create a negative duration. When the length
* of the duration is zero, this parameter will be ignored.
- * @param years of this Duration
- * @param months of this Duration
- * @param days of this Duration
- * @param hours of this Duration
- * @param minutes of this Duration
- * @param seconds of this Duration
+ * @param years of this {@code Duration}
+ * @param months of this {@code Duration}
+ * @param days of this {@code Duration}
+ * @param hours of this {@code Duration}
+ * @param minutes of this {@code Duration}
+ * @param seconds of this {@code Duration}
*
- * @return New Duration created from the specified values.
+ * @return New {@code Duration} created from the specified values.
*
* @throws IllegalArgumentException If the values are not a valid representation of a
- * Duration: if any of the fields is negative.
+ * {@code Duration}: if any of the fields is negative.
*
* @see #newDuration(
* boolean isPositive,
@@ -371,28 +369,30 @@ public abstract class DatatypeFactory {
}
/**
- *
Create a Duration of type xdt:dayTimeDuration by parsing its String representation,
+ * Create a {@code Duration} of type {@code xdt:dayTimeDuration}
+ * by parsing its {@code String} representation,
* "PnDTnHnMnS",
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.
The datatype xdt:dayTimeDuration is a subtype of xs:duration
+ *
The datatype {@code xdt:dayTimeDuration} is a subtype of {@code xs:duration}
* whose lexical representation contains only day, hour, minute, and second components.
- * This datatype resides in the namespace http://www.w3.org/2003/11/xpath-datatypes.
All four values are set and available from the created {@link Duration}
+ *All four values are set and available from the created {@link Duration} * *
The XML Schema specification states that values can be of an arbitrary size. * Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values. * An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits - * if implementation capacities are exceeded.
+ * if implementation capacities are exceeded. * * @param lexicalRepresentation Lexical representation of a duration. * - * @return NewDuration created using the specified lexicalRepresentation.
+ * @return New {@code Duration} created using the specified {@code lexicalRepresentation}.
*
- * @throws IllegalArgumentException If lexicalRepresentation is not a valid representation of a Duration expressed only in terms of days and time.
+ * @throws IllegalArgumentException If {@code lexicalRepresentation} is
+ * not a valid representation of a {@code Duration} expressed only in terms of days and time.
* @throws UnsupportedOperationException If implementation cannot support requested values.
- * @throws NullPointerException If lexicalRepresentation is null.
+ * @throws NullPointerException If {@code lexicalRepresentation} is {@code null}.
*/
public Duration newDurationDayTime(final String lexicalRepresentation) {
// lexicalRepresentation must be non-null
@@ -415,17 +415,18 @@ public abstract class DatatypeFactory {
}
/**
- * Create a Duration of type xdt:dayTimeDuration using the specified milliseconds as defined in
+ * Create a {@code Duration} of type {@code xdt:dayTimeDuration}
+ * using the specified milliseconds as defined in
*
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.
The datatype xdt:dayTimeDuration is a subtype of xs:duration
+ *
The datatype {@code xdt:dayTimeDuration} is a subtype of {@code xs:duration}
* whose lexical representation contains only day, hour, minute, and second components.
- * This datatype resides in the namespace http://www.w3.org/2003/11/xpath-datatypes.
All four values are set by computing their values from the specified milliseconds
- * and are available using the get methods of the created {@link Duration}.
- * The values conform to and are defined by:
Any remaining milliseconds after determining the day, hour, minute and second are discarded.
+ *Any remaining milliseconds after determining the day, hour, minute and second are discarded.
*
- * @param durationInMilliseconds Milliseconds of Duration to create.
+ * @param durationInMilliseconds Milliseconds of {@code Duration} to create.
*
- * @return New Duration created with the specified durationInMilliseconds.
+ * @return New {@code Duration} created with the specified {@code durationInMilliseconds}.
*
* @see
* XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration
@@ -457,34 +458,34 @@ public abstract class DatatypeFactory {
}
/**
- *
Create a Duration of type xdt:dayTimeDuration using the specified
- * day, hour, minute and second as defined in
+ * Create a {@code Duration} of type {@code xdt:dayTimeDuration} using the specified
+ * {@code day}, {@code hour}, {@code minute} and {@code second} as defined in
*
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.
The datatype xdt:dayTimeDuration is a subtype of xs:duration
+ *
The datatype {@code xdt:dayTimeDuration} is a subtype of {@code xs:duration}
* whose lexical representation contains only day, hour, minute, and second components.
- * This datatype resides in the namespace http://www.w3.org/2003/11/xpath-datatypes.
The XML Schema specification states that values can be of an arbitrary size. * Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values. * An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits - * if implementation capacities are exceeded.
+ * if implementation capacities are exceeded. * - *A null value indicates that field is not set.
A {@code null} value indicates that field is not set.
*
- * @param isPositive Set to false to create a negative duration. When the length
+ * @param isPositive Set to {@code false} to create a negative duration. When the length
* of the duration is zero, this parameter will be ignored.
- * @param day Day of Duration.
- * @param hour Hour of Duration.
- * @param minute Minute of Duration.
- * @param second Second of Duration.
+ * @param day Day of {@code Duration}.
+ * @param hour Hour of {@code Duration}.
+ * @param minute Minute of {@code Duration}.
+ * @param second Second of {@code Duration}.
*
- * @return New Duration created with the specified day, hour, minute
- * and second.
+ * @return New {@code Duration} created with the specified {@code day}, {@code hour}, {@code minute}
+ * and {@code second}.
*
* @throws IllegalArgumentException If the values are not a valid representation of a
- * Duration: if all the fields (day, hour, ...) are null or
+ * {@code Duration}: if all the fields (day, hour, ...) are null or
* if any of the fields is negative.
* @throws UnsupportedOperationException If implementation cannot support requested values.
*/
@@ -507,29 +508,29 @@ public abstract class DatatypeFactory {
}
/**
- *
Create a Duration of type xdt:dayTimeDuration using the specified
- * day, hour, minute and second as defined in
+ * Create a {@code Duration} of type {@code xdt:dayTimeDuration} using the specified
+ * {@code day}, {@code hour}, {@code minute} and {@code second} as defined in
*
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.
The datatype xdt:dayTimeDuration is a subtype of xs:duration
+ *
The datatype {@code xdt:dayTimeDuration} is a subtype of {@code xs:duration}
* whose lexical representation contains only day, hour, minute, and second components.
- * This datatype resides in the namespace http://www.w3.org/2003/11/xpath-datatypes.
A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
+ *A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
*
- * @param isPositive Set to false to create a negative duration. When the length
+ * @param isPositive Set to {@code false} to create a negative duration. When the length
* of the duration is zero, this parameter will be ignored.
- * @param day Day of Duration.
- * @param hour Hour of Duration.
- * @param minute Minute of Duration.
- * @param second Second of Duration.
+ * @param day Day of {@code Duration}.
+ * @param hour Hour of {@code Duration}.
+ * @param minute Minute of {@code Duration}.
+ * @param second Second of {@code Duration}.
*
- * @return New Duration created with the specified day, hour, minute
- * and second.
+ * @return New {@code Duration} created with the specified {@code day}, {@code hour}, {@code minute}
+ * and {@code second}.
*
* @throws IllegalArgumentException If the values are not a valid representation of a
- * Duration: if any of the fields (day, hour, ...) is negative.
+ * {@code Duration}: if any of the fields (day, hour, ...) is negative.
*/
public Duration newDurationDayTime(
final boolean isPositive,
@@ -548,28 +549,30 @@ public abstract class DatatypeFactory {
}
/**
- *
Create a Duration of type xdt:yearMonthDuration by parsing its String representation,
+ * Create a {@code Duration} of type {@code xdt:yearMonthDuration}
+ * by parsing its {@code String} representation,
* "PnYnM",
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.
The datatype xdt:yearMonthDuration is a subtype of xs:duration
+ *
The datatype {@code xdt:yearMonthDuration} is a subtype of {@code xs:duration} * whose lexical representation contains only year and month components. - * This datatype resides in the namespace {@link javax.xml.XMLConstants#W3C_XPATH_DATATYPE_NS_URI}.
+ * This datatype resides in the namespace {@link javax.xml.XMLConstants#W3C_XPATH_DATATYPE_NS_URI}. * - *Both values are set and available from the created {@link Duration}
+ *Both values are set and available from the created {@link Duration} * *
The XML Schema specification states that values can be of an arbitrary size. - * Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values. - * An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits - * if implementation capacities are exceeded.
+ * Implementations may chose not to or be incapable of supporting + * arbitrarily large and/or small values. An {@link UnsupportedOperationException} + * will be thrown with a message indicating implementation limits + * if implementation capacities are exceeded. * * @param lexicalRepresentation Lexical representation of a duration. * - * @return NewDuration created using the specified lexicalRepresentation.
+ * @return New {@code Duration} created using the specified {@code lexicalRepresentation}.
*
- * @throws IllegalArgumentException If lexicalRepresentation is not a valid representation of a Duration expressed only in terms of years and months.
+ * @throws IllegalArgumentException If {@code lexicalRepresentation} is not a valid representation of a {@code Duration} expressed only in terms of years and months.
* @throws UnsupportedOperationException If implementation cannot support requested values.
- * @throws NullPointerException If lexicalRepresentation is null.
+ * @throws NullPointerException If {@code lexicalRepresentation} is {@code null}.
*/
public Duration newDurationYearMonth(
final String lexicalRepresentation) {
@@ -594,17 +597,18 @@ public abstract class DatatypeFactory {
}
/**
- * Create a Duration of type xdt:yearMonthDuration using the specified milliseconds as defined in
+ * Create a {@code Duration} of type {@code xdt:yearMonthDuration}
+ * using the specified milliseconds as defined in
*
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.
The datatype xdt:yearMonthDuration is a subtype of xs:duration
+ *
The datatype {@code xdt:yearMonthDuration} is a subtype of {@code xs:duration} * whose lexical representation contains only year and month components. - * This datatype resides in the namespace {@link javax.xml.XMLConstants#W3C_XPATH_DATATYPE_NS_URI}.
+ * This datatype resides in the namespace {@link javax.xml.XMLConstants#W3C_XPATH_DATATYPE_NS_URI}. * *Both values are set by computing their values from the specified milliseconds
- * and are available using the get methods of the created {@link Duration}.
- * The values conform to and are defined by:
Any remaining milliseconds after determining the year and month are discarded.
+ *Any remaining milliseconds after determining the year and month are discarded.
*
- * @param durationInMilliseconds Milliseconds of Duration to create.
+ * @param durationInMilliseconds Milliseconds of {@code Duration} to create.
*
- * @return New Duration created using the specified durationInMilliseconds.
+ * @return New {@code Duration} created using the specified {@code durationInMilliseconds}.
*/
public Duration newDurationYearMonth(
final long durationInMilliseconds) {
@@ -646,27 +650,27 @@ public abstract class DatatypeFactory {
}
/**
- *
Create a Duration of type xdt:yearMonthDuration using the specified
- * year and month as defined in
+ * Create a {@code Duration} of type {@code xdt:yearMonthDuration} using the specified
+ * {@code year} and {@code month} as defined in
*
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.
The XML Schema specification states that values can be of an arbitrary size. * Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values. * An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits - * if implementation capacities are exceeded.
+ * if implementation capacities are exceeded. * - *A null value indicates that field is not set.
A {@code null} value indicates that field is not set.
*
- * @param isPositive Set to false to create a negative duration. When the length
+ * @param isPositive Set to {@code false} to create a negative duration. When the length
* of the duration is zero, this parameter will be ignored.
- * @param year Year of Duration.
- * @param month Month of Duration.
+ * @param year Year of {@code Duration}.
+ * @param month Month of {@code Duration}.
*
- * @return New Duration created using the specified year and month.
+ * @return New {@code Duration} created using the specified {@code year} and {@code month}.
*
* @throws IllegalArgumentException If the values are not a valid representation of a
- * Duration: if all of the fields (year, month) are null or
+ * {@code Duration}: if all of the fields (year, month) are null or
* if any of the fields is negative.
* @throws UnsupportedOperationException If implementation cannot support requested values.
*/
@@ -687,22 +691,22 @@ public abstract class DatatypeFactory {
}
/**
- *
Create a Duration of type xdt:yearMonthDuration using the specified
- * year and month as defined in
+ * Create a {@code Duration} of type {@code xdt:yearMonthDuration} using the specified
+ * {@code year} and {@code month} as defined in
*
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.
A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
+ *A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
*
- * @param isPositive Set to false to create a negative duration. When the length
+ * @param isPositive Set to {@code false} to create a negative duration. When the length
* of the duration is zero, this parameter will be ignored.
- * @param year Year of Duration.
- * @param month Month of Duration.
+ * @param year Year of {@code Duration}.
+ * @param month Month of {@code Duration}.
*
- * @return New Duration created using the specified year and month.
+ * @return New {@code Duration} created using the specified {@code year} and {@code month}.
*
* @throws IllegalArgumentException If the values are not a valid representation of a
- * Duration: if any of the fields (year, month) is negative.
+ * {@code Duration}: if any of the fields (year, month) is negative.
*/
public Duration newDurationYearMonth(
final boolean isPositive,
@@ -716,44 +720,44 @@ public abstract class DatatypeFactory {
}
/**
- *
Create a new instance of an XMLGregorianCalendar.
All date/time datatype fields set to {@link DatatypeConstants#FIELD_UNDEFINED} or null.
+ *All date/time datatype fields set to {@link DatatypeConstants#FIELD_UNDEFINED} or null.
*
- * @return New XMLGregorianCalendar with all date/time datatype fields set to
+ * @return New {@code XMLGregorianCalendar} with all date/time datatype fields set to
* {@link DatatypeConstants#FIELD_UNDEFINED} or null.
*/
public abstract XMLGregorianCalendar newXMLGregorianCalendar();
/**
- *
Create a new XMLGregorianCalendar by parsing the String as a lexical representation.
+ * Create a new XMLGregorianCalendar by parsing the String as a lexical representation. * *Parsing the lexical string representation is defined in * XML Schema 1.0 Part 2, Section 3.2.[7-14].1, - * Lexical Representation.
+ * Lexical Representation. * - *The string representation may not have any leading and trailing whitespaces.
+ *The string representation may not have any leading and trailing whitespaces. * *
The parsing is done field by field so that - * the following holds for any lexically correct String x:
+ * the following holds for any lexically correct String x: *
* newXMLGregorianCalendar(x).toXMLFormat().equals(x)
*
* Except for the noted lexical/canonical representation mismatches * listed in - * XML Schema 1.0 errata, Section 3.2.7.2.
+ * XML Schema 1.0 errata, Section 3.2.7.2. * * @param lexicalRepresentation Lexical representation of one the eight XML Schema date/time datatypes. * - * @returnXMLGregorianCalendar created from the lexicalRepresentation.
+ * @return {@code XMLGregorianCalendar} created from the {@code lexicalRepresentation}.
*
- * @throws IllegalArgumentException If the lexicalRepresentation is not a valid XMLGregorianCalendar.
- * @throws NullPointerException If lexicalRepresentation is null.
+ * @throws IllegalArgumentException If the {@code lexicalRepresentation} is not a valid {@code XMLGregorianCalendar}.
+ * @throws NullPointerException If {@code lexicalRepresentation} is {@code null}.
*/
public abstract XMLGregorianCalendar newXMLGregorianCalendar(final String lexicalRepresentation);
/**
- * Create an XMLGregorianCalendar from a {@link GregorianCalendar}.
java.util.GregorianCalendar field |
- * javax.xml.datatype.XMLGregorianCalendar field |
+ * {@code java.util.GregorianCalendar} field | + *{@code javax.xml.datatype.XMLGregorianCalendar} field | *
|---|---|---|---|
ERA == GregorianCalendar.BC ? -YEAR : YEAR |
+ * {@code ERA == GregorianCalendar.BC ? -YEAR : YEAR} | *{@link XMLGregorianCalendar#setYear(int year)} | *|
MONTH + 1 |
+ * {@code MONTH + 1} | *{@link XMLGregorianCalendar#setMonth(int month)} | *|
DAY_OF_MONTH |
+ * {@code DAY_OF_MONTH} | *{@link XMLGregorianCalendar#setDay(int day)} | *|
HOUR_OF_DAY, MINUTE, SECOND, MILLISECOND |
+ * {@code HOUR_OF_DAY, MINUTE, SECOND, MILLISECOND} | *{@link XMLGregorianCalendar#setTime(int hour, int minute, int second, BigDecimal fractional)} | *|
- * (ZONE_OFFSET + DST_OFFSET) / (60*1000)+ * {@code (ZONE_OFFSET + DST_OFFSET) / (60*1000)} * (in minutes) * |
* {@link XMLGregorianCalendar#setTimezone(int offset)}* @@ -796,49 +800,50 @@ public abstract class DatatypeFactory { * |
*conversion loss of information. It is not possible to represent
- * a java.util.GregorianCalendar daylight savings timezone id in the
- * XML Schema 1.0 date/time datatype representation.
To compute the return value's TimeZone field,
+ *
To compute the return value's {@code TimeZone} field, *
this.getTimezone() != FIELD_UNDEFINED,
- * create a java.util.TimeZone with a custom timezone id
- * using the this.getTimezone().GregorianCalendar default timezone value
+ * java.util.TimeZone.getDefault().java.util.GregorianCalendar used to create XMLGregorianCalendar
+ * @param cal {@code java.util.GregorianCalendar} used to create {@code XMLGregorianCalendar}
*
- * @return XMLGregorianCalendar created from java.util.GregorianCalendar
+ * @return {@code XMLGregorianCalendar} created from {@code java.util.GregorianCalendar}
*
- * @throws NullPointerException If cal is null.
+ * @throws NullPointerException If {@code cal} is {@code null}.
*/
public abstract XMLGregorianCalendar newXMLGregorianCalendar(final GregorianCalendar cal);
/**
- * Constructor allowing for complete value spaces allowed by
+ * Constructor allowing for complete value spaces allowed by
* W3C XML Schema 1.0 recommendation for xsd:dateTime and related
- * builtin datatypes. Note that year parameter supports
+ * builtin datatypes. Note that {@code year} parameter supports
* arbitrarily large numbers and fractionalSecond has infinite
- * precision.
A null value indicates that field is not set.
A {@code null} value indicates that field is not set.
*
- * @param year of XMLGregorianCalendar to be created.
- * @param month of XMLGregorianCalendar to be created.
- * @param day of XMLGregorianCalendar to be created.
- * @param hour of XMLGregorianCalendar to be created.
- * @param minute of XMLGregorianCalendar to be created.
- * @param second of XMLGregorianCalendar to be created.
- * @param fractionalSecond of XMLGregorianCalendar to be created.
- * @param timezone of XMLGregorianCalendar to be created.
+ * @param year of {@code XMLGregorianCalendar} to be created.
+ * @param month of {@code XMLGregorianCalendar} to be created.
+ * @param day of {@code XMLGregorianCalendar} to be created.
+ * @param hour of {@code XMLGregorianCalendar} to be created.
+ * @param minute of {@code XMLGregorianCalendar} to be created.
+ * @param second of {@code XMLGregorianCalendar} to be created.
+ * @param fractionalSecond of {@code XMLGregorianCalendar} to be created.
+ * @param timezone of {@code XMLGregorianCalendar} to be created.
*
- * @return XMLGregorianCalendar created from specified values.
+ * @return {@code XMLGregorianCalendar} created from specified values.
*
* @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
* as determined by the Date/Time Data Mapping table in {@link XMLGregorianCalendar}
- * or if the composite values constitute an invalid XMLGregorianCalendar instance
+ * or if the composite values constitute an invalid {@code XMLGregorianCalendar} instance
* as determined by {@link XMLGregorianCalendar#isValid()}.
*/
public abstract XMLGregorianCalendar newXMLGregorianCalendar(
@@ -852,29 +857,29 @@ public abstract class DatatypeFactory {
final int timezone);
/**
- *
Constructor of value spaces that a
- * java.util.GregorianCalendar instance would need to convert to an
- * XMLGregorianCalendar instance.
XMLGregorianCalendar eon and
- * fractionalSecond are set to null
{@code XMLGregorianCalendar eon} and + * {@code fractionalSecond} are set to {@code null} * - *
A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
+ *A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
*
- * @param year of XMLGregorianCalendar to be created.
- * @param month of XMLGregorianCalendar to be created.
- * @param day of XMLGregorianCalendar to be created.
- * @param hour of XMLGregorianCalendar to be created.
- * @param minute of XMLGregorianCalendar to be created.
- * @param second of XMLGregorianCalendar to be created.
- * @param millisecond of XMLGregorianCalendar to be created.
- * @param timezone of XMLGregorianCalendar to be created.
+ * @param year of {@code XMLGregorianCalendar} to be created.
+ * @param month of {@code XMLGregorianCalendar} to be created.
+ * @param day of {@code XMLGregorianCalendar} to be created.
+ * @param hour of {@code XMLGregorianCalendar} to be created.
+ * @param minute of {@code XMLGregorianCalendar} to be created.
+ * @param second of {@code XMLGregorianCalendar} to be created.
+ * @param millisecond of {@code XMLGregorianCalendar} to be created.
+ * @param timezone of {@code XMLGregorianCalendar} to be created.
*
- * @return XMLGregorianCalendar created from specified values.
+ * @return {@code XMLGregorianCalendar} created from specified values.
*
* @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
* as determined by the Date/Time Data Mapping table in {@link XMLGregorianCalendar}
- * or if the composite values constitute an invalid XMLGregorianCalendar instance
+ * or if the composite values constitute an invalid {@code XMLGregorianCalendar} instance
* as determined by {@link XMLGregorianCalendar#isValid()}.
*/
public XMLGregorianCalendar newXMLGregorianCalendar(
@@ -918,26 +923,26 @@ public abstract class DatatypeFactory {
}
/**
- *
Create a Java representation of XML Schema builtin datatype date or g*.
For example, an instance of gYear can be created invoking this factory
- * with month and day parameters set to
- * {@link DatatypeConstants#FIELD_UNDEFINED}.
For example, an instance of {@code gYear} can be created invoking this factory + * with {@code month} and {@code day} parameters set to + * {@link DatatypeConstants#FIELD_UNDEFINED}. * - *
A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
+ *A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
*
- * @param year of XMLGregorianCalendar to be created.
- * @param month of XMLGregorianCalendar to be created.
- * @param day of XMLGregorianCalendar to be created.
+ * @param year of {@code XMLGregorianCalendar} to be created.
+ * @param month of {@code XMLGregorianCalendar} to be created.
+ * @param day of {@code XMLGregorianCalendar} to be created.
* @param timezone offset in minutes. {@link DatatypeConstants#FIELD_UNDEFINED} indicates optional field is not set.
*
- * @return XMLGregorianCalendar created from parameter values.
+ * @return {@code XMLGregorianCalendar} created from parameter values.
*
* @see DatatypeConstants#FIELD_UNDEFINED
*
* @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
* as determined by the Date/Time Data Mapping table in {@link XMLGregorianCalendar}
- * or if the composite values constitute an invalid XMLGregorianCalendar instance
+ * or if the composite values constitute an invalid {@code XMLGregorianCalendar} instance
* as determined by {@link XMLGregorianCalendar#isValid()}.
*/
public XMLGregorianCalendar newXMLGregorianCalendarDate(
@@ -958,20 +963,20 @@ public abstract class DatatypeFactory {
}
/**
- *
Create a Java instance of XML Schema builtin datatype time.
A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
+ *A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
*
* @param hours number of hours
* @param minutes number of minutes
* @param seconds number of seconds
* @param timezone offset in minutes. {@link DatatypeConstants#FIELD_UNDEFINED} indicates optional field is not set.
*
- * @return XMLGregorianCalendar created from parameter values.
+ * @return {@code XMLGregorianCalendar} created from parameter values.
*
* @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
* as determined by the Date/Time Data Mapping table in {@link XMLGregorianCalendar}
- * or if the composite values constitute an invalid XMLGregorianCalendar instance
+ * or if the composite values constitute an invalid {@code XMLGregorianCalendar} instance
* as determined by {@link XMLGregorianCalendar#isValid()}.
*
* @see DatatypeConstants#FIELD_UNDEFINED
@@ -994,24 +999,24 @@ public abstract class DatatypeFactory {
}
/**
- *
Create a Java instance of XML Schema builtin datatype time.
+ * Create a Java instance of XML Schema builtin datatype time. * - *A null value indicates that field is not set.
A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
+ *A {@code null} value indicates that field is not set. + *
A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
*
* @param hours number of hours
* @param minutes number of minutes
* @param seconds number of seconds
- * @param fractionalSecond value of null indicates that this optional field is not set.
+ * @param fractionalSecond value of {@code null} indicates that this optional field is not set.
* @param timezone offset in minutes. {@link DatatypeConstants#FIELD_UNDEFINED} indicates optional field is not set.
*
- * @return XMLGregorianCalendar created from parameter values.
+ * @return {@code XMLGregorianCalendar} created from parameter values.
*
* @see DatatypeConstants#FIELD_UNDEFINED
*
* @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
* as determined by the Date/Time Data Mapping table in {@link XMLGregorianCalendar}
- * or if the composite values constitute an invalid XMLGregorianCalendar instance
+ * or if the composite values constitute an invalid {@code XMLGregorianCalendar} instance
* as determined by {@link XMLGregorianCalendar#isValid()}.
*/
public XMLGregorianCalendar newXMLGregorianCalendarTime(
@@ -1033,9 +1038,9 @@ public abstract class DatatypeFactory {
}
/**
- *
Create a Java instance of XML Schema builtin datatype time.
+ * Create a Java instance of XML Schema builtin datatype time. * - *A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
+ *A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
*
* @param hours number of hours
* @param minutes number of minutes
@@ -1043,13 +1048,13 @@ public abstract class DatatypeFactory {
* @param milliseconds number of milliseconds
* @param timezone offset in minutes. {@link DatatypeConstants#FIELD_UNDEFINED} indicates optional field is not set.
*
- * @return XMLGregorianCalendar created from parameter values.
+ * @return {@code XMLGregorianCalendar} created from parameter values.
*
* @see DatatypeConstants#FIELD_UNDEFINED
*
* @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
* as determined by the Date/Time Data Mapping table in {@link XMLGregorianCalendar}
- * or if the composite values constitute an invalid XMLGregorianCalendar instance
+ * or if the composite values constitute an invalid {@code XMLGregorianCalendar} instance
* as determined by {@link XMLGregorianCalendar#isValid()}.
*/
public XMLGregorianCalendar newXMLGregorianCalendarTime(
diff --git a/jaxp/src/java.xml/share/classes/javax/xml/datatype/Duration.java b/jaxp/src/java.xml/share/classes/javax/xml/datatype/Duration.java
index 350f4af01cc..90f016edfed 100644
--- a/jaxp/src/java.xml/share/classes/javax/xml/datatype/Duration.java
+++ b/jaxp/src/java.xml/share/classes/javax/xml/datatype/Duration.java
@@ -35,37 +35,37 @@ import javax.xml.namespace.QName;
/**
*
Immutable representation of a time span as defined in - * the W3C XML Schema 1.0 specification.
+ * the W3C XML Schema 1.0 specification. * *A Duration object represents a period of Gregorian time, * which consists of six fields (years, months, days, hours, - * minutes, and seconds) plus a sign (+/-) field.
+ * minutes, and seconds) plus a sign (+/-) field. * - *The first five fields have non-negative (>=0) integers or null + *
The first five fields have non-negative ({@literal >=}0) integers or null * (which represents that the field is not set), * and the seconds field has a non-negative decimal or null. - * A negative sign indicates a negative duration.
+ * A negative sign indicates a negative duration. * *This class provides a number of methods that make it easy * to use for the duration datatype of XML Schema 1.0 with - * the errata.
+ * the errata. * *Duration objects only have partial order, where two values A and B - * maybe either:
+ * maybe either: *For example, 30 days cannot be meaningfully compared to one month. * The {@link #compare(Duration duration)} method implements this - * relationship.
+ * relationship. * *See the {@link #isLongerThan(Duration)} method for details about
- * the order relationship among Duration objects.
This class provides a set of basic arithmetic operations, such @@ -73,20 +73,20 @@ import javax.xml.namespace.QName; * Because durations don't have total order, an operation could * fail for some combinations of operations. For example, you cannot * subtract 15 days from 1 month. See the javadoc of those methods - * for detailed conditions where this could happen.
+ * for detailed conditions where this could happen. * *Also, division of a duration by a number is not provided because
- * the Duration class can only deal with finite precision
- * decimal numbers. For example, one cannot represent 1 sec divided by 3.
However, you could substitute a division by 3 with multiplying - * by numbers such as 0.3 or 0.333.
+ * by numbers such as 0.3 or 0.333. * *
- * Because some operations of Duration rely on {@link Calendar}
+ * Because some operations of {@code Duration} rely on {@link Calendar}
* even though {@link Duration} can hold very large or very small values,
- * some of the methods may not work correctly on such Durations.
+ * some of the methods may not work correctly on such {@code Duration}s.
* The impacted methods document their dependency on {@link Calendar}.
*
* @author Joseph Fialli
@@ -99,7 +99,7 @@ import javax.xml.namespace.QName;
public abstract class Duration {
/**
- *
Debugging true or false.
Note: Always use the {@link DatatypeFactory} to
- * construct an instance of Duration.
+ * construct an instance of {@code Duration}.
* The constructor on this class cannot be guaranteed to
* produce an object with a consistent state and may be
- * removed in the future.
Return the name of the XML Schema date/time type that this instance
+ * Return the name of the XML Schema date/time type that this instance
* maps to. Type is computed based on fields that are set,
- * i.e. {@link #isSet(DatatypeConstants.Field field)} == true.
|
- * Required fields for XML Schema 1.0 Date/Time Datatypes. + * Required fields for XML Schema 1.0 Date/Time Datatypes. * (timezone is optional for all date/time datatypes) * |
* |||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| XML Schema 1.0 - * datatype + * | XML Schema 1.0 + * datatype * field |
- * Related XMLGregorianCalendar Accessor(s) |
+ * Related XMLGregorianCalendar Accessor(s) |
* Value Range | *|
|---|---|---|---|---|---|
| year | - * {@link #getYear()} + {@link #getEon()} or + * | year | + * {@link #getYear()} + {@link #getEon()} or * {@link #getEonAndYear} * |
- * getYear() is a value between -(10^9-1) to (10^9)-1
- * or {@link DatatypeConstants#FIELD_UNDEFINED}.- * {@link #getEon()} is high order year value in billion of years. - * getEon() has values greater than or equal to (10^9) or less than or equal to -(10^9).
- * A value of null indicates field is undefined.
+ * | {@code getYear()} is a value between -(10^9-1) to (10^9)-1
+ * or {@link DatatypeConstants#FIELD_UNDEFINED}. + * {@link #getEon()} is high order year value in billion of years. + * {@code getEon()} has values greater than or equal to (10^9) or less than or equal to -(10^9). + * A value of null indicates field is undefined. * Given that XML Schema 1.0 errata states that the year zero * will be a valid lexical value in a future version of XML Schema, * this class allows the year field to be set to zero. Otherwise, @@ -89,20 +89,20 @@ import java.util.GregorianCalendar; * |
*
| month | + *month | *{@link #getMonth()} | *1 to 12 or {@link DatatypeConstants#FIELD_UNDEFINED} | *||
| day | + *day | *{@link #getDay()} | - * Independent of month, max range is 1 to 31 or {@link DatatypeConstants#FIELD_UNDEFINED}. + * | Independent of month, max range is 1 to 31 or {@link DatatypeConstants#FIELD_UNDEFINED}. * The normative value constraint stated relative to month * field's value is in W3C XML Schema 1.0 Part 2, Appendix D. * |
* |
| hour | + *hour | *{@link #getHour()} | ** 0 to 23 or {@link DatatypeConstants#FIELD_UNDEFINED}. @@ -114,28 +114,28 @@ import java.util.GregorianCalendar; * | *||
| minute | + *minute | *{@link #getMinute()} | *0 to 59 or {@link DatatypeConstants#FIELD_UNDEFINED} | *||
| second | + *second | *
- * {@link #getSecond()} + {@link #getMillisecond()}/1000 or + * {@link #getSecond()} + {@link #getMillisecond()}/1000 or * {@link #getSecond()} + {@link #getFractionalSecond()} * |
*
- * {@link #getSecond()} from 0 to 60 or {@link DatatypeConstants#FIELD_UNDEFINED}. - * (Note: 60 only allowable for leap second.) + * {@link #getSecond()} from 0 to 60 or {@link DatatypeConstants#FIELD_UNDEFINED}. + * (Note: 60 only allowable for leap second.) * {@link #getFractionalSecond()} allows for infinite precision over the range from 0.0 to 1.0 when - * the {@link #getSecond()} is defined. - * FractionalSecond is optional and has a value of null when it is undefined.+ * the {@link #getSecond()} is defined. + * {@code FractionalSecond} is optional and has a value of {@code null} when it is undefined. * {@link #getMillisecond()} is the convenience * millisecond precision of value of {@link #getFractionalSecond()}. * |
* ||
| timezone | + *timezone | *{@link #getTimezone()} | *Number of minutes or {@link DatatypeConstants#FIELD_UNDEFINED}. * Value range from -14 hours (-14 * 60 minutes) to 14 hours (14 * 60 minutes). @@ -145,14 +145,13 @@ import java.util.GregorianCalendar; * |
All maximum value space constraints listed for the fields in the table
- * above are checked by factory methods, @{link DatatypeFactory},
+ * above are checked by factory methods, {@link DatatypeFactory},
* setter methods and parse methods of
- * this class. IllegalArgumentException is thrown when a
+ * this class. {@code IllegalArgumentException} is thrown when a
* parameter's value is outside the value constraint for the field or
* if the composite
* values constitute an invalid XMLGregorianCalendar instance (for example, if
* the 31st of June is specified).
- *
The following operations are defined for this class: *
Note: Always use the {@link DatatypeFactory} to
- * construct an instance of XMLGregorianCalendar.
+ * construct an instance of {@code XMLGregorianCalendar}.
* The constructor on this class cannot be guaranteed to
* produce an object with a consistent state and may be
- * removed in the future.
Unset all fields to undefined.
+ * Unset all fields to undefined. * *Set all int fields to {@link DatatypeConstants#FIELD_UNDEFINED} and reference fields - * to null.
+ * to null. */ public abstract void clear(); /** - *Reset this XMLGregorianCalendar to its original values.
XMLGregorianCalendar is reset to the same values as when it was created with
+ *
{@code XMLGregorianCalendar} is reset to the same values as when it was created with * {@link DatatypeFactory#newXMLGregorianCalendar()}, * {@link DatatypeFactory#newXMLGregorianCalendar(String lexicalRepresentation)}, * {@link DatatypeFactory#newXMLGregorianCalendar( @@ -250,83 +248,82 @@ public abstract class XMLGregorianCalendar * int seconds, * int milliseconds, * int timezone)}. - *
* - *reset() is designed to allow the reuse of existing XMLGregorianCalendars
- * thus saving resources associated with the creation of new XMLGregorianCalendars.
{@code reset()} is designed to allow the reuse of existing {@code XMLGregorianCalendar}s + * thus saving resources associated with the creation of new {@code XMLGregorianCalendar}s. */ public abstract void reset(); /** - *
Set low and high order component of XSD dateTime year field.
Unset this field by invoking the setter with a parameter value of null.
Unset this field by invoking the setter with a parameter value of {@code null}.
*
* @param year value constraints summarized in year field of date/time field mapping table.
*
- * @throws IllegalArgumentException if year parameter is
+ * @throws IllegalArgumentException if {@code year} parameter is
* outside value constraints for the field as specified in
* date/time field mapping table.
*/
public abstract void setYear(BigInteger year);
/**
- *
Set year of XSD dateTime year field.
Unset this field by invoking the setter with a parameter value of - * {@link DatatypeConstants#FIELD_UNDEFINED}.
+ * {@link DatatypeConstants#FIELD_UNDEFINED}. * - *Note: if the absolute value of the year parameter
+ *
Note: if the absolute value of the {@code year} parameter
* is less than 10^9, the eon component of the XSD year field is set to
- * null by this method.
null.
+ * If year is {@link DatatypeConstants#FIELD_UNDEFINED}, then eon is set to {@code null}.
*/
public abstract void setYear(int year);
/**
- * Set month.
+ * Set month. * - *Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.
+ *Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.
*
* @param month value constraints summarized in month field of date/time field mapping table.
*
- * @throws IllegalArgumentException if month parameter is
+ * @throws IllegalArgumentException if {@code month} parameter is
* outside value constraints for the field as specified in
* date/time field mapping table.
*/
public abstract void setMonth(int month);
/**
- *
Set days in month.
+ * Set days in month. * - *Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.
+ *Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.
*
* @param day value constraints summarized in day field of date/time field mapping table.
*
- * @throws IllegalArgumentException if day parameter is
+ * @throws IllegalArgumentException if {@code day} parameter is
* outside value constraints for the field as specified in
* date/time field mapping table.
*/
public abstract void setDay(int day);
/**
- *
Set the number of minutes in the timezone offset.
+ * Set the number of minutes in the timezone offset. * - *Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.
+ *Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.
*
* @param offset value constraints summarized in
* timezone field of date/time field mapping table.
*
- * @throws IllegalArgumentException if offset parameter is
+ * @throws IllegalArgumentException if {@code offset} parameter is
* outside value constraints for the field as specified in
* date/time field mapping table.
*/
public abstract void setTimezone(int offset);
/**
- *
Set time as one unit.
+ * Set time as one unit. * * @param hour value constraints are summarized in * hour field of date/time field mapping table. @@ -352,71 +349,71 @@ public abstract class XMLGregorianCalendar } /** - *Set hours.
+ * Set hours. * - *Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.
+ *Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.
*
* @param hour value constraints summarized in hour field of date/time field mapping table.
*
- * @throws IllegalArgumentException if hour parameter is outside value constraints for the field as specified in
+ * @throws IllegalArgumentException if {@code hour} parameter is outside value constraints for the field as specified in
* date/time field mapping table.
*/
public abstract void setHour(int hour);
/**
- *
Set minutes.
+ * Set minutes. * - *Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.
+ *Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.
*
* @param minute value constraints summarized in minute field of date/time field mapping table.
*
- * @throws IllegalArgumentException if minute parameter is outside value constraints for the field as specified in
+ * @throws IllegalArgumentException if {@code minute} parameter is outside value constraints for the field as specified in
* date/time field mapping table.
*/
public abstract void setMinute(int minute);
/**
- *
Set seconds.
+ * Set seconds. * - *Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.
+ *Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.
*
* @param second value constraints summarized in second field of date/time field mapping table.
*
- * @throws IllegalArgumentException if second parameter is outside value constraints for the field as specified in
+ * @throws IllegalArgumentException if {@code second} parameter is outside value constraints for the field as specified in
* date/time field mapping table.
*/
public abstract void setSecond(int second);
/**
- *
Set milliseconds.
+ * Set milliseconds. * - *Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.
+ *Unset this field by invoking the setter with a parameter value of {@link DatatypeConstants#FIELD_UNDEFINED}.
*
* @param millisecond value constraints summarized in
* second field of date/time field mapping table.
*
- * @throws IllegalArgumentException if millisecond parameter is outside value constraints for the field as specified
+ * @throws IllegalArgumentException if {@code millisecond} parameter is outside value constraints for the field as specified
* in date/time field mapping table.
*/
public abstract void setMillisecond(int millisecond);
/**
- *
Set fractional seconds.
+ * Set fractional seconds. * - *Unset this field by invoking the setter with a parameter value of null.
Unset this field by invoking the setter with a parameter value of {@code null}.
*
* @param fractional value constraints summarized in
* second field of date/time field mapping table.
*
- * @throws IllegalArgumentException if fractional parameter is outside value constraints for the field as specified
+ * @throws IllegalArgumentException if {@code fractional} parameter is outside value constraints for the field as specified
* in date/time field mapping table.
*/
public abstract void setFractionalSecond(BigDecimal fractional);
/**
- *
Set time as one unit, including the optional infinite precision - * fractional seconds.
+ * Set time as one unit, including the optional infinite precision + * fractional seconds. * * @param hour value constraints are summarized in * hour field of date/time field mapping table. @@ -424,7 +421,7 @@ public abstract class XMLGregorianCalendar * minute field of date/time field mapping table. * @param second value constraints are summarized in * second field of date/time field mapping table. - * @param fractional value ofnull indicates this optional
+ * @param fractional value of {@code null} indicates this optional
* field is not set.
*
* @throws IllegalArgumentException if any parameter is
@@ -445,7 +442,7 @@ public abstract class XMLGregorianCalendar
/**
- * Set time as one unit, including optional milliseconds.
+ * Set time as one unit, including optional milliseconds. * * @param hour value constraints are summarized in * hour field of date/time field mapping table. @@ -469,13 +466,13 @@ public abstract class XMLGregorianCalendar } /** - *Return high order component for XML Schema 1.0 dateTime datatype field for
- * year.
- * null if this optional part of the year field is not defined.
Value constraints for this value are summarized in - * year field of date/time field mapping table.
- * @return eon of thisXMLGregorianCalendar. The value
+ * year field of date/time field mapping table.
+ * @return eon of this {@code XMLGregorianCalendar}. The value
* returned is an integer multiple of 10^9.
*
* @see #getYear()
@@ -484,13 +481,13 @@ public abstract class XMLGregorianCalendar
public abstract BigInteger getEon();
/**
- * Return low order component for XML Schema 1.0 dateTime datatype field for
- * year or {@link DatatypeConstants#FIELD_UNDEFINED}.
Value constraints for this value are summarized in - * year field of date/time field mapping table.
+ * year field of date/time field mapping table. * - * @return year of thisXMLGregorianCalendar.
+ * @return year of this {@code XMLGregorianCalendar}.
*
* @see #getEon()
* @see #getEonAndYear()
@@ -498,16 +495,16 @@ public abstract class XMLGregorianCalendar
public abstract int getYear();
/**
- * Return XML Schema 1.0 dateTime datatype field for
- * year.
Value constraints for this value are summarized in - * year field of date/time field mapping table.
+ * year field of date/time field mapping table. * - * @return sum ofeon and BigInteger.valueOf(year)
- * when both fields are defined. When only year is defined,
- * return it. When both eon and year are not
- * defined, return null.
+ * @return sum of {@code eon} and {@code BigInteger.valueOf(year)}
+ * when both fields are defined. When only {@code year} is defined,
+ * return it. When both {@code eon} and {@code year} are not
+ * defined, return {@code null}.
*
* @see #getEon()
* @see #getYear()
@@ -515,21 +512,21 @@ public abstract class XMLGregorianCalendar
public abstract BigInteger getEonAndYear();
/**
- * Return number of month or {@link DatatypeConstants#FIELD_UNDEFINED}.
+ * Return number of month or {@link DatatypeConstants#FIELD_UNDEFINED}. * *Value constraints for this value are summarized in - * month field of date/time field mapping table.
+ * month field of date/time field mapping table. * - * @return year of thisXMLGregorianCalendar.
+ * @return year of this {@code XMLGregorianCalendar}.
*
*/
public abstract int getMonth();
/**
- * Return day in month or {@link DatatypeConstants#FIELD_UNDEFINED}.
+ * Return day in month or {@link DatatypeConstants#FIELD_UNDEFINED}.
*
* Value constraints for this value are summarized in - * day field of date/time field mapping table.
+ * day field of date/time field mapping table. * * @see #setDay(int) */ @@ -540,7 +537,7 @@ public abstract class XMLGregorianCalendar * {@link DatatypeConstants#FIELD_UNDEFINED} if this optional field is not defined. * *Value constraints for this value are summarized in - * timezone field of date/time field mapping table.
+ * timezone field of date/time field mapping table. * * @see #setTimezone(int) */ @@ -551,34 +548,34 @@ public abstract class XMLGregorianCalendar * Returns {@link DatatypeConstants#FIELD_UNDEFINED} if this field is not defined. * *Value constraints for this value are summarized in - * hour field of date/time field mapping table.
+ * hour field of date/time field mapping table. * @see #setTime(int, int, int) */ public abstract int getHour(); /** - * Return minutes or {@link DatatypeConstants#FIELD_UNDEFINED}. + * Return minutes or {@link DatatypeConstants#FIELD_UNDEFINED}. * Returns {@link DatatypeConstants#FIELD_UNDEFINED} if this field is not defined. * *Value constraints for this value are summarized in - * minute field of date/time field mapping table.
+ * minute field of date/time field mapping table. * @see #setTime(int, int, int) */ public abstract int getMinute(); /** - *Return seconds or {@link DatatypeConstants#FIELD_UNDEFINED}.
+ * Return seconds or {@link DatatypeConstants#FIELD_UNDEFINED}. * *Returns {@link DatatypeConstants#FIELD_UNDEFINED} if this field is not defined. * When this field is not defined, the optional xs:dateTime * fractional seconds field, represented by * {@link #getFractionalSecond()} and {@link #getMillisecond()}, - * must not be defined.
+ * must not be defined. * *Value constraints for this value are summarized in - * second field of date/time field mapping table.
+ * second field of date/time field mapping table. * - * @return Second of thisXMLGregorianCalendar.
+ * @return Second of this {@code XMLGregorianCalendar}.
*
* @see #getFractionalSecond()
* @see #getMillisecond()
@@ -587,20 +584,20 @@ public abstract class XMLGregorianCalendar
public abstract int getSecond();
/**
- * Return millisecond precision of {@link #getFractionalSecond()}.
+ * Return millisecond precision of {@link #getFractionalSecond()}. * *This method represents a convenience accessor to infinite
* precision fractional second value returned by
* {@link #getFractionalSecond()}. The returned value is the rounded
* down to milliseconds value of
* {@link #getFractionalSecond()}. When {@link #getFractionalSecond()}
- * returns null, this method must return
- * {@link DatatypeConstants#FIELD_UNDEFINED}.
Value constraints for this value are summarized in - * second field of date/time field mapping table.
+ * second field of date/time field mapping table. * - * @return Millisecond of thisXMLGregorianCalendar.
+ * @return Millisecond of this {@code XMLGregorianCalendar}.
*
* @see #getFractionalSecond()
* @see #setTime(int, int, int)
@@ -618,18 +615,18 @@ public abstract class XMLGregorianCalendar
}
/**
- * Return fractional seconds.
+ * Return fractional seconds. * - *null is returned when this optional field is not defined.
{@code null} is returned when this optional field is not defined. * *
Value constraints are detailed in - * second field of date/time field mapping table.
+ * second field of date/time field mapping table. * *This optional field can only have a defined value when the * xs:dateTime second field, represented by {@link #getSecond()}, - * does not return {@link DatatypeConstants#FIELD_UNDEFINED}.
+ * does not return {@link DatatypeConstants#FIELD_UNDEFINED}. * - * @return fractional seconds of thisXMLGregorianCalendar.
+ * @return fractional seconds of this {@code XMLGregorianCalendar}.
*
* @see #getSecond()
* @see #setTime(int, int, int, BigDecimal)
@@ -638,51 +635,51 @@ public abstract class XMLGregorianCalendar
// comparisons
/**
- * Compare two instances of W3C XML Schema 1.0 date/time datatypes + * Compare two instances of W3C XML Schema 1.0 date/time datatypes * according to partial order relation defined in * W3C XML Schema 1.0 Part 2, Section 3.2.7.3, - * Order relation on dateTime.
+ * Order relation on dateTime. * - *xsd:dateTime datatype field mapping to accessors of
+ *
{@code xsd:dateTime} datatype field mapping to accessors of * this class are defined in - * date/time field mapping table.
+ * date/time field mapping table. * - * @param xmlGregorianCalendar Instance ofXMLGregorianCalendar to compare
+ * @param xmlGregorianCalendar Instance of {@code XMLGregorianCalendar} to compare
*
- * @return The relationship between this XMLGregorianCalendar and
- * the specified xmlGregorianCalendar as
+ * @return The relationship between {@code this} {@code XMLGregorianCalendar} and
+ * the specified {@code xmlGregorianCalendar} as
* {@link DatatypeConstants#LESSER},
* {@link DatatypeConstants#EQUAL},
* {@link DatatypeConstants#GREATER} or
* {@link DatatypeConstants#INDETERMINATE}.
*
- * @throws NullPointerException if xmlGregorianCalendar is null.
+ * @throws NullPointerException if {@code xmlGregorianCalendar} is null.
*/
public abstract int compare(XMLGregorianCalendar xmlGregorianCalendar);
/**
- * Normalize this instance to UTC.
+ * Normalize this instance to UTC. * - *2000-03-04T23:00:00+03:00 normalizes to 2000-03-04T20:00:00Z
- *Implements W3C XML Schema Part 2, Section 3.2.7.3 (A).
+ *2000-03-04T23:00:00+03:00 normalizes to 2000-03-04T20:00:00Z + *
Implements W3C XML Schema Part 2, Section 3.2.7.3 (A).
*
- * @return this XMLGregorianCalendar normalized to UTC.
+ * @return {@code this} {@code XMLGregorianCalendar} normalized to UTC.
*/
public abstract XMLGregorianCalendar normalize();
/**
- *
Compares this calendar to the specified object. The result is
- * true if and only if the argument is not null and is an
- * XMLGregorianCalendar object that represents the same
- * instant in time as this object.
true when obj is an instance of
- * XMLGregorianCalendar and
+ * @return {@code true} when {@code obj} is an instance of
+ * {@code XMLGregorianCalendar} and
* {@link #compare(XMLGregorianCalendar obj)}
* returns {@link DatatypeConstants#EQUAL},
- * otherwise false.
+ * otherwise {@code false}.
*/
public boolean equals(Object obj) {
@@ -693,7 +690,7 @@ public abstract class XMLGregorianCalendar
}
/**
- * Returns a hash code consistent with the definition of the equals method.
+ * Returns a hash code consistent with the definition of the equals method. * * @return hash code of this object. */ @@ -721,15 +718,15 @@ public abstract class XMLGregorianCalendar } /** - *Return the lexical representation of this instance.
+ * Return the lexical representation of {@code this} instance.
* The format is specified in
* XML Schema 1.0 Part 2, Section 3.2.[7-14].1,
- * Lexical Representation".
Specific target lexical representation format is determined by - * {@link #getXMLSchemaType()}.
+ * {@link #getXMLSchemaType()}. * - * @return XML, asString, representation of this XMLGregorianCalendar
+ * @return XML, as {@code String}, representation of this {@code XMLGregorianCalendar}
*
* @throws IllegalStateException if the combination of set fields
* does not match one of the eight defined XML Schema builtin date/time datatypes.
@@ -737,14 +734,14 @@ public abstract class XMLGregorianCalendar
public abstract String toXMLFormat();
/**
- * Return the name of the XML Schema date/time type that this instance - * maps to. Type is computed based on fields that are set.
+ * Return the name of the XML Schema date/time type that this instance + * maps to. Type is computed based on fields that are set. * *|
- * Required fields for XML Schema 1.0 Date/Time Datatypes. + * Required fields for XML Schema 1.0 Date/Time Datatypes. * (timezone is optional for all date/time datatypes) * |
* |||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
* Field by Field Conversion from this class to
- * java.util.GregorianCalendar
+ * {@code java.util.GregorianCalendar}
* |
* ||||
|---|---|---|---|---|
java.util.GregorianCalendar field |
- * javax.xml.datatype.XMLGregorianCalendar field |
+ * {@code java.util.GregorianCalendar} field | + *{@code javax.xml.datatype.XMLGregorianCalendar} field | *|
ERA |
- * {@link #getEonAndYear()}.signum() < 0 ? GregorianCalendar.BC : GregorianCalendar.AD |
+ * {@code ERA} | + *{@link #getEonAndYear()}{@code .signum() < 0 ? GregorianCalendar.BC : GregorianCalendar.AD} | *|
YEAR |
- * {@link #getEonAndYear()}.abs().intValue()* |
+ * {@code YEAR} | + *{@link #getEonAndYear()}{@code .abs().intValue()}* | *|
MONTH |
+ * {@code MONTH} | *{@link #getMonth()} - {@link DatatypeConstants#JANUARY} + {@link GregorianCalendar#JANUARY} | *||
DAY_OF_MONTH |
+ * {@code DAY_OF_MONTH} | *{@link #getDay()} | *||
HOUR_OF_DAY |
+ * {@code HOUR_OF_DAY} | *{@link #getHour()} | *||
MINUTE |
+ * {@code MINUTE} | *{@link #getMinute()} | *||
SECOND |
+ * {@code SECOND} | *{@link #getSecond()} | *||
MILLISECOND |
+ * {@code MILLISECOND} | *get millisecond order from {@link #getFractionalSecond()}* | *||
GregorianCalendar.setTimeZone(TimeZone) |
+ * {@code GregorianCalendar.setTimeZone(TimeZone)} | *{@link #getTimezone()} formatted into Custom timezone id | *||
- * getNamespaceURI(prefix)
+ * {@code getNamespaceURI(prefix)}
* return value for specified prefixes
* |
* |||
DEFAULT_NS_PREFIX ("") |
+ * {@code DEFAULT_NS_PREFIX} ("") | *default Namespace URI in the current scope or
- * {@link
+ * |
@@ -117,24 +117,24 @@ public interface NamespaceContext {
* |
| unbound prefix | *
- * {@link
+ * |
* ||
XMLConstants.XML_NS_PREFIX ("xml") |
- * XMLConstants.XML_NS_URI
+ * | {@code XMLConstants.XML_NS_PREFIX} ("xml") | + *{@code XMLConstants.XML_NS_URI} * ("http://www.w3.org/XML/1998/namespace") | *
XMLConstants.XMLNS_ATTRIBUTE ("xmlns") |
- * XMLConstants.XMLNS_ATTRIBUTE_NS_URI
+ * | {@code XMLConstants.XMLNS_ATTRIBUTE} ("xmlns") | + *{@code XMLConstants.XMLNS_ATTRIBUTE_NS_URI} * ("http://www.w3.org/2000/xmlns/") | *
null |
- * IllegalArgumentException is thrown |
+ * {@code null} | + *{@code IllegalArgumentException} is thrown | *
prefix is
- * null
+ * @throws IllegalArgumentException When {@code prefix} is
+ * {@code null}
*/
String getNamespaceURI(String prefix);
/**
- * Get prefix bound to Namespace URI in the current scope.
+ * Get prefix bound to Namespace URI in the current scope. * *To get all prefixes bound to a Namespace URI in the current - * scope, use {@link #getPrefixes(String namespaceURI)}.
+ * scope, use {@link #getPrefixes(String namespaceURI)}. * *When requesting a prefix by Namespace URI, the following * table describes the returned prefix value for all Namespace URI - * values:
+ * values: * *
- * getPrefix(namespaceURI) return value for
+ * {@code getPrefix(namespaceURI)} return value for
* specified Namespace URIs
* |
* |||
|---|---|---|---|
| <default Namespace URI> | - *XMLConstants.DEFAULT_NS_PREFIX ("")
+ * | {@code |
+ * {@code XMLConstants.DEFAULT_NS_PREFIX} ("") * | *
| unbound Namespace URI | - *null |
+ * {@code null} | *|
XMLConstants.XML_NS_URI
+ * | {@code XMLConstants.XML_NS_URI} * ("http://www.w3.org/XML/1998/namespace") | - *XMLConstants.XML_NS_PREFIX ("xml") |
+ * {@code XMLConstants.XML_NS_PREFIX} ("xml") | *
XMLConstants.XMLNS_ATTRIBUTE_NS_URI
+ * | {@code XMLConstants.XMLNS_ATTRIBUTE_NS_URI} * ("http://www.w3.org/2000/xmlns/") | - *XMLConstants.XMLNS_ATTRIBUTE ("xmlns") |
+ * {@code XMLConstants.XMLNS_ATTRIBUTE} ("xmlns") | *
null |
- * IllegalArgumentException is thrown |
+ * {@code null} | + *{@code IllegalArgumentException} is thrown | *
namespaceURI is
- * null
+ * @throws IllegalArgumentException When {@code namespaceURI} is
+ * {@code null}
*/
String getPrefix(String namespaceURI);
/**
- * Get all prefixes bound to a Namespace URI in the current - * scope.
+ * Get all prefixes bound to a Namespace URI in the current + * scope. * *An Iterator over String elements is returned in an arbitrary, - * implementation dependent, order.
+ * implementation dependent, order. * - *The The {@code Iterator} is
* not modifiable. e.g. the
- * Iterator is
+ * remove() method will throw
- * UnsupportedOperationException.
When requesting prefixes by Namespace URI, the following * table describes the returned prefixes value for all Namespace - * URI values:
+ * URI values: * *
- * getPrefixes(namespaceURI) return value for
+ * | {@code + * getPrefixes(namespaceURI)} return value for * specified Namespace URIs | *||
|---|---|---|---|
| bound Namespace URI, - * including the <default Namespace URI> | + * including the {@code
- * Iterator over prefixes bound to Namespace URI in
+ * {@code Iterator} over prefixes bound to Namespace URI in
* the current scope in an arbitrary,
* implementation dependent,
* order
@@ -255,34 +255,34 @@ public interface NamespaceContext {
* | ||
| unbound Namespace URI | - *empty Iterator |
+ * empty {@code Iterator} | *|
XMLConstants.XML_NS_URI
+ * | {@code XMLConstants.XML_NS_URI} * ("http://www.w3.org/XML/1998/namespace") | - *Iterator with one element set to
- * XMLConstants.XML_NS_PREFIX ("xml") |
+ * {@code Iterator} with one element set to + * {@code XMLConstants.XML_NS_PREFIX} ("xml") | *
XMLConstants.XMLNS_ATTRIBUTE_NS_URI
+ * | {@code XMLConstants.XMLNS_ATTRIBUTE_NS_URI} * ("http://www.w3.org/2000/xmlns/") | - *Iterator with one element set to
- * XMLConstants.XMLNS_ATTRIBUTE ("xmlns") |
+ * {@code Iterator} with one element set to + * {@code XMLConstants.XMLNS_ATTRIBUTE} ("xmlns") | *
null |
- * IllegalArgumentException is thrown |
+ * {@code null} | + *{@code IllegalArgumentException} is thrown | *
Iterator for all prefixes bound to the
+ * @return {@code Iterator} for all prefixes bound to the
* Namespace URI in the current scope
*
- * @throws IllegalArgumentException When namespaceURI is
- * null
+ * @throws IllegalArgumentException When {@code namespaceURI} is
+ * {@code null}
*/
Iterator getPrefixes(String namespaceURI);
}
diff --git a/jaxp/src/java.xml/share/classes/javax/xml/parsers/DocumentBuilderFactory.java b/jaxp/src/java.xml/share/classes/javax/xml/parsers/DocumentBuilderFactory.java
index c500869cd7f..71fed6c2c15 100644
--- a/jaxp/src/java.xml/share/classes/javax/xml/parsers/DocumentBuilderFactory.java
+++ b/jaxp/src/java.xml/share/classes/javax/xml/parsers/DocumentBuilderFactory.java
@@ -47,8 +47,8 @@ public abstract class DocumentBuilderFactory {
private boolean coalescing = false;
/**
- * Protected constructor to prevent instantiation. - * Use {@link #newInstance()}.
+ * Protected constructor to prevent instantiation. + * Use {@link #newInstance()}. */ protected DocumentBuilderFactory () { } @@ -60,7 +60,6 @@ public abstract class DocumentBuilderFactory { * This method uses the following ordered lookup procedure to determine * the {@code DocumentBuilderFactory} implementation class to * load: - **
Obtain a new instance of a {@code DocumentBuilderFactory} from class name. + * Obtain a new instance of a {@code DocumentBuilderFactory} from class name. * This function is useful when there are multiple providers in the classpath. * It gives more control to the application as it can specify which provider * should be loaded. @@ -143,21 +142,22 @@ public abstract class DocumentBuilderFactory { *
Setting the {@code jaxp.debug} system property will cause * this method to print a lot of debug messages - * to {@code System.err} about what it is doing and where it is looking at.
+ * to {@code System.err} about what it is doing and where it is looking at. * - *If you have problems try:
+ *If you have problems try: *
* java -Djaxp.debug=1 YourProgram ....
*
*
- * @param factoryClassName fully qualified factory class name that provides implementation of {@code javax.xml.parsers.DocumentBuilderFactory}.
+ * @param factoryClassName fully qualified factory class name that provides
+ * implementation of {@code javax.xml.parsers.DocumentBuilderFactory}.
*
- * @param classLoader ClassLoader used to load the factory class. If null
- * current Thread's context classLoader is used to load the factory class.
+ * @param classLoader {@code ClassLoader} used to load the factory class. If {@code null}
+ * current {@code Thread}'s context classLoader is used to load the factory class.
*
* @return New instance of a {@code DocumentBuilderFactory}
*
- * @throws FactoryConfigurationError if factoryClassName is null, or
+ * @throws FactoryConfigurationError if {@code factoryClassName} is {@code null}, or
* the factory class cannot be loaded, instantiated.
*
* @see #newInstance()
@@ -187,7 +187,7 @@ public abstract class DocumentBuilderFactory {
/**
* Specifies that the parser produced by this code will
* provide support for XML namespaces. By default the value of this is set
- * to false
+ * to {@code false}
*
* @param awareness true if the parser produced will provide support
* for XML namespaces; false otherwise.
@@ -200,7 +200,7 @@ public abstract class DocumentBuilderFactory {
/**
* Specifies that the parser produced by this code will
* validate documents as they are parsed. By default the value of this
- * is set to false.
+ * is set to {@code false}.
*
* * Note that "the validation" here means @@ -208,15 +208,13 @@ public abstract class DocumentBuilderFactory { * parser as defined in the XML recommendation. * In other words, it essentially just controls the DTD validation. * (except the legacy two properties defined in JAXP 1.2.) - *
* *
* To use modern schema languages such as W3C XML Schema or
* RELAX NG instead of DTD, you can configure your parser to be
* a non-validating parser by leaving the {@link #setValidating(boolean)}
- * method false, then use the {@link #setSchema(Schema)}
+ * method {@code false}, then use the {@link #setSchema(Schema)}
* method to associate a schema to a parser.
- *
false.
+ * the value of this is set to {@code false}.
*
* @param whitespace true if the parser created must eliminate whitespace
* in the element content when parsing XML documents;
@@ -248,7 +246,7 @@ public abstract class DocumentBuilderFactory {
/**
* Specifies that the parser produced by this code will
* expand entity reference nodes. By default the value of this is set to
- * true
+ * {@code true}
*
* @param expandEntityRef true if the parser produced will expand entity
* reference nodes; false otherwise.
@@ -259,11 +257,10 @@ public abstract class DocumentBuilderFactory {
}
/**
- * Specifies that the parser produced by this code will
- * ignore comments. By default the value of this is set to false
- * .
boolean value to ignore comments during processing
+ * @param ignoreComments {@code boolean} value to ignore comments during processing
*/
public void setIgnoringComments(boolean ignoreComments) {
@@ -274,7 +271,7 @@ public abstract class DocumentBuilderFactory {
* Specifies that the parser produced by this code will
* convert CDATA nodes to Text nodes and append it to the
* adjacent (if any) text node. By default the value of this is set to
- * false
+ * {@code false}
*
* @param coalescing true if the parser produced will convert CDATA nodes
* to Text nodes and append it to the adjacent (if any)
@@ -367,25 +364,23 @@ public abstract class DocumentBuilderFactory {
* All implementations that implement JAXP 1.5 or newer are required to
* support the {@link javax.xml.XMLConstants#ACCESS_EXTERNAL_DTD} and
* {@link javax.xml.XMLConstants#ACCESS_EXTERNAL_SCHEMA} properties.
- *
+ *
* * Setting the {@link javax.xml.XMLConstants#ACCESS_EXTERNAL_DTD} property * restricts the access to external DTDs, external Entity References to the * protocols specified by the property. * If access is denied during parsing due to the restriction of this property, * {@link org.xml.sax.SAXException} will be thrown by the parse methods defined by * {@link javax.xml.parsers.DocumentBuilder}. - *
- *+ *
Set a feature for this {@code DocumentBuilderFactory} and DocumentBuilders created by this factory.
* Feature names are fully qualified {@link java.net.URI}s.
* Implementations may define their own features.
* A {@link ParserConfigurationException} is thrown if this {@code DocumentBuilderFactory} or the
- * DocumentBuilders it creates cannot support the feature.
+ * {@code DocumentBuilder}s it creates cannot support the feature.
* It is possible for a {@code DocumentBuilderFactory} to expose a feature value but be unable to change its state.
- *
* All implementations are required to support the {@link javax.xml.XMLConstants#FEATURE_SECURE_PROCESSING} feature. - * When the feature is:
+ * When the feature is: *true: the implementation will limit XML processing to conform to implementation limits.
+ * {@code true}: the implementation will limit XML processing to conform to implementation limits.
* Examples include entity expansion limits and XML Schema constructs that would consume large amounts of resources.
* If XML processing is limited for security reasons, it will be reported via a call to the registered
* {@link org.xml.sax.ErrorHandler#fatalError(SAXParseException exception)}.
* See {@link DocumentBuilder#setErrorHandler(org.xml.sax.ErrorHandler errorHandler)}.
* false: the implementation will processing XML according to the XML specifications without
+ * {@code false}: the implementation will processing XML according to the XML specifications without
* regard to possible implementation limits.
* true or false.
+ * @param value Is feature state {@code true} or {@code false}.
*
- * @throws ParserConfigurationException if this {@code DocumentBuilderFactory} or the DocumentBuilders
+ * @throws ParserConfigurationException if this {@code DocumentBuilderFactory} or the {@code DocumentBuilder}s
* it creates cannot support this feature.
- * @throws NullPointerException If the name parameter is null.
+ * @throws NullPointerException If the {@code name} parameter is null.
* @since 1.5
*/
public abstract void setFeature(String name, boolean value)
throws ParserConfigurationException;
/**
- * Get the state of the named feature.
+ * Get the state of the named feature. * *
* Feature names are fully qualified {@link java.net.URI}s.
* Implementations may define their own features.
* An {@link ParserConfigurationException} is thrown if this {@code DocumentBuilderFactory} or the
- * DocumentBuilders it creates cannot support the feature.
+ * {@code DocumentBuilder}s it creates cannot support the feature.
* It is possible for an {@code DocumentBuilderFactory} to expose a feature value but be unable to change its state.
- *
DocumentBuilders it creates cannot support this feature.
+ * or the {@code DocumentBuilder}s it creates cannot support this feature.
* @since 1.5
*/
public abstract boolean getFeature(String name)
@@ -501,7 +496,7 @@ public abstract class DocumentBuilderFactory {
}
/**
- * Set the {@link Schema} to be used by parsers created + * Set the {@link Schema} to be used by parsers created * from this factory. * *
@@ -529,26 +524,26 @@ public abstract class DocumentBuilderFactory { * *
* This processing will take effect even if
- * the {@link #isValidating()} method returns false.
+ * the {@link #isValidating()} method returns {@code false}.
*
*
It is an error to use
- * the http://java.sun.com/xml/jaxp/properties/schemaSource
- * property and/or the http://java.sun.com/xml/jaxp/properties/schemaLanguage
+ * the {@code http://java.sun.com/xml/jaxp/properties/schemaSource}
+ * property and/or the {@code http://java.sun.com/xml/jaxp/properties/schemaLanguage}
* property in conjunction with a {@link Schema} object.
* Such configuration will cause a {@link ParserConfigurationException}
- * exception when the {@link #newDocumentBuilder()} is invoked.
* A parser must be able to work with any {@link Schema} * implementation. However, parsers and schemas are allowed * to use implementation-specific custom mechanisms * as long as they yield the result described in the specification. - *
* - * @param schemaSchema to use or null
+ *
+ * @param schema {@code Schema} to use or {@code null}
* to remove a schema.
*
* @throws UnsupportedOperationException When implementation does not
@@ -569,16 +564,16 @@ public abstract class DocumentBuilderFactory {
/**
- * Set state of XInclude processing.
+ * Set state of XInclude processing. * *If XInclude markup is found in the document instance, should it be * processed as specified in - * XML Inclusions (XInclude) Version 1.0.
+ * XML Inclusions (XInclude) Version 1.0. * - *XInclude processing defaults to false.
XInclude processing defaults to {@code false}.
*
- * @param state Set XInclude processing to true or
- * false
+ * @param state Set XInclude processing to {@code true} or
+ * {@code false}
*
* @throws UnsupportedOperationException When implementation does not
* override this method.
@@ -594,7 +589,7 @@ public abstract class DocumentBuilderFactory {
}
/**
- *
Get state of XInclude processing.
+ * Get state of XInclude processing. * * @return current state of XInclude processing * diff --git a/jaxp/src/java.xml/share/classes/javax/xml/parsers/SAXParserFactory.java b/jaxp/src/java.xml/share/classes/javax/xml/parsers/SAXParserFactory.java index 1160a62edf4..1732047ee5e 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/parsers/SAXParserFactory.java +++ b/jaxp/src/java.xml/share/classes/javax/xml/parsers/SAXParserFactory.java @@ -42,17 +42,17 @@ import org.xml.sax.SAXNotSupportedException; public abstract class SAXParserFactory { /** - *Should Parsers be validating?
+ * Should Parsers be validating? */ private boolean validating = false; /** - *Should Parsers be namespace aware?
+ * Should Parsers be namespace aware? */ private boolean namespaceAware = false; /** - *Protected constructor to force use of {@link #newInstance()}.
+ * Protected constructor to force use of {@link #newInstance()}. */ protected SAXParserFactory () { @@ -64,7 +64,6 @@ public abstract class SAXParserFactory { * This method uses the following ordered lookup procedure to determine * the {@code SAXParserFactory} implementation class to * load: - **
Obtain a new instance of a {@code SAXParserFactory} from class name. + * Obtain a new instance of a {@code SAXParserFactory} from class name. * This function is useful when there are multiple providers in the classpath. * It gives more control to the application as it can specify which provider - * should be loaded.
+ * should be loaded. * *Once an application has obtained a reference to a {@code SAXParserFactory} - * it can use the factory to configure and obtain parser instances.
+ * it can use the factory to configure and obtain parser instances. * * *Setting the {@code jaxp.debug} system property will cause * this method to print a lot of debug messages - * to {@code System.err} about what it is doing and where it is looking at.
+ * to {@code System.err} about what it is doing and where it is looking at. * *
* If you have problems, try:
@@ -160,12 +159,12 @@ public abstract class SAXParserFactory {
*
* @param factoryClassName fully qualified factory class name that provides implementation of {@code javax.xml.parsers.SAXParserFactory}.
*
- * @param classLoader ClassLoader used to load the factory class. If null
- * current Thread's context classLoader is used to load the factory class.
+ * @param classLoader {@code ClassLoader} used to load the factory class. If {@code null}
+ * current {@code Thread}'s context classLoader is used to load the factory class.
*
* @return New instance of a {@code SAXParserFactory}
*
- * @throws FactoryConfigurationError if factoryClassName is null, or
+ * @throws FactoryConfigurationError if {@code factoryClassName} is {@code null}, or
* the factory class cannot be loaded, instantiated.
*
* @see #newInstance()
@@ -179,8 +178,8 @@ public abstract class SAXParserFactory {
}
/**
- *
Creates a new instance of a SAXParser using the currently - * configured factory parameters.
+ * Creates a new instance of a SAXParser using the currently + * configured factory parameters. * * @return A new instance of a SAXParser. * @@ -196,7 +195,7 @@ public abstract class SAXParserFactory { /** * Specifies that the parser produced by this code will * provide support for XML namespaces. By default the value of this is set - * tofalse.
+ * to {@code false}.
*
* @param awareness true if the parser produced by this code will
* provide support for XML namespaces; false otherwise.
@@ -209,7 +208,7 @@ public abstract class SAXParserFactory {
/**
* Specifies that the parser produced by this code will
* validate documents as they are parsed. By default the value of this is
- * set to false.
+ * set to {@code false}.
*
* * Note that "the validation" here means @@ -217,15 +216,13 @@ public abstract class SAXParserFactory { * parser as defined in the XML recommendation. * In other words, it essentially just controls the DTD validation. * (except the legacy two properties defined in JAXP 1.2.) - *
* *
* To use modern schema languages such as W3C XML Schema or
* RELAX NG instead of DTD, you can configure your parser to be
* a non-validating parser by leaving the {@link #setValidating(boolean)}
- * method false, then use the {@link #setSchema(Schema)}
+ * method {@code false}, then use the {@link #setSchema(Schema)}
* method to associate a schema to a parser.
- *
Sets the particular feature in the underlying implementation of + * Sets the particular feature in the underlying implementation of * org.xml.sax.XMLReader. * A list of the core features and properties can be found at - * http://www.saxproject.org/
+ * http://www.saxproject.org/ * *All implementations are required to support the {@link javax.xml.XMLConstants#FEATURE_SECURE_PROCESSING} feature. - * When the feature is
+ * When the feature is *true: the implementation will limit XML processing to conform to implementation limits.
+ * {@code true}: the implementation will limit XML processing to conform to implementation limits.
* Examples include entity expansion limits and XML Schema constructs that would consume large amounts of resources.
* If XML processing is limited for security reasons, it will be reported via a call to the registered
* {@link org.xml.sax.ErrorHandler#fatalError(SAXParseException exception)}.
- * See {@link SAXParser} parse methods for handler specification.
+ * See {@link SAXParser} {@code parse} methods for handler specification.
* false, the implementation will processing XML according to the XML specifications without
+ * When the feature is {@code false}, the implementation will processing XML according to the XML specifications without
* regard to possible implementation limits.
* name parameter is null.
+ * @throws NullPointerException If the {@code name} parameter is null.
*
* @see org.xml.sax.XMLReader#setFeature
*/
@@ -302,8 +298,8 @@ public abstract class SAXParserFactory {
/**
*
- * Returns the particular property requested for in the underlying - * implementation of org.xml.sax.XMLReader.
+ * Returns the particular property requested for in the underlying + * implementation of org.xml.sax.XMLReader. * * @param name The name of the property to be retrieved. * @@ -347,12 +343,12 @@ public abstract class SAXParserFactory { } /** - *Set the {@link Schema} to be used by parsers created - * from this factory.
+ * Set the {@link Schema} to be used by parsers created + * from this factory. * *When a {@link Schema} is non-null, a parser will use a validator * created from it to validate documents before it passes information - * down to the application.
+ * down to the application. * *When warnings/errors/fatal errors are found by the validator, the parser must * handle them as if those errors were found by the parser itself. @@ -364,29 +360,28 @@ public abstract class SAXParserFactory { *
A validator may modify the SAX event stream (for example by * adding default values that were missing in documents), and a parser * is responsible to make sure that the application will receive - * those modified event stream.
+ * those modified event stream. * - *Initially, null is set as the {@link Schema}.
Initially, {@code null} is set as the {@link Schema}. * *
This processing will take effect even if
- * the {@link #isValidating()} method returns false.
+ * the {@link #isValidating()} method returns {@code false}.
*
*
It is an error to use
- * the http://java.sun.com/xml/jaxp/properties/schemaSource
- * property and/or the http://java.sun.com/xml/jaxp/properties/schemaLanguage
+ * the {@code http://java.sun.com/xml/jaxp/properties/schemaSource}
+ * property and/or the {@code http://java.sun.com/xml/jaxp/properties/schemaLanguage}
* property in conjunction with a non-null {@link Schema} object.
* Such configuration will cause a {@link SAXException}
- * exception when those properties are set on a {@link SAXParser}.
* A parser must be able to work with any {@link Schema} * implementation. However, parsers and schemas are allowed * to use implementation-specific custom mechanisms * as long as they yield the result described in the specification. - *
* - * @param schemaSchema to use, null to remove a schema.
+ * @param schema {@code Schema} to use, {@code null} to remove a schema.
*
* @throws UnsupportedOperationException When implementation does not
* override this method
@@ -404,16 +399,16 @@ public abstract class SAXParserFactory {
}
/**
- * Set state of XInclude processing.
+ * Set state of XInclude processing. * *If XInclude markup is found in the document instance, should it be * processed as specified in - * XML Inclusions (XInclude) Version 1.0.
+ * XML Inclusions (XInclude) Version 1.0. * - *XInclude processing defaults to false.
XInclude processing defaults to {@code false}.
*
- * @param state Set XInclude processing to true or
- * false
+ * @param state Set XInclude processing to {@code true} or
+ * {@code false}
*
* @throws UnsupportedOperationException When implementation does not
* override this method
@@ -429,7 +424,7 @@ public abstract class SAXParserFactory {
}
/**
- *
Get state of XInclude processing.
+ * Get state of XInclude processing. * * @return current state of XInclude processing * diff --git a/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLEventFactory.java b/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLEventFactory.java index fc14bc620bc..1ec4d382711 100644 --- a/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLEventFactory.java +++ b/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLEventFactory.java @@ -70,7 +70,6 @@ public abstract class XMLEventFactory { * This static method creates a new factory instance. * This method uses the following ordered lookup procedure to determine * the XMLEventFactory implementation class to load: - **
* This method uses the following ordered lookup procedure to determine * the XMLEventFactory implementation class to load: - *
*
Use the javax.xml.stream.XMLInputFactory system property. @@ -201,12 +201,11 @@ public abstract class XMLInputFactory { *
* Once an application has obtained a reference to a XMLInputFactory it * can use the factory to configure and obtain stream instances. - *
** Note that this is a new method that replaces the deprecated newInstance() method. * No changes in behavior are defined by this replacement method relative to * the deprecated method. - *
+ * * @throws FactoryConfigurationError in case of {@linkplain * java.util.ServiceConfigurationError service configuration error} or if * the implementation is not available or cannot be instantiated. @@ -245,7 +244,6 @@ public abstract class XMLInputFactory { ** This method uses the following ordered lookup procedure to determine * the XMLInputFactory implementation class to load: - *
*
@@ -488,7 +486,6 @@ public abstract class XMLInputFactory { *
* All implementations that implement JAXP 1.5 or newer are required to * support the {@link javax.xml.XMLConstants#ACCESS_EXTERNAL_DTD} property. - *
*@@ -497,7 +494,7 @@ public abstract class XMLInputFactory { * due to the restriction of this property, {@link javax.xml.stream.XMLStreamException} * will be thrown by the {@link javax.xml.stream.XMLStreamReader#next()} or * {@link javax.xml.stream.XMLEventReader#nextEvent()} method. - *
+ * *The following paragraphs describe the namespace and prefix repair algorithm:
+ *The following paragraphs describe the namespace and prefix repair algorithm: * *
The property can be set with the following code line:
- * setProperty("javax.xml.stream.isRepairingNamespaces",new Boolean(true|false));
This property specifies that the writer default namespace prefix declarations. - * The default value is false.
+ * The default value is false. * *If a writer isRepairingNamespaces it will create a namespace declaration * on the current StartElement for @@ -74,11 +75,11 @@ import javax.xml.transform.Result; * has not been declared in a parent of the current StartElement it will be declared * on the current StartElement. If the defaultNamespace is bound and in scope * and the default namespace matches the URI of the attribute or StartElement - * QName no prefix will be assigned.
+ * QName no prefix will be assigned. * *If an element or attribute name has a prefix, but is not * bound to any namespace URI, then the prefix will be removed - * during serialization.
+ * during serialization. * *If element and/or attribute names in the same start or * empty-element tag are bound to different namespace URIs and @@ -86,20 +87,20 @@ import javax.xml.transform.Result; * occurring attribute retains the original prefix and the * following attributes have their prefixes replaced with a * new prefix that is bound to the namespace URIs of those - * attributes.
+ * attributes. * *If an element or attribute name uses a prefix that is * bound to a different URI than that inherited from the * namespace context of the parent of that element and there * is no namespace declaration in the context of the current - * element then such a namespace declaration is added.
+ * element then such a namespace declaration is added. * *If an element or attribute name is bound to a prefix and * there is a namespace declaration that binds that prefix * to a different URI then that namespace declaration is * either removed if the correct mapping is inherited from * the parent context of that element, or changed to the - * namespace URI of the element or attribute using that prefix.
+ * namespace URI of the element or attribute using that prefix. * * @version 1.2 * @author Copyright (c) 2009, 2015 by Oracle Corporation. All Rights Reserved. @@ -136,7 +137,6 @@ public abstract class XMLOutputFactory { * This static method creates a new factory instance. This method uses the * following ordered lookup procedure to determine the XMLOutputFactory * implementation class to load: - **
* Otherwise, the system-default implementation is returned. *
* Once an application has obtained a reference to a XMLOutputFactory it * can use the factory to configure and obtain stream instances. @@ -222,7 +223,6 @@ public abstract class XMLOutputFactory { *
* This method uses the following ordered lookup procedure to determine * the XMLOutputFactory implementation class to load: - *
*
List l = (List) getProperty("javax.xml.stream.notations");
+ * {@code List l = (List) getProperty("javax.xml.stream.notations");}
* The following call will return a list of entity declarations:
- * List l = (List) getProperty("javax.xml.stream.entities");
+ * {@code List l = (List) getProperty("javax.xml.stream.entities");}
* These properties can only be accessed during a DTD event and
* are defined to return null if the information is not available.
*
@@ -97,12 +97,13 @@ import javax.xml.namespace.QName;
* getElementText(), nextTag()
*
*
+ * Given the following XML: NOTE: empty element (such as <tag/>) will be reported
+ * NOTE: empty element (such as {@code An object that implements this interface contains the information
- * needed to build a transformation result tree. Normally, result tree serialization escapes & and < (and
+ * Normally, result tree serialization escapes{@literal & and <} (and
* possibly other characters) when outputting text nodes.
* This ensures that the output is well-formed XML. However,
* it is sometimes convenient to be able to produce output that is
@@ -46,10 +46,10 @@ public interface Result {
* the output may include ill-formed sections that will
* be transformed into well-formed XML by a subsequent non-XML aware
* process. If a processing instruction is sent with this name,
- * serialization should be output without any escaping. Result DOM trees may also have PI_DISABLE_OUTPUT_ESCAPING and
- * PI_ENABLE_OUTPUT_ESCAPING inserted into the tree. If the Result is not to be written to a file, the system identifier is optional.
* The application may still want to provide one, however, for use in error messages
- * and warnings, or to resolve relative output identifiers. A TransformerFactory instance can be used to create
* {@link javax.xml.transform.Transformer} and
- * {@link javax.xml.transform.Templates} objects. The system property that determines which Factory implementation
- * to create is named
* Obtain a new instance of a {@code TransformerFactory}.
* This static method creates a new factory instance.
*
* This method uses the following ordered lookup procedure to determine
- * the {@code TransformerFactory} implementation class to
- * load:
- *
+ * the {@code TransformerFactory} implementation class to load:
* Obtain a new instance of a {@code TransformerFactory} from factory class name.
+ * Obtain a new instance of a {@code TransformerFactory} from factory class name.
* This function is useful when there are multiple providers in the classpath.
* It gives more control to the application as it can specify which provider
- * should be loaded. Once an application has obtained a reference to a
* {@code TransformerFactory} it can use the factory to configure
- * and obtain transformer instances. Setting the Setting the {@code jaxp.debug} system property will cause
* this method to print a lot of debug messages
- * to If you have problems try: If you have problems try:
* Process the Create a new Get the stylesheet specification(s) associated with the
- * XML Set a feature for this {@code TransformerFactory} and Set a feature for this {@code TransformerFactory} and {@code Transformer}s
+ * or {@code Template}s created by this factory.
*
*
* Feature names are fully qualified {@link java.net.URI}s.
* Implementations may define their own features.
* An {@link TransformerConfigurationException} is thrown if this {@code TransformerFactory} or the
- * All implementations are required to support the {@link javax.xml.XMLConstants#FEATURE_SECURE_PROCESSING} feature.
- * When the feature is:
* Feature names are fully qualified {@link java.net.URI}s.
* Implementations may define their own features.
- *
* All implementations that implement JAXP 1.5 or newer are required to
* support the {@link javax.xml.XMLConstants#ACCESS_EXTERNAL_DTD} and
* {@link javax.xml.XMLConstants#ACCESS_EXTERNAL_STYLESHEET} properties.
- *
@@ -351,7 +346,7 @@ public abstract class TransformerFactory {
* If access is denied during transformation due to the restriction of this property,
* {@link javax.xml.transform.TransformerException} will be thrown by
* {@link javax.xml.transform.Transformer#transform(Source, Result)}.
- *
* Access to external DTDs in the stylesheet is restricted to the protocols
* specified by the {@link javax.xml.XMLConstants#ACCESS_EXTERNAL_DTD} property.
@@ -359,7 +354,7 @@ public abstract class TransformerFactory {
* restriction of this property,
* {@link javax.xml.transform.TransformerConfigurationException} will be thrown
* by the {@link #newTransformer(Source)} method.
- *
* Access to external reference set by the stylesheet processing instruction,
* Import and Include element is restricted to the protocols specified by the
@@ -368,14 +363,14 @@ public abstract class TransformerFactory {
* restriction of this property,
* {@link javax.xml.transform.TransformerConfigurationException} will be thrown
* by the {@link #newTransformer(Source)} method.
- *
* Access to external document through XSLT document function is restricted
* to the protocols specified by the property. If access is denied during
* the transformation due to the restriction of this property,
* {@link javax.xml.transform.TransformerException} will be thrown by the
* {@link javax.xml.transform.Transformer#transform(Source, Result)} method.
- * Acts as a holder for a transformation result tree in the form of a Document Object Model (DOM) tree. If no output DOM source is set, the transformation will create a Document node as the holder for the result of the transformation,
- * which may be retrieved with {@link #getNode()}. If no output DOM source is set, the transformation will create
+ * a Document node as the holder for the result of the transformation,
+ * which may be retrieved with {@link #getNode()}.
*
* @author Jeff Suttor
* @since 1.4
*/
public class DOMResult implements Result {
- /** If {@link javax.xml.transform.TransformerFactory#getFeature}
- * returns Zero-argument default constructor. {@code node},
+ * {@code siblingNode} and
+ * {@code systemId}
+ * will be set to {@code null}.
*/
public DOMResult() {
setNode(null);
@@ -60,17 +63,17 @@ public class DOMResult implements Result {
}
/**
- * Use a DOM node to create a new output target. In practice, the node should be
* a {@link org.w3c.dom.Document} node,
* a {@link org.w3c.dom.DocumentFragment} node, or
* a {@link org.w3c.dom.Element} node.
- * In other words, a node that accepts children. {@code siblingNode} and
+ * {@code systemId}
+ * will be set to {@code null}.
*
* @param node The DOM node that will contain the result tree.
*/
@@ -81,15 +84,15 @@ public class DOMResult implements Result {
}
/**
- * Use a DOM node to create a new output target with the specified System ID.
+ * Use a DOM node to create a new output target with the specified System ID.
*
* In practice, the node should be
* a {@link org.w3c.dom.Document} node,
* a {@link org.w3c.dom.DocumentFragment} node, or
* a {@link org.w3c.dom.Element} node.
- * In other words, a node that accepts children. {@code siblingNode} will be set to {@code null}.
*
* @param node The DOM node that will contain the result tree.
* @param systemId The system identifier which may be used in association with this node.
@@ -101,32 +104,33 @@ public class DOMResult implements Result {
}
/**
- * Use a DOM node to create a new output target specifying the child node where the result nodes should be inserted before. In practice, In practice, {@code node} and {@code nextSibling} should be
* a {@link org.w3c.dom.Document} node,
* a {@link org.w3c.dom.DocumentFragment} node, or
* a {@link org.w3c.dom.Element} node.
- * In other words, a node that accepts children. Use Use {@code nextSibling} to specify the child node
* where the result nodes should be inserted before.
- * If {@code systemId} will be set to {@code null}.
*
* @param node The DOM node that will contain the result tree.
* @param nextSibling The child node where the result nodes should be inserted before.
*
- * @throws IllegalArgumentException If Use a DOM node to create a new output target specifying the child node where the result nodes should be inserted before and
- * the specified System ID. In practice, In practice, {@code node} and {@code nextSibling} should be
* a {@link org.w3c.dom.Document} node,
* a {@link org.w3c.dom.DocumentFragment} node, or a
* {@link org.w3c.dom.Element} node.
- * In other words, a node that accepts children. Use Use {@code nextSibling} to specify the child node
* where the result nodes should be inserted before.
- * If Set the node that will contain the result DOM tree.
+ * Set the node that will contain the result DOM tree.
*
* In practice, the node should be
* a {@link org.w3c.dom.Document} node,
* a {@link org.w3c.dom.DocumentFragment} node, or
* a {@link org.w3c.dom.Element} node.
- * In other words, a node that accepts children. An An {@code IllegalStateException} is thrown if
+ * {@code nextSibling} is not {@code null} and
+ * {@code node} is not a parent of {@code nextSibling}.
+ * An {@code IllegalStateException} is thrown if {@code node} is {@code null} and
+ * {@code nextSibling} is not {@code null}.
*
* @param node The node to which the transformation will be appended.
*
- * @throws IllegalStateException If Get the node that will contain the result DOM tree. If no node was set via
* {@link #DOMResult(Node node)},
@@ -251,7 +257,7 @@ public class DOMResult implements Result {
* {@link #DOMResult(Node node, Node nextSibling, String systemId)} or
* {@link #setNode(Node node)},
* then the node will be set by the transformation, and may be obtained from this method once the transformation is complete.
- * Calling this method before the transformation will return Set the child node before which the result nodes will be inserted. Use Use {@code nextSibling} to specify the child node
* before which the result nodes should be inserted.
- * If Get the child node before which the result nodes will be inserted. If no node was set via
* {@link #DOMResult(Node node, Node nextSibling)},
* {@link #DOMResult(Node node, Node nextSibling, String systemId)} or
* {@link #setNextSibling(Node nextSibling)},
- * then Set the systemId that may be used in association with the node. Get the System Identifier. If no System ID was set via
* {@link #DOMResult(Node node, String systemId)},
* {@link #DOMResult(Node node, Node nextSibling, String systemId)} or
* {@link #setSystemId(String systemId)},
- * then The node to which the transformation will be appended. The child node before which the result nodes will be inserted. The System ID that may be used in association with the node.
- @since 1.6
-
- * <foo><!--description-->content text<![CDATA[<greeting>Hello</greeting>]]>other content</foo>
+ * {@code
* The behavior of calling next() when being on foo will be:
* 1- the comment (COMMENT)
* 2- then the characters section (CHARACTERS)
@@ -192,14 +193,14 @@ public interface XMLStreamReader extends XMLStreamConstants {
* 4- then the next characters section (another CHARACTERS)
* 5- then the END_ELEMENT
*
- *
Precondition: the current event is START_ELEMENT.
- *
Postcondition: the current event is the corresponding END_ELEMENT.
+ *
Precondition: the current event is START_ELEMENT.
+ *
Postcondition: the current event is the corresponding END_ELEMENT.
*
- *
The method does the following (implementations are free to optimized
+ *
The method does the following (implementations are free to optimized
* but must do equivalent processing):
*
* if(getEventType() != XMLStreamConstants.START_ELEMENT) {
- * throw new XMLStreamException(
- * "parser must be on START_ELEMENT to read next text", getLocation());
+ * throw new XMLStreamException(
+ * "parser must be on START_ELEMENT to read next text", getLocation());
* }
+ *
* int eventType = next();
* StringBuffer content = new StringBuffer();
- * while(eventType != XMLStreamConstants.END_ELEMENT ) {
- * if(eventType == XMLStreamConstants.CHARACTERS
- * || eventType == XMLStreamConstants.CDATA
- * || eventType == XMLStreamConstants.SPACE
- * || eventType == XMLStreamConstants.ENTITY_REFERENCE) {
- * buf.append(getText());
- * } else if(eventType == XMLStreamConstants.PROCESSING_INSTRUCTION
- * || eventType == XMLStreamConstants.COMMENT) {
- * // skipping
- * } else if(eventType == XMLStreamConstants.END_DOCUMENT) {
- * throw new XMLStreamException(
- * "unexpected end of document when reading element text content", this);
- * } else if(eventType == XMLStreamConstants.START_ELEMENT) {
- * throw new XMLStreamException(
- * "element text content may not contain START_ELEMENT", getLocation());
- * } else {
- * throw new XMLStreamException(
- * "Unexpected event type "+eventType, getLocation());
- * }
- * eventType = next();
+ * while(eventType != XMLStreamConstants.END_ELEMENT) {
+ * if(eventType == XMLStreamConstants.CHARACTERS
+ * || eventType == XMLStreamConstants.CDATA
+ * || eventType == XMLStreamConstants.SPACE
+ * || eventType == XMLStreamConstants.ENTITY_REFERENCE) {
+ * buf.append(getText());
+ * } else if(eventType == XMLStreamConstants.PROCESSING_INSTRUCTION
+ * || eventType == XMLStreamConstants.COMMENT) {
+ * // skipping
+ * } else if(eventType == XMLStreamConstants.END_DOCUMENT) {
+ * throw new XMLStreamException(
+ * "unexpected end of document when reading element text content", this);
+ * } else if(eventType == XMLStreamConstants.START_ELEMENT) {
+ * throw new XMLStreamException(
+ * "element text content may not contain START_ELEMENT", getLocation());
+ * } else {
+ * throw new XMLStreamException(
+ * "Unexpected event type "+eventType, getLocation());
+ * }
+ * eventType = next();
* }
* return buf.toString();
*
@@ -268,33 +270,33 @@ public interface XMLStreamReader extends XMLStreamConstants {
* are encountered, an exception is thrown. This method should
* be used when processing element-only content seperated by white space.
*
- *
Precondition: none
- *
Postcondition: the current event is START_ELEMENT or END_ELEMENT
+ *
Precondition: none
+ *
Postcondition: the current event is START_ELEMENT or END_ELEMENT
* and cursor may have moved over any whitespace event.
*
- *
Essentially it does the following (implementations are free to optimized
+ *
Essentially it does the following (implementations are free to optimized
* but must do equivalent processing):
- *
+ *
* XMLStreamException may be thrown if there are any XML errors in the underlying source.
* The "targetStart" argument must be greater than or equal to 0 and less than the length of "target",
* Length must be greater than 0 and "targetStart + length" must be less than or equal to length of "target".
@@ -564,8 +566,8 @@ public interface XMLStreamReader extends XMLStreamConstants {
* @param length the number of characters to copy
* @return the number of characters actually copied
* @throws XMLStreamException if the underlying XML source is not well-formed
- * @throws IndexOutOfBoundsException if targetStart < 0 or > than the length of target
- * @throws IndexOutOfBoundsException if length < 0 or targetStart + length > length of target
+ * @throws IndexOutOfBoundsException if targetStart {@literal <} 0 or {@literal >} than the length of target
+ * @throws IndexOutOfBoundsException if length {@literal <} 0 or targetStart + length {@literal >} length of target
* @throws UnsupportedOperationException if this method is not supported
* @throws NullPointerException is if target is null
*/
diff --git a/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLStreamWriter.java b/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLStreamWriter.java
index f3615892b7a..ca05fc083be 100644
--- a/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLStreamWriter.java
+++ b/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLStreamWriter.java
@@ -33,9 +33,9 @@ import javax.xml.namespace.NamespaceContext;
/**
* The XMLStreamWriter interface specifies how to write XML. The XMLStreamWriter does
* not perform well formedness checking on its input. However
- * the writeCharacters method is required to escape & , < and >
+ * the writeCharacters method is required to escape {@literal &, < and >}
* For attribute values the writeAttribute method will escape the
- * above characters plus " to ensure that all character content
+ * above characters plus {@literal "} to ensure that all character content
* and attribute values are well formed.
*
* Each NAMESPACE
@@ -44,12 +44,12 @@ import javax.xml.namespace.NamespaceContext;
* {@code
* int eventType = next();
- * while((eventType == XMLStreamConstants.CHARACTERS && isWhiteSpace()) // skip whitespace
- * || (eventType == XMLStreamConstants.CDATA && isWhiteSpace())
+ * while((eventType == XMLStreamConstants.CHARACTERS && isWhiteSpace()) // skip whitespace
+ * || (eventType == XMLStreamConstants.CDATA && isWhiteSpace())
* // skip whitespace
* || eventType == XMLStreamConstants.SPACE
* || eventType == XMLStreamConstants.PROCESSING_INSTRUCTION
* || eventType == XMLStreamConstants.COMMENT
* ) {
- * eventType = next();
+ * eventType = next();
* }
- * if (eventType != XMLStreamConstants.START_ELEMENT && eventType != XMLStreamConstants.END_ELEMENT) {
- * throw new String XMLStreamException("expected start or end tag", getLocation());
+ * if (eventType != XMLStreamConstants.START_ELEMENT && eventType != XMLStreamConstants.END_ELEMENT) {
+ * throw new String XMLStreamException("expected start or end tag", getLocation());
* }
- * return eventType;
+ * return eventType; }
*
*
* @return the event type of the element read (START_ELEMENT or END_ELEMENT)
* @throws XMLStreamException if the current event is not white space, PROCESSING_INSTRUCTION,
* START_ELEMENT or END_ELEMENT
- * @throws NoSuchElementException if this is called when hasNext() returns false
+ * @throws java.util.NoSuchElementException if this is called when hasNext() returns false
*/
public int nextTag() throws XMLStreamException;
@@ -309,7 +311,7 @@ public interface XMLStreamReader extends XMLStreamConstants {
public boolean hasNext() throws XMLStreamException;
/**
- * Frees any resources associated with this Reader. This method does not close the
+ * Frees any resources associated with this Reader. This method does not close the
* underlying input source.
* @throws XMLStreamException if there are errors freeing associated resources
*/
@@ -542,7 +544,7 @@ public interface XMLStreamReader extends XMLStreamConstants {
* If the number of characters actually copied is less than the "length", then there is no more text.
* Otherwise, subsequent calls need to be made until all text has been retrieved. For example:
*
- *
+ *
+ * } {@code
* int length = 1024;
* char[] myBuffer = new char[ length ];
*
@@ -553,7 +555,7 @@ public interface XMLStreamReader extends XMLStreamConstants {
* if (nCopied < length)
* break;
* }
- *
*
*
- *
* XML Namespaces,
+ * javax.xml.stream.isRepairingNamespaces and write method behaviourXML Namespaces, {@code javax.xml.stream.isRepairingNamespaces} and write method behaviour
*
*
* Method
- *
- * isRepairingNamespaces == true
+ * isRepairingNamespaces == false{@code isRepairingNamespaces} == true
+ * {@code isRepairingNamespaces} == false
*
*
*
@@ -62,7 +62,7 @@ import javax.xml.namespace.NamespaceContext;
*
*
- *
*
*
+ * writeAttribute(namespaceURI, localName, value){@code writeAttribute(namespaceURI, localName, value)}
*
*
*
@@ -79,19 +79,19 @@ import javax.xml.namespace.NamespaceContext;
*
*
*
- *
* XMLStreamException
+ * {@code XMLStreamException}
*
- *
*
*
+ * writeAttribute(prefix, namespaceURI, localName, value){@code writeAttribute(prefix, namespaceURI, localName, value)}
*
*
*
- * bound to same prefix:
*
- * prefix:localName="value" [1]
- *
- * bound to different prefix:
+ * bound to same prefix:
+ * prefix:localName="value" [1]
+ *
+ * bound to different prefix:
* xmlns:{generated}="namespaceURI" {generated}:localName="value"
*
@@ -101,11 +101,11 @@ import javax.xml.namespace.NamespaceContext;
*
*
*
- * bound to same prefix:
*
- * prefix:localName="value" [1][2]
- *
- * bound to different prefix:
- * XMLStreamException[2]
+ * bound to same prefix:
+ * prefix:localName="value" [1][2]
+ *
+ * bound to different prefix:
+ * {@code XMLStreamException}[2]
*
*
@@ -114,58 +114,58 @@ import javax.xml.namespace.NamespaceContext;
*
- *
*
*
+ * writeStartElement(namespaceURI, localName)
- *
- * writeEmptyElement(namespaceURI, localName){@code writeStartElement(namespaceURI, localName)}
*
*
+ *
+ * {@code writeEmptyElement(namespaceURI, localName)}
*
- * <prefix:localName> [1]
+ * {@code
*
*
- * <{generated}:localName xmlns:{generated}="namespaceURI">
+ * {@code <{generated}:localName xmlns:{generated}="namespaceURI">}
*
*
*
*
- * <prefix:localName> [1]
+ * {@code prefix:localName>} [1]
*
*
*
- *
* XMLStreamException
+ * {@code XMLStreamException}
*
- *
*
@@ -175,10 +175,14 @@ import javax.xml.namespace.NamespaceContext;
* Notes:
*
+ * writeStartElement(prefix, localName, namespaceURI)
- *
- * writeEmptyElement(prefix, localName, namespaceURI){@code writeStartElement(prefix, localName, namespaceURI)}
*
*
+ *
+ * {@code writeEmptyElement(prefix, localName, namespaceURI)}
*
- * bound to same prefix:
*
- * <prefix:localName> [1]
- *
- * bound to different prefix:
- * <{generated}:localName xmlns:{generated}="namespaceURI">
+ * bound to same prefix:
+ * {@code
+ *
+ * bound to different prefix:
+ * {@code <{generated}:localName xmlns:{generated}="namespaceURI">}
*
*
- * <prefix:localName xmlns:prefix="namespaceURI"> [4]
+ * {@code
*
*
*
- * bound to same prefix:
*
- * <prefix:localName> [1]
- *
- * bound to different prefix:
- * XMLStreamException
+ * bound to same prefix:
+ * {@code
+ *
+ * bound to different prefix:
+ * {@code XMLStreamException}
*
*
- * <prefix:localName>
+ * {@code
*
*
*
*
diff --git a/jaxp/src/java.xml/share/classes/javax/xml/transform/Result.java b/jaxp/src/java.xml/share/classes/javax/xml/transform/Result.java
index fb5a42ee923..dab8dcde123 100644
--- a/jaxp/src/java.xml/share/classes/javax/xml/transform/Result.java
+++ b/jaxp/src/java.xml/share/classes/javax/xml/transform/Result.java
@@ -27,7 +27,7 @@ package javax.xml.transform;
/**
* "javax.xml.transform.TransformerFactory".
+ * to create is named {@code "javax.xml.transform.TransformerFactory"}.
* This property names a concrete subclass of the
* {@code TransformerFactory} abstract class. If the property is not
- * defined, a platform default is be used.
*
- Tip for Trouble-shooting
- * jaxp.debug system property will cause
+ * System.err about what it is doing and where it is looking at.
* java -Djaxp.debug=1 YourProgram ....
*
*
* @param factoryClassName fully qualified factory class name that provides implementation of {@code javax.xml.transform.TransformerFactory}.
*
- * @param classLoader ClassLoader used to load the factory class. If null
- * current Thread's context classLoader is used to load the factory class.
+ * @param classLoader {@code ClassLoader} used to load the factory class. If {@code null}
+ * current {@code Thread}'s context classLoader is used to load the factory class.
*
* @return new TransformerFactory instance, never null.
*
* @throws TransformerFactoryConfigurationError
- * if factoryClassName is null, or
+ * if {@code factoryClassName} is {@code null}, or
* the factory class cannot be loaded, instantiated.
*
* @see #newInstance()
@@ -160,29 +157,29 @@ public abstract class TransformerFactory {
factoryClassName, classLoader, false, false);
}
/**
- * Source into a Transformer
- * Object. The Source is an XSLT document that
+ * Process the {@code Source} into a {@code Transformer}
+ * {@code Object}. The {@code Source} is an XSLT document that
* conforms to
* XSL Transformations (XSLT) Version 1.0. Care must
- * be taken not to use this Transformer in multiple
- * Threads running concurrently.
- * Different TransformerFactories can be used concurrently by
- * different Threads.Source of XSLT document used to create
- * Transformer.
- * Examples of XML Sources include
+ * @param source {@code Source } of XSLT document used to create
+ * {@code Transformer}.
+ * Examples of XML {@code Source}s include
* {@link javax.xml.transform.dom.DOMSource DOMSource},
* {@link javax.xml.transform.sax.SAXSource SAXSource}, and
* {@link javax.xml.transform.stream.StreamSource StreamSource}.
*
- * @return A Transformer object that may be used to perform
- * a transformation in a single Thread, never
- * null.
+ * @return A {@code Transformer} object that may be used to perform
+ * a transformation in a single {@code Thread}, never
+ * {@code null}.
*
* @throws TransformerConfigurationException Thrown if there are errors when
- * parsing the Source or it is not possible to create a
- * Transformer instance.
+ * parsing the {@code Source} or it is not possible to create a
+ * {@code Transformer} instance.
*
* @see
* XSL Transformations (XSLT) Version 1.0
@@ -191,15 +188,15 @@ public abstract class TransformerFactory {
throws TransformerConfigurationException;
/**
- * Transformer that performs a copy
- * of the Source to the Result.
- * i.e. the "identity transform".Transformer instance.
+ * possible to create a {@code Transformer} instance.
*/
public abstract Transformer newTransformer()
throws TransformerConfigurationException;
@@ -215,7 +212,7 @@ public abstract class TransformerFactory {
* @param source An object that holds a URL, input stream, etc.
*
* @return A Templates object capable of being used for transformation
- * purposes, never null.
+ * purposes, never {@code null}.
*
* @throws TransformerConfigurationException When parsing to
* construct the Templates object fails.
@@ -224,13 +221,13 @@ public abstract class TransformerFactory {
throws TransformerConfigurationException;
/**
- * Source document via the
+ * Get the stylesheet specification(s) associated with the
+ * XML {@code Source} document via the
*
* xml-stylesheet processing instruction that match the given criteria.
* Note that it is possible to return several stylesheets, in which case
* they are applied as if they were a list of imports or cascades in a
- * single stylesheet.Source Object suitable for passing
+ * @return A {@code Source} {@code Object} suitable for passing
* to the {@code TransformerFactory}.
*
- * @throws TransformerConfigurationException An Exception
+ * @throws TransformerConfigurationException An {@code Exception}
* is thrown if an error occurings during parsing of the
- * source.
+ * {@code source}.
*
* @see
* Associating Style Sheets with XML documents Version 1.0
@@ -275,22 +272,21 @@ public abstract class TransformerFactory {
//======= CONFIGURATION METHODS =======
/**
- * Transformers
- * or Templates created by this factory.Transformers or Templates it creates cannot support the feature.
+ * {@code Transformer}s or {@code Template}s it creates cannot support the feature.
* It is possible for an {@code TransformerFactory} to expose a feature value but be unable to change its state.
- *
*
*
* @param name Feature name.
- * @param value Is feature state true: the implementation will limit XML processing to conform to implementation limits
+ * {@code true}: the implementation will limit XML processing to conform to implementation limits
* and behave in a secure fashion as defined by the implementation.
* Examples include resolving user defined style sheets and functions.
* If XML processing is limited for security reasons, it will be reported via a call to the registered
@@ -298,17 +294,17 @@ public abstract class TransformerFactory {
* See {@link #setErrorListener(ErrorListener listener)}.
* false: the implementation will processing XML according to the XML specifications without
+ * {@code false}: the implementation will processing XML according to the XML specifications without
* regard to possible implementation limits.
* true or false.
+ * @param value Is feature state {@code true} or {@code false}.
*
* @throws TransformerConfigurationException if this {@code TransformerFactory}
- * or the Transformers or Templates it creates cannot support this feature.
- * @throws NullPointerException If the name parameter is null.
+ * or the {@code Transformer}s or {@code Template}s it creates cannot support this feature.
+ * @throws NullPointerException If the {@code name} parameter is null.
*/
public abstract void setFeature(String name, boolean value)
throws TransformerConfigurationException;
@@ -319,16 +315,15 @@ public abstract class TransformerFactory {
* false is returned if this {@code TransformerFactory} or the
- * Transformers or Templates it creates cannot support the feature.
+ * {@code false} is returned if this {@code TransformerFactory} or the
+ * {@code Transformer}s or {@code Template}s it creates cannot support the feature.
* It is possible for an {@code TransformerFactory} to expose a feature value but be unable to change its state.
- * true or false.
+ * @return The current state of the feature, {@code true} or {@code false}.
*
- * @throws NullPointerException If the name parameter is null.
+ * @throws NullPointerException If the {@code name} parameter is null.
*/
public abstract boolean getFeature(String name);
@@ -336,13 +331,13 @@ public abstract class TransformerFactory {
* Allows the user to set specific attributes on the underlying
* implementation. An attribute in this context is defined to
* be an option that the implementation provides.
- * An IllegalArgumentException is thrown if the underlying
+ * An {@code IllegalArgumentException} is thrown if the underlying
* implementation doesn't recognize the attribute.
*
*
*
@@ -390,7 +385,7 @@ public abstract class TransformerFactory {
/**
* Allows the user to retrieve specific attributes on the underlying
* implementation.
- * An IllegalArgumentException is thrown if the underlying
+ * An {@code IllegalArgumentException} is thrown if the underlying
* implementation doesn't recognize the attribute.
*
* @param name The name of the attribute.
@@ -406,13 +401,13 @@ public abstract class TransformerFactory {
* Set the error event listener for the TransformerFactory, which
* is used for the processing of transformation instructions,
* and not for the transformation itself.
- * An IllegalArgumentException is thrown if the
- * ErrorListener listener is null.
+ * An {@code IllegalArgumentException} is thrown if the
+ * {@code ErrorListener} listener is {@code null}.
*
* @param listener The new error listener.
*
- * @throws IllegalArgumentException When listener is
- * null
+ * @throws IllegalArgumentException When {@code listener} is
+ * {@code null}
*/
public abstract void setErrorListener(ErrorListener listener);
diff --git a/jaxp/src/java.xml/share/classes/javax/xml/transform/dom/DOMResult.java b/jaxp/src/java.xml/share/classes/javax/xml/transform/dom/DOMResult.java
index 67ec2418740..8c4a1b789f9 100644
--- a/jaxp/src/java.xml/share/classes/javax/xml/transform/dom/DOMResult.java
+++ b/jaxp/src/java.xml/share/classes/javax/xml/transform/dom/DOMResult.java
@@ -29,29 +29,32 @@ import javax.xml.transform.Result;
import org.w3c.dom.Node;
/**
- * true when passed this value as an argument,
- * the Transformer supports Result output of this type.node,
- * siblingNode and
- * systemId
- * will be set to null.siblingNode and
- * systemId
- * will be set to null.siblingNode will be set to null.node and nextSibling should be
+ * nextSibling to specify the child node
+ * nextSibling is not a sibling of node,
- * then an IllegalArgumentException is thrown.
- * If node is null and nextSibling is not null,
- * then an IllegalArgumentException is thrown.
- * If nextSibling is null,
+ * If {@code nextSibling} is not a sibling of {@code node},
+ * then an {@code IllegalArgumentException} is thrown.
+ * If {@code node} is {@code null} and {@code nextSibling} is not {@code null},
+ * then an {@code IllegalArgumentException} is thrown.
+ * If {@code nextSibling} is {@code null},
* then the behavior is the same as calling {@link #DOMResult(Node node)},
- * i.e. append the result nodes as the last child of the specified node.systemId will be set to null.nextSibling is not a sibling of node or
- * node is null and nextSibling
- * is not null.
+ * @throws IllegalArgumentException If {@code nextSibling} is not a sibling of {@code node} or
+ * {@code node} is {@code null} and {@code nextSibling}
+ * is not {@code null}.
*
* @since 1.5
*/
@@ -151,33 +155,35 @@ public class DOMResult implements Result {
}
/**
- * node and nextSibling should be
+ * nextSibling to specify the child node
+ * nextSibling is not a sibling of node,
- * then an IllegalArgumentException is thrown.
- * If node is null and nextSibling is not null,
- * then an IllegalArgumentException is thrown.
- * If nextSibling is null,
+ * If {@code nextSibling} is not a sibling of {@code node},
+ * then an {@code IllegalArgumentException} is thrown.
+ * If {@code node} is {@code null} and {@code nextSibling} is not {@code null},
+ * then an {@code IllegalArgumentException} is thrown.
+ * If {@code nextSibling} is {@code null},
* then the behavior is the same as calling {@link #DOMResult(Node node, String systemId)},
- * i.e. append the result nodes as the last child of the specified node and use the specified System ID.nextSibling is not a
- * sibling of node or
- * node is null and nextSibling
- * is not null.
+ * @throws IllegalArgumentException If {@code nextSibling} is not a
+ * sibling of {@code node} or
+ * {@code node} is {@code null} and {@code nextSibling}
+ * is not {@code null}.
*
* @since 1.5
*/
@@ -202,27 +208,27 @@ public class DOMResult implements Result {
}
/**
- * IllegalStateException is thrown if
- * nextSibling is not null and
- * node is not a parent of nextSibling.
- * An IllegalStateException is thrown if node is null and
- * nextSibling is not null.nextSibling is not
- * null and
- * nextSibling is not a child of node or
- * node is null and
- * nextSibling is not null.
+ * @throws IllegalStateException If {@code nextSibling} is not
+ * {@code null} and
+ * {@code nextSibling} is not a child of {@code node} or
+ * {@code node} is {@code null} and
+ * {@code nextSibling} is not {@code null}.
*/
public void setNode(Node node) {
// does the corrent parent/child relationship exist?
@@ -242,7 +248,7 @@ public class DOMResult implements Result {
}
/**
- * null.nextSibling to specify the child node
+ * nextSibling is not a descendant of node,
- * then an IllegalArgumentException is thrown.
- * If node is null and nextSibling is not null,
- * then an IllegalStateException is thrown.
- * If nextSibling is null,
+ * If {@code nextSibling} is not a descendant of {@code node},
+ * then an {@code IllegalArgumentException} is thrown.
+ * If {@code node} is {@code null} and {@code nextSibling} is not {@code null},
+ * then an {@code IllegalStateException} is thrown.
+ * If {@code nextSibling} is {@code null},
* then the behavior is the same as calling {@link #DOMResult(Node node)},
- * i.e. append the result nodes as the last child of the specified node.nextSibling is not a
- * descendant of node.
- * @throws IllegalStateException If node is null
- * and nextSibling is not null.
+ * @throws IllegalArgumentException If {@code nextSibling} is not a
+ * descendant of {@code node}.
+ * @throws IllegalStateException If {@code node} is {@code null}
+ * and {@code nextSibling} is not {@code null}.
*
* @since 1.5
*/
@@ -300,13 +306,13 @@ public class DOMResult implements Result {
}
/**
- * null will be returned.null will be returned.