You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@abdera.apache.org by jm...@apache.org on 2006/08/24 00:55:36 UTC
svn commit: r434233 -
/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMBuilder.java
Author: jmsnell
Date: Wed Aug 23 15:55:34 2006
New Revision: 434233
URL: http://svn.apache.org/viewvc?rev=434233&view=rev
Log:
Current StAX cursor model implementations inconsistently handle DTDs.
Woodstox, for instance, does not provide a means of getting to the complete
doctype declaration (which is actually valid according to the spec, which
is broken). The StAX reference impl returns the complete doctype declaration
despite the fact that doing so is apparently against the spec. We can get
to the complete declaration in Woodstox if we want to use their proprietary
extension APIs. It's unclear how other Stax impls handle this. So.. for now,
we're just going to ignore the DTD. The DTD will still be processed as far
as entities are concerned, but we will not be able to reserialize the parsed
document with the DTD. Since very few folks actually use DTD's in feeds
right now (and we should likely be encouraging folks not to do so), this
shouldn't be that big of a problem
Modified:
incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMBuilder.java
Modified: incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMBuilder.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMBuilder.java?rev=434233&r1=434232&r2=434233&view=diff
==============================================================================
--- incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMBuilder.java (original)
+++ incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMBuilder.java Wed Aug 23 15:55:34 2006
@@ -216,8 +216,20 @@
createComment();
break;
case XMLStreamConstants.DTD:
- if (!parserOptions.getIgnoreDoctype())
- createDTD();
+// Current StAX cursor model implementations inconsistently handle DTDs.
+// Woodstox, for instance, does not provide a means of getting to the complete
+// doctype declaration (which is actually valid according to the spec, which
+// is broken). The StAX reference impl returns the complete doctype declaration
+// despite the fact that doing so is apparently against the spec. We can get
+// to the complete declaration in Woodstox if we want to use their proprietary
+// extension APIs. It's unclear how other Stax impls handle this. So.. for now,
+// we're just going to ignore the DTD. The DTD will still be processed as far
+// as entities are concerned, but we will not be able to reserialize the parsed
+// document with the DTD. Since very few folks actually use DTD's in feeds
+// right now (and we should likely be encouraging folks not to do so), this
+// shouldn't be that big of a problem
+// if (!parserOptions.getIgnoreDoctype())
+// createDTD();
break;
case XMLStreamConstants.PROCESSING_INSTRUCTION:
if (!parserOptions.getIgnoreProcessingInstructions())