You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mr...@apache.org on 2008/10/17 15:05:10 UTC
svn commit: r705596 - in
/xerces/java/trunk/src/org/apache/xerces/impl/xs/opti: AttrImpl.java
DefaultDocument.java NodeImpl.java TextImpl.java
Author: mrglavas
Date: Fri Oct 17 06:05:10 2008
New Revision: 705596
URL: http://svn.apache.org/viewvc?rev=705596&view=rev
Log:
Minor enhancements to the Schema DOM implementation to make it easier to debug.
Modified:
xerces/java/trunk/src/org/apache/xerces/impl/xs/opti/AttrImpl.java
xerces/java/trunk/src/org/apache/xerces/impl/xs/opti/DefaultDocument.java
xerces/java/trunk/src/org/apache/xerces/impl/xs/opti/NodeImpl.java
xerces/java/trunk/src/org/apache/xerces/impl/xs/opti/TextImpl.java
Modified: xerces/java/trunk/src/org/apache/xerces/impl/xs/opti/AttrImpl.java
URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/xs/opti/AttrImpl.java?rev=705596&r1=705595&r2=705596&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/impl/xs/opti/AttrImpl.java (original)
+++ xerces/java/trunk/src/org/apache/xerces/impl/xs/opti/AttrImpl.java Fri Oct 17 06:05:10 2008
@@ -60,12 +60,10 @@
this.value = value;
}
-
public String getName() {
return rawname;
}
-
public boolean getSpecified() {
return true;
}
@@ -74,12 +72,14 @@
return value;
}
+ public String getNodeValue() {
+ return getValue();
+ }
public Element getOwnerElement() {
return element;
}
-
public void setValue(String value) throws DOMException {
this.value = value;
}
@@ -91,12 +91,16 @@
return false;
}
- /**
+ /**
* Method getSchemaTypeInfo.
* @return TypeInfo
*/
public TypeInfo getSchemaTypeInfo(){
return null;
}
-
+
+ /** NON-DOM method for debugging convenience */
+ public String toString() {
+ return getName() + "=" + "\"" + getValue() + "\"";
+ }
}
\ No newline at end of file
Modified: xerces/java/trunk/src/org/apache/xerces/impl/xs/opti/DefaultDocument.java
URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/xs/opti/DefaultDocument.java?rev=705596&r1=705595&r2=705596&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/impl/xs/opti/DefaultDocument.java (original)
+++ xerces/java/trunk/src/org/apache/xerces/impl/xs/opti/DefaultDocument.java Fri Oct 17 06:05:10 2008
@@ -48,6 +48,15 @@
// default constructor
public DefaultDocument() {
+ this.nodeType = Node.DOCUMENT_NODE;
+ }
+
+ //
+ // org.w3c.dom.Node methods
+ //
+
+ public String getNodeName() {
+ return "#document";
}
//
Modified: xerces/java/trunk/src/org/apache/xerces/impl/xs/opti/NodeImpl.java
URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/xs/opti/NodeImpl.java?rev=705596&r1=705595&r2=705596&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/impl/xs/opti/NodeImpl.java (original)
+++ xerces/java/trunk/src/org/apache/xerces/impl/xs/opti/NodeImpl.java Fri Oct 17 06:05:10 2008
@@ -78,8 +78,12 @@
hidden = hide;
}
-
public boolean getReadOnly() {
return hidden;
}
+
+ /** NON-DOM method for debugging convenience. */
+ public String toString() {
+ return "[" + getNodeName() + ": " + getNodeValue() + "]";
+ }
}
\ No newline at end of file
Modified: xerces/java/trunk/src/org/apache/xerces/impl/xs/opti/TextImpl.java
URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/xs/opti/TextImpl.java?rev=705596&r1=705595&r2=705596&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/impl/xs/opti/TextImpl.java (original)
+++ xerces/java/trunk/src/org/apache/xerces/impl/xs/opti/TextImpl.java Fri Oct 17 06:05:10 2008
@@ -48,6 +48,10 @@
// org.w3c.dom.Node methods
//
+ public String getNodeName() {
+ return "#text";
+ }
+
public Node getParentNode() {
return fSchemaDOM.relations[fRow][0];
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org