You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by st...@apache.org on 2002/07/10 12:25:03 UTC
cvs commit: xml-cocoon2/src/java/org/apache/cocoon/components/sax XMLByteStreamCompiler.java
stephan 2002/07/10 03:25:02
Modified: . changes.xml
src/java/org/apache/cocoon/components/sax
XMLByteStreamCompiler.java
Log:
Fixed problem with additional comments from DTD's
Revision Changes Path
1.207 +5 -1 xml-cocoon2/changes.xml
Index: changes.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/changes.xml,v
retrieving revision 1.206
retrieving revision 1.207
diff -u -r1.206 -r1.207
--- changes.xml 7 Jul 2002 05:08:34 -0000 1.206
+++ changes.xml 10 Jul 2002 10:25:02 -0000 1.207
@@ -39,6 +39,10 @@
</devs>
<release version="@version@" date="@date@">
+ <action dev="SMS" type="update" fixes-bug="5973" due-to="Sven Kitschke" due-to-email="kicke@web.de">
+ Resolved the problem of the additional comments from used DTD's, thanks to Sven Kitschke.
+ Problem was located in IncludeXMLConsumer and XMLByteStreamCompiler.
+ </action>
<action dev="CZ" type="update">
The OASIS Catalog and the entities (DTDs, entity sets, etc.) have moved
to WEB-INF/entities and the CatalogManager.properties file has moved to
1.6 +13 -7 xml-cocoon2/src/java/org/apache/cocoon/components/sax/XMLByteStreamCompiler.java
Index: XMLByteStreamCompiler.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/components/sax/XMLByteStreamCompiler.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- XMLByteStreamCompiler.java 22 Feb 2002 07:00:12 -0000 1.5
+++ XMLByteStreamCompiler.java 10 Jul 2002 10:25:02 -0000 1.6
@@ -78,6 +78,8 @@
/** The number of valid bytes in the buffer. */
private int bufCount;
+ private boolean inDTD = false;
+
public XMLByteStreamCompiler() {
this.map = new HashMap();
this.initOutput();
@@ -206,6 +208,7 @@
*/
public void startDTD(String name, String public_id, String system_id) {
// ignore
+ inDTD = true;
}
/**
@@ -213,6 +216,7 @@
*/
public void endDTD() throws SAXException {
// ignore
+ inDTD = false;
}
/**
@@ -249,12 +253,14 @@
*/
public void comment(char ary[], int start, int length)
throws SAXException {
- try {
- this.writeEvent(COMMENT);
- this.writeChars(ary, start, length);
- } catch (Exception e) {
- throw new SAXException(e);
- }
+ if (!inDTD) {
+ try {
+ this.writeEvent(COMMENT);
+ this.writeChars(ary, start, length);
+ } catch (Exception e) {
+ throw new SAXException(e);
+ }
+ }
}
public final void writeEvent(int event) throws SAXException {
----------------------------------------------------------------------
In case of troubles, e-mail: webmaster@xml.apache.org
To unsubscribe, e-mail: cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org