You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by dm...@apache.org on 2005/05/06 19:24:32 UTC
cvs commit: xml-xalan/c/src/xalanc/PlatformSupport FormatterListener.cpp FormatterListener.hpp XalanUnicode.hpp
dmitryh 2005/05/06 10:24:32
Modified: c/src/xalanc/PlatformSupport FormatterListener.cpp
FormatterListener.hpp XalanUnicode.hpp
Log:
Fix for XALANC-480
Revision Changes Path
1.8 +3 -2 xml-xalan/c/src/xalanc/PlatformSupport/FormatterListener.cpp
Index: FormatterListener.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/xalanc/PlatformSupport/FormatterListener.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- FormatterListener.cpp 8 Nov 2004 18:11:05 -0000 1.7
+++ FormatterListener.cpp 6 May 2005 17:24:31 -0000 1.8
@@ -39,7 +39,8 @@
FormatterListener::FormatterListener(eFormat theFormat) :
ParentType(),
m_prefixResolver(0),
- m_outputFormat(theFormat)
+ m_outputFormat(theFormat),
+ m_XMLVersion(XML_VERSION_1_0)
{
assert(length(s_piTarget) == s_piTargetLength);
assert(length(s_piData) == s_piDataLength);
1.7 +35 -1 xml-xalan/c/src/xalanc/PlatformSupport/FormatterListener.hpp
Index: FormatterListener.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/xalanc/PlatformSupport/FormatterListener.hpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- FormatterListener.hpp 8 Nov 2004 18:11:05 -0000 1.6
+++ FormatterListener.hpp 6 May 2005 17:24:31 -0000 1.7
@@ -76,6 +76,14 @@
OUTPUT_METHOD_OTHER = 5
};
+protected:
+ enum eXMLVer
+ {
+ XML_VERSION_1_0 = 0,
+ XML_VERSION_1_1 = 1,
+ };
+
+public:
FormatterListener(eFormat theFormat);
virtual
@@ -87,6 +95,17 @@
return m_outputFormat;
}
+ eXMLVer
+ getXMLVersion() const
+ {
+ return m_XMLVersion;
+ }
+
+ bool
+ isXML1_1Version()const
+ {
+ return ( XML_VERSION_1_1 == m_XMLVersion );
+ }
/**
* Get the PrefixResolver for the FormatterListener
*
@@ -245,6 +264,19 @@
const PrefixResolver* m_prefixResolver;
static const XalanDOMString s_emptyString;
+
+ /**
+ * Set the output version during serializing.
+ * Should be called once
+ *
+ * @param theVersion XML version of the output
+ */
+ void
+ setXMLVersion( eXMLVer theVersion )
+ {
+ *(const_cast<eXMLVer*>(&m_XMLVersion)) = theVersion;
+ }
+
private:
@@ -259,6 +291,8 @@
// Data membmers...
const eFormat m_outputFormat;
+
+ const eXMLVer m_XMLVersion;
};
1.7 +8 -0 xml-xalan/c/src/xalanc/PlatformSupport/XalanUnicode.hpp
Index: XalanUnicode.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/xalanc/PlatformSupport/XalanUnicode.hpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- XalanUnicode.hpp 26 Feb 2004 22:34:18 -0000 1.6
+++ XalanUnicode.hpp 6 May 2005 17:24:31 -0000 1.7
@@ -167,6 +167,10 @@
charRightCurlyBracket = 0x7D,
+ charNEL = 0x85,
+
+ charLSEP = 0x2028,
+
charPerMilleSign = 0x2030
};
@@ -302,6 +306,10 @@
static const XalanDOMChar charRightCurlyBracket = 0x7D;
+ static const XalanDOMChar charNEL = 0x85;
+
+ static const XalanDOMChar charLSEP = 0x2028;
+
static const XalanDOMChar charPerMilleSign = 0x2030;
#endif
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org