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 2006/11/17 21:09:28 UTC
svn commit: r476292 - in
/xerces/java/trunk/src/org/apache/xerces/jaxp/validation:
DOMResultAugmentor.java DOMResultBuilder.java
Author: mrglavas
Date: Fri Nov 17 12:09:26 2006
New Revision: 476292
URL: http://svn.apache.org/viewvc?view=rev&rev=476292
Log:
JIRA Issue #1212:
http://issues.apache.org/jira/browse/XERCESJ-1212
The newly created attribute needs to be assigned an owner element before
we can assign it as an ID. This was being done in the wrong order which
caused a DOMException to be thrown. Patch thanks to Grant McDonald.
Modified:
xerces/java/trunk/src/org/apache/xerces/jaxp/validation/DOMResultAugmentor.java
xerces/java/trunk/src/org/apache/xerces/jaxp/validation/DOMResultBuilder.java
Modified: xerces/java/trunk/src/org/apache/xerces/jaxp/validation/DOMResultAugmentor.java
URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/jaxp/validation/DOMResultAugmentor.java?view=diff&rev=476292&r1=476291&r2=476292
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/jaxp/validation/DOMResultAugmentor.java (original)
+++ xerces/java/trunk/src/org/apache/xerces/jaxp/validation/DOMResultAugmentor.java Fri Nov 17 12:09:26 2006
@@ -158,6 +158,7 @@
AttrImpl attr = (AttrImpl) fDocumentImpl.createAttributeNS(fAttributeQName.uri,
fAttributeQName.rawname, fAttributeQName.localpart);
attr.setValue(attributes.getValue(i));
+ currentElement.setAttributeNodeNS(attr);
// write type information to this attribute
AttributePSVI attrPSVI = (AttributePSVI) attributes.getAugmentations(i).getItem (Constants.ATTRIBUTE_PSVI);
@@ -167,7 +168,6 @@
}
}
attr.setSpecified(false);
- currentElement.setAttributeNodeNS(attr);
}
}
}
Modified: xerces/java/trunk/src/org/apache/xerces/jaxp/validation/DOMResultBuilder.java
URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/jaxp/validation/DOMResultBuilder.java?view=diff&rev=476292&r1=476291&r2=476292
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/jaxp/validation/DOMResultBuilder.java (original)
+++ xerces/java/trunk/src/org/apache/xerces/jaxp/validation/DOMResultBuilder.java Fri Nov 17 12:09:26 2006
@@ -237,6 +237,7 @@
AttrImpl attr = (AttrImpl) fDocumentImpl.createAttributeNS(fAttributeQName.uri,
fAttributeQName.rawname, fAttributeQName.localpart);
attr.setValue(attributes.getValue(i));
+ elem.setAttributeNodeNS(attr);
// write type information to this attribute
AttributePSVI attrPSVI = (AttributePSVI) attributes.getAugmentations(i).getItem (Constants.ATTRIBUTE_PSVI);
@@ -262,7 +263,6 @@
}
}
attr.setSpecified(attributes.isSpecified(i));
- elem.setAttributeNodeNS(attr);
}
}
append(elem);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org