You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ve...@apache.org on 2003/11/10 11:08:44 UTC
cvs commit: xml-xerces/java/src/org/w3c/dom/ls DOMImplementationLS.java
venu 2003/11/10 02:08:44
Modified: java/src/org/apache/xerces/dom AttributeMap.java
CoreDOMImplementationImpl.java
DOMImplementationImpl.java ElementImpl.java
java/src/org/w3c/dom/ls DOMImplementationLS.java
Log:
Description : Merging sources from jaxp-1_3_0-04 tag in main branch .
Revision Changes Path
1.27 +4 -3 xml-xerces/java/src/org/apache/xerces/dom/AttributeMap.java
Index: AttributeMap.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/AttributeMap.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- AttributeMap.java 30 Jul 2003 19:43:22 -0000 1.26
+++ AttributeMap.java 10 Nov 2003 10:08:44 -0000 1.27
@@ -582,13 +582,14 @@
int dsize = defaults.nodes.size();
for (int n = 0; n < dsize; n++) {
AttrImpl d = (AttrImpl) defaults.nodes.elementAt(n);
- int i = findNamePoint(d.getNodeName(), 0);
+ int i = findNamePoint(d.getNodeName(), 0);
if (i < 0) {
+ i = -1 - i;
NodeImpl clone = (NodeImpl) d.cloneNode(true);
clone.ownerNode = ownerNode;
clone.isOwned(true);
clone.isSpecified(false);
- nodes.setElementAt(clone, i);
+ nodes.insertElementAt(clone, i);
}
}
}
1.27 +13 -1 xml-xerces/java/src/org/apache/xerces/dom/CoreDOMImplementationImpl.java
Index: CoreDOMImplementationImpl.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/CoreDOMImplementationImpl.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- CoreDOMImplementationImpl.java 30 Jul 2003 10:30:35 -0000 1.26
+++ CoreDOMImplementationImpl.java 10 Nov 2003 10:08:44 -0000 1.27
@@ -68,6 +68,7 @@
import org.w3c.dom.ls.DOMParser;
import org.w3c.dom.ls.DOMImplementationLS;
import org.w3c.dom.ls.DOMInput;
+import org.w3c.dom.ls.DOMOutput;
import org.w3c.dom.ls.DOMSerializer;
/**
* The DOMImplementation class is description of a particular
@@ -381,6 +382,7 @@
public DOMInput createDOMInput() {
return new DOMInputImpl();
}
+
//
// Protected methods
//
@@ -428,5 +430,15 @@
return ++docAndDoctypeCounter;
}
+ /* DOM Level 3 WD - Experimental.
+ *
+ * Create a new empty output source.
+ * @return The newly created output object.
+ * - Gopal Sharma
+ * TODO: Real wording should be collected from W3C next LS
+ */
+ public DOMOutput createDOMOutput() {
+ return new DOMOutputImpl();
+ }
} // class DOMImplementationImpl
1.29 +7 -5 xml-xerces/java/src/org/apache/xerces/dom/DOMImplementationImpl.java
Index: DOMImplementationImpl.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/DOMImplementationImpl.java,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- DOMImplementationImpl.java 29 Oct 2003 10:25:47 -0000 1.28
+++ DOMImplementationImpl.java 10 Nov 2003 10:08:44 -0000 1.29
@@ -140,12 +140,14 @@
(feature.equalsIgnoreCase("Core")
&& (anyVersion
|| version.equals("1.0")
- || version.equals("2.0")))
- || (feature.equalsIgnoreCase("XML")
+ || version.equals("2.0")
+ || version.equals("3.0")))
+ || (feature.equalsIgnoreCase("XML")
&& (anyVersion
|| version.equals("1.0")
- || version.equals("2.0")))
- || (feature.equalsIgnoreCase("Events")
+ || version.equals("2.0")
+ || version.equals("3.0")))
+ || (feature.equalsIgnoreCase("Events")
&& (anyVersion
|| version.equals("2.0")))
|| (feature.equalsIgnoreCase("MutationEvents")
1.61 +19 -3 xml-xerces/java/src/org/apache/xerces/dom/ElementImpl.java
Index: ElementImpl.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/ElementImpl.java,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- ElementImpl.java 7 Nov 2003 07:21:42 -0000 1.60
+++ ElementImpl.java 10 Nov 2003 10:08:44 -0000 1.61
@@ -977,7 +977,15 @@
synchronizeData();
}
Attr at = getAttributeNode(name);
- if (ownerDocument.errorChecking) {
+
+ if( at == null){
+ String msg = DOMMessageFormatter.formatMessage(
+ DOMMessageFormatter.DOM_DOMAIN,
+ "NOT_FOUND_ERR", null);
+ throw new DOMException(DOMException.NOT_FOUND_ERR, msg);
+ }
+
+ if (ownerDocument.errorChecking) {
if (isReadOnly()) {
String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null);
throw new DOMException(
@@ -1009,7 +1017,15 @@
synchronizeData();
}
Attr at = getAttributeNodeNS(namespaceURI, localName);
- if (ownerDocument.errorChecking) {
+
+ if( at == null){
+ String msg = DOMMessageFormatter.formatMessage(
+ DOMMessageFormatter.DOM_DOMAIN,
+ "NOT_FOUND_ERR", null);
+ throw new DOMException(DOMException.NOT_FOUND_ERR, msg);
+ }
+
+ if (ownerDocument.errorChecking) {
if (isReadOnly()) {
String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null);
throw new DOMException(
1.7 +8 -0 xml-xerces/java/src/org/w3c/dom/ls/DOMImplementationLS.java
Index: DOMImplementationLS.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/w3c/dom/ls/DOMImplementationLS.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- DOMImplementationLS.java 30 Jul 2003 13:38:53 -0000 1.6
+++ DOMImplementationLS.java 10 Nov 2003 10:08:44 -0000 1.7
@@ -105,4 +105,12 @@
*/
public DOMInput createDOMInput();
+
+ /* TODO: Real wording should be collected from W3C next LS
+ * Create a new empty output source.
+ * @return The newly created output object.
+ * - Gopal Sharma
+ */
+ public DOMOutput createDOMOutput();
+
}
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org