You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Er...@Classwell.com on 2002/01/18 18:02:02 UTC
defer-node-expansion / OutputFormat bug?
I've been finding that with xerces2 (beta 4 and beta 3), I get a an
exception when creating an org.apache.xml.serialize.OutputFormat(in
preparation for for serialization with
org.apache.xml.serialize.XMLSerializer) unless I turn off the feature
"http://apache.org/xml/features/dom/defer-node-expansion." I get an
exception like:
java.lang.ClassCastException: org.apache.xerces.dom.DeferredAttrNSImpl
at
org.apache.xerces.dom.DeferredDocumentImpl.synchronizeChildren(Deferr
edDocumentImpl.java:1592)
at
org.apache.xerces.dom.DeferredEntityImpl.synchronizeChildren(Deferred
EntityImpl.java:179)
at
org.apache.xerces.dom.ParentNode.setReadOnly(ParentNode.java:899)
at
org.apache.xerces.dom.NamedNodeMapImpl.setReadOnly(NamedNodeMapImpl.j
ava:395)
at
org.apache.xerces.dom.DocumentTypeImpl.setReadOnly(DocumentTypeImpl.j
ava:347)
at
org.apache.xerces.dom.DeferredDocumentTypeImpl.synchronizeChildren(De
ferredDocumentTypeImpl.java:219)
at
org.apache.xerces.dom.DocumentTypeImpl.getElements(DocumentTypeImpl.j
ava:358)
at
org.apache.xerces.dom.ElementImpl.getDefaultAttributes(ElementImpl.ja
va:829)
at
org.apache.xerces.dom.ElementImpl.setupDefaultAttributes(ElementImpl.
java:806)
at
org.apache.xerces.dom.DeferredElementNSImpl.synchronizeData(DeferredE
lementNSImpl.java:155)
at
org.apache.xerces.dom.ElementImpl.getNodeName(ElementImpl.java:144)
at
org.apache.xml.serialize.OutputFormat.whichMethod(OutputFormat.java:8
97)
at
org.apache.xml.serialize.OutputFormat.<init>(OutputFormat.java:316)
at
org.apache.xml.serialize.OutputFormat.<init>(OutputFormat.java:338)
at
com.classwell.offline.tagging.SchemaValidate.tagFile(SchemaValidate.j
ava:240)
at
com.classwell.offline.tagging.SchemaValidate.processFile(SchemaValida
te.java:268)
at
com.classwell.common.FileRecurser.processFile(FileRecurser.java:153)
at
com.classwell.common.FileRecurser.processDir(FileRecurser.java:109)
at
com.classwell.offline.tagging.SchemaValidate.<init>(SchemaValidate.ja
va:141)
at
com.classwell.offline.tagging.SchemaValidate.main(SchemaValidate.java
:289)
My OutputFormat instantiation looks like:
OutputFormat of = new OutputFormat(doc, "UTF-8", false);
And this is the line the stack trace points to.
In this particular case I'm using schema validation, but I have the problem
with tools I've written for xml that only uses DTDs.
Is this a bug? Or is there something wrong with that I'm doing?
Cheers,
Eric
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org