You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by jd...@locus.apache.org on 2000/03/17 23:19:09 UTC
cvs commit: xml-xalan/c/src/XMLSupport FormatterToXML.cpp
jdonohue 00/03/17 14:19:09
Modified: c/src/XMLSupport FormatterToXML.cpp
Log:
Sync up with java on unescaped text handling
Revision Changes Path
1.11 +33 -19 xml-xalan/c/src/XMLSupport/FormatterToXML.cpp
Index: FormatterToXML.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XMLSupport/FormatterToXML.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- FormatterToXML.cpp 2000/03/16 20:48:58 1.10
+++ FormatterToXML.cpp 2000/03/17 22:19:09 1.11
@@ -595,31 +595,45 @@
const XMLCh* const target,
const XMLCh* const data)
{
- try
- {
- writeParentTagEnd();
+// @@ Need to add this --
+// if(m_inEntityRef)
+// return;
- if (shouldIndent() == true)
+ // Use a fairly nasty hack to tell if the next node is supposed to be
+ // unescaped text.
+ if(equals(target, DOMString("xslt-next-is-raw"))
+ && equals(data, DOMString("formatter-to-dom")))
+ {
+ m_nextIsRaw = true;
+ }
+ else
+ {
+ try
{
- indent(m_writer, m_currentIndent);
- }
+ writeParentTagEnd();
- m_writer.write("<?");
- m_writer.write(target);
+ if (shouldIndent() == true)
+ {
+ indent(m_writer, m_currentIndent);
+ }
- if (length(data) > 0 && !isSpace(data[0]))
- {
- m_writer.write(" ");
- }
+ m_writer.write("<?");
+ m_writer.write(target);
- m_writer.write(data);
- m_writer.write("?>");
+ if (length(data) > 0 && !isSpace(data[0]))
+ {
+ m_writer.write(" ");
+ }
- m_startNewLine = true;
- }
- catch(...)
- {
- throw SAXException();
+ m_writer.write(data);
+ m_writer.write("?>");
+
+ m_startNewLine = true;
+ }
+ catch(...)
+ {
+ throw SAXException();
+ }
}
}