morten 01/09/21 05:10:54
Modified: java/src/org/apache/xalan/xsltc/runtime TextOutput.java
Log:
A fix for CDATA elements. The tags of CDATA sections were passed through the
output post-processor's character escaping function but should be passed
directly to the SAX handler.
PR: n/a
Obtained from: n/a
Submitted by: [EMAIL PROTECTED]
Reviewed by: [EMAIL PROTECTED]
Revision Changes Path
1.33 +4 -4
xml-xalan/java/src/org/apache/xalan/xsltc/runtime/TextOutput.java
Index: TextOutput.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/runtime/TextOutput.java,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- TextOutput.java 2001/09/21 10:56:09 1.32
+++ TextOutput.java 2001/09/21 12:10:54 1.33
@@ -1,5 +1,5 @@
/*
- * @(#)$Id: TextOutput.java,v 1.32 2001/09/21 10:56:09 morten Exp $
+ * @(#)$Id: TextOutput.java,v 1.33 2001/09/21 12:10:54 morten Exp $
*
* The Apache Software License, Version 1.1
*
@@ -415,13 +415,13 @@
int offset = off;
// Output start bracket - "<![CDATA["
- characters(BEGCDATA);
+ _saxHandler.characters(BEGCDATA, 0, BEGCDATA.length);
// Detect any occurence of "]]>" in the character array
for (int i = offset; i < limit-2; i++) {
if (ch[i] == ']' && ch[i+1] == ']' && ch[i+2] == '>') {
_saxHandler.characters(ch, offset, i - offset);
- characters(CNTCDATA);
+ _saxHandler.characters(CNTCDATA, 0, CNTCDATA.length);
offset = i+3;
i=i+2; // Skip next chars ']' and '>'.
}
@@ -435,7 +435,7 @@
private void closeCDATA() throws SAXException {
// Output closing bracket - "]]>"
- characters(ENDCDATA);
+ _saxHandler.characters(ENDCDATA, 0, ENDCDATA.length);
_cdataTagOpen = false;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]