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/07/15 00:35:06 UTC
svn commit: r422082 -
/incubator/abdera/java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMBuilder.java
Author: jmsnell
Date: Fri Jul 14 15:35:06 2006
New Revision: 422082
URL: http://svn.apache.org/viewvc?rev=422082&view=rev
Log:
The internal document reference wasn't right, which was stopping DTD, comments and PI's at the document level to be dropped.
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=422082&r1=422081&r2=422082&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 Fri Jul 14 15:35:06 2006
@@ -63,6 +63,7 @@
XMLStreamReader parser,
ParserOptions parserOptions) {
super(factory, parser);
+ document = (OMDocument) factory.newDocument();
this.parserOptions = parserOptions;
fomfactory = factory;
}
@@ -71,7 +72,7 @@
FOMFactory factory,
XMLStreamReader parser) {
super(factory, parser);
- document = factory.createOMDocument(this);
+ document = (OMDocument) factory.newDocument();
fomfactory = factory;
}
@@ -81,6 +82,7 @@
throws XMLStreamException,
FileNotFoundException {
super(filePath);
+ document = (OMDocument) Factory.INSTANCE.newDocument();
this.parserOptions = parserOptions;
fomfactory = getFomFactory();
setOMBuilderFactory(fomfactory);
@@ -93,6 +95,7 @@
throws XMLStreamException,
FileNotFoundException {
super(filePath);
+ document = (OMDocument) factory.newDocument();
this.parserOptions = parserOptions;
fomfactory = factory;
setOMBuilderFactory(fomfactory);
@@ -103,6 +106,7 @@
ParserOptions parserOptions)
throws XMLStreamException {
super(inStream);
+ document = (OMDocument) Factory.INSTANCE.newDocument();
this.parserOptions = parserOptions;
fomfactory = getFomFactory();
setOMBuilderFactory(fomfactory);
@@ -114,6 +118,7 @@
ParserOptions parserOptions)
throws XMLStreamException {
super(inStream);
+ document = (OMDocument) factory.newDocument();
this.parserOptions = parserOptions;
fomfactory = factory;
setOMBuilderFactory(fomfactory);
@@ -123,6 +128,7 @@
XMLStreamReader parser,
ParserOptions parserOptions) {
super(parser);
+ document = (OMDocument) Factory.INSTANCE.newDocument();
this.parserOptions = parserOptions;
fomfactory = getFomFactory();
setOMBuilderFactory(fomfactory);
@@ -133,6 +139,7 @@
FOMFactory factory,
ParserOptions parserOptions) {
super(factory, parser);
+ document = (OMDocument) factory.newDocument();
this.parserOptions = parserOptions;
fomfactory = factory;
}
@@ -322,7 +329,7 @@
}
private void initDocument(String name) {
- fomDocument = fomfactory.newDocument();
+ fomDocument = (Document) document;
String enc = parser.getCharacterEncodingScheme();
getDocument().setCharsetEncoding(enc != null ? enc : "utf-8");
getDocument().setXMLVersion(