From 521b1a486763b1c17efc1c30a3bd939a754332e0 Mon Sep 17 00:00:00 2001 From: Tinny Ng <tng@apache.org> Date: Wed, 17 Jul 2002 18:58:48 +0000 Subject: [PATCH] samples update: for testing special encoding purpose. git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@174024 13f79535-47bb-0310-9956-ffa450edef68 --- samples/DOMCount/DOMCount.cpp | 8 ++++++++ samples/SAX2Count/SAX2Count.cpp | 11 +++++++++++ samples/SAXCount/SAXCount.cpp | 11 +++++++++++ tests/DOM/DeprecatedDOMCount/DeprecatedDOMCount.cpp | 8 ++++++++ 4 files changed, 38 insertions(+) diff --git a/samples/DOMCount/DOMCount.cpp b/samples/DOMCount/DOMCount.cpp index 59ac86acc..7a95dcf15 100644 --- a/samples/DOMCount/DOMCount.cpp +++ b/samples/DOMCount/DOMCount.cpp @@ -211,6 +211,14 @@ int main(int argC, char* argV[]) || !strcmp(argV[argInd], "-L")) { doList = true; + } + else if (!strcmp(argV[argInd], "-special:nel")) + { + // turning this on will lead to non-standard compliance behaviour + // it will recognize the unicode character 0x85 as new line character + // instead of regular character as specified in XML 1.0 + // do not turn this on unless really necessary + XMLPlatformUtils::recognizeNEL(true); } else { diff --git a/samples/SAX2Count/SAX2Count.cpp b/samples/SAX2Count/SAX2Count.cpp index 4c192c8e1..10e5722d1 100644 --- a/samples/SAX2Count/SAX2Count.cpp +++ b/samples/SAX2Count/SAX2Count.cpp @@ -56,6 +56,9 @@ /* * $Log$ +* Revision 1.18 2002/07/17 18:58:35 tng +* samples update: for testing special encoding purpose. +* * Revision 1.17 2002/06/17 15:33:05 tng * Name Xerces features as XMLUni::fgXercesXXXX instead of XMLUni::fgSAX2XercesXXXX so that they can be shared with DOM parser. * @@ -238,6 +241,14 @@ int main(int argC, char* argV[]) || !strcmp(argV[argInd], "-P")) { namespacePrefixes = true; + } + else if (!strcmp(argV[argInd], "-special:nel")) + { + // turning this on will lead to non-standard compliance behaviour + // it will recognize the unicode character 0x85 as new line character + // instead of regular character as specified in XML 1.0 + // do not turn this on unless really necessary + XMLPlatformUtils::recognizeNEL(true); } else { diff --git a/samples/SAXCount/SAXCount.cpp b/samples/SAXCount/SAXCount.cpp index 32c520e1d..22400553f 100644 --- a/samples/SAXCount/SAXCount.cpp +++ b/samples/SAXCount/SAXCount.cpp @@ -56,6 +56,9 @@ /* * $Log$ +* Revision 1.21 2002/07/17 18:58:36 tng +* samples update: for testing special encoding purpose. +* * Revision 1.20 2001/11/13 13:22:35 tng * SAXCount fix: restore previous feature to accept multiple input files. * @@ -247,6 +250,14 @@ int main(int argC, char* argV[]) || !strcmp(argV[argInd], "-L")) { doList = true; + } + else if (!strcmp(argV[argInd], "-special:nel")) + { + // turning this on will lead to non-standard compliance behaviour + // it will recognize the unicode character 0x85 as new line character + // instead of regular character as specified in XML 1.0 + // do not turn this on unless really necessary + XMLPlatformUtils::recognizeNEL(true); } else { diff --git a/tests/DOM/DeprecatedDOMCount/DeprecatedDOMCount.cpp b/tests/DOM/DeprecatedDOMCount/DeprecatedDOMCount.cpp index c63444590..fcdc6a098 100644 --- a/tests/DOM/DeprecatedDOMCount/DeprecatedDOMCount.cpp +++ b/tests/DOM/DeprecatedDOMCount/DeprecatedDOMCount.cpp @@ -178,6 +178,14 @@ int main(int argC, char* argV[]) || !strcmp(argV[argInd], "-L")) { doList = true; + } + else if (!strcmp(argV[argInd], "-special:nel")) + { + // turning this on will lead to non-standard compliance behaviour + // it will recognize the unicode character 0x85 as new line character + // instead of regular character as specified in XML 1.0 + // do not turn this on unless really necessary + XMLPlatformUtils::recognizeNEL(true); } else { -- GitLab