tng 2002/11/08 07:28:02 Modified: c/doc faq-build.xml migration.xml migration_archive.xml program-others.xml program.xml readme.xml Log: Documentation: talk about C++ namespace. Revision Changes Path 1.8 +22 -39 xml-xerces/c/doc/faq-build.xml Index: faq-build.xml =================================================================== RCS file: /home/cvs/xml-xerces/c/doc/faq-build.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- faq-build.xml 4 Jul 2002 15:37:40 -0000 1.7 +++ faq-build.xml 8 Nov 2002 15:28:02 -0000 1.8 @@ -41,49 +41,32 @@ </a> </faq> - <faq title="Why does my application gives unresolved linking errors on Solaris?"> + <faq title="Why does my application gives unresolved linking errors?"> - <q>Why does my application gives unresolved linking errors on Solaris?</q> + <q>Why does my application gives unresolved linking errors?</q> <a> - <p>On Solaris there are a few things that need to be done before you - execute your application using &XercesCName;. In case you're using the - binary build of &XercesCName; make sure that the OS and compiler are - the same version as the ones used to build the binary (please refer to - <jump href="faq-distrib.html#faq-1">FAQ: What platforms / compilers are - being used to build the binary distribution kits?</jump>). Different OS and - compiler versions might cause unresolved linking problems or compilation - errors. If the versions are different, rebuild the &XercesCName; library on - your system before building your application. If you're using ICU (which is - packaged with XML4C) you need to rebuild the compatible version of ICU - first.</p> - - <p>Also check that the library path is set properly and that the correct - versions of <code>gmake</code> and <code>autoconf</code> are on your system.</p> - - </a> - </faq> - - <faq title="Why does my application gives unresolved linking errors on AIX?"> - - <q>Why does my application gives unresolved linking errors on AIX?</q> - - <a> - - <p>In case you're using the binary build of &XercesCName; make sure that the - OS and compiler are the same version as the ones used to build the binary - (please refer to <jump href="faq-distrib.html#faq-1">FAQ: What platforms / compilers - are being used to build the binary distribution kits?</jump>). Different OS and - compiler versions might cause unresolved linking problems or compilation - errors. If the versions are different, rebuild the &XercesCName; library on - your system before building your application. If you're using ICU (which is - packaged with XML4C) you need to rebuild the compatible version of ICU - first.</p> - - <p>Also check that the library path is set properly and that the correct - versions of <code>gmake</code> and <code>autoconf</code> are on your system.</p> - + <p>Please check the following:</p> + <ol> + <li>If you're using the binary build of &XercesCName;, make sure that the OS and compiler are + the same version as the ones used to build the binary (please refer to + <jump href="faq-distrib.html#faq-1">FAQ: What platforms / compilers are + being used to build the binary distribution kits?</jump>). Different OS and + compiler versions might cause unresolved linking problems or compilation + errors. If the versions are different, rebuild the &XercesCName; library on + your system before building your application. If you're using ICU (which is + packaged with XML4C) you need to rebuild the compatible version of ICU + first.</li> + <li>Check that the library path is set properly and that the correct + versions of <code>gmake</code> and <code>autoconf</code> are on your system.</li> + <li>If C++ Namespace support is ENABLED (all the binary distributions of &XercesCName; + &XercesCVersion; are built with C++ Namespace enabled), users' applications + must namespace qualified all the &XercesCName; classes/data/variables with + <code>"&XercesCNamespace;::"</code> or add the <code>"using namespace &XercesCNamespace;"</code> + clause. See the Programming Guide <jump href="program-others.html#CPPNamespace"> + Using C++ Namespace</jump> for more details.</li> + </ol> </a> </faq> 1.36 +37 -23 xml-xerces/c/doc/migration.xml Index: migration.xml =================================================================== RCS file: /home/cvs/xml-xerces/c/doc/migration.xml,v retrieving revision 1.35 retrieving revision 1.36 diff -u -r1.35 -r1.36 --- migration.xml 23 Aug 2002 14:09:37 -0000 1.35 +++ migration.xml 8 Nov 2002 15:28:02 -0000 1.36 @@ -4,60 +4,74 @@ <s1 title="Migration"> <s2 title="Migration Archive"> - <p>For migration information to &XercesCName; 2.0.0 or earlier, + <p>For migration information to &XercesCName; 2.1.0 or earlier, please refer to <jump href="migrate_archive.html">Migration Archive. </jump></p> </s2> - <s2 title="Migrating from &XercesCName; 2.0.0 to &XercesCName; &XercesCVersion;"> - <p>This document is a discussion of the technical differences between - &XercesCName; 2.0.0 code base and the &XercesCName; &XercesCVersion;.</p> + <s2 title="Migrating from &XercesCName; 2.1.0 to &XercesCName; &XercesCVersion;"> + <p>The following section is a discussion of the technical differences between + &XercesCName; 2.1.0 code base and the &XercesCName; &XercesCVersion;.</p> <p>Topics discussed are:</p> <ul> - <li><link anchor="NewFeatures210">New features in &XercesCName; &XercesCVersion;</link></li> - <li><link anchor="API210">Public API Changes</link></li> + <li><link anchor="NewFeatures220">New features in &XercesCName; &XercesCVersion;</link></li> + <li><link anchor="CPPNamespace220">Using C++ Namespace</link></li> + <li><link anchor="API220">Public API Changes</link></li> <ul> - <li><link anchor="NewAPI210">New Public API</link></li> - <li><link anchor="ModifiedAPI210">Modified Public API</link></li> - <li><link anchor="DeprecatedAPI210">Deprecated/Removed Public API</link></li> + <li><link anchor="NewAPI220">New Public API</link></li> + <li><link anchor="ModifiedAPI220">Modified Public API</link></li> + <li><link anchor="DeprecatedAPI220">Deprecated/Removed Public API</link></li> </ul> </ul> - <anchor name="NewFeatures210"/> + <anchor name="NewFeatures220"/> <s3 title="New features in &XercesCName; &XercesCVersion;"> <ul> - <li>64 bit binaries distribution on Windows IA64 and Linux IA64</li> - <li>Support for Cygwin environment</li> - <li>DOM Level 3 DOMNode: compareTreePosition, lookupNamespaceURI, lookupNamespacePrefix and isDefaultNamespace</li> - <li>plus many more bug fixes</li> + <li>C++ Namespace Support</li> + <li></li> </ul> </s3> - <anchor name="API210"/> + <anchor name="CPPNamespace220"/> + <s3 title="Using C++ Namespace"> + <p>&XercesCName; &XercesCVersion; now supports C++ Namespace. All &XercesCName; + classes/data/variables are defined in the <code>"namespace &XercesCNamespace;"</code> + if C++ Namespace support is ENABLED.</p> + + <p>All the binary distributions of &XercesCName; &XercesCVersion; are now built with + C++ Namespace enabled. Therefore users' applications that links with the distributed + binary packages must namespace qualified all the &XercesCName; classes/data/variables + with <code>"&XercesCNamespace;::"</code> or add the + <code>"using namespace &XercesCNamespace;"</code> clause.</p> + + <p>See the Programming Guide <jump href="program-others.html#CPPNamespace">Using C++ Namespace</jump> + for more details.</p> + + </s3> + + <anchor name="API220"/> <s3 title="Public API Changes"> <p>The following lists the public API changes between the &XercesCName; - 2.0.0; and the &XercesCName; &XercesCVersion; releases + 2.1.0; and the &XercesCName; &XercesCVersion; releases of the parser. </p> - <anchor name="NewAPI210"/> + <anchor name="NewAPI220"/> <s4 title="New Public API"> <ul> - <li>To fix bug 7087, XMLEnumerator is added a virtual destructor.</li> - <li>To fix bug 11448, XMLNotationDecl::get/setBaseURI, and XMLEntityDecl::get/setBaseURI are added.</li> + <li>.</li> </ul> </s4> - <anchor name="ModifiedAPI210"/> + <anchor name="ModifiedAPI220"/> <s4 title="Modified Public API"> <ul> - <li>DOMNodeList: item, and getLength have been added a const modifier.</li> - <li>DOMNode: lookupNamespacePrefix, isDefaultNamespace, and lookupNamespaceURI have been added a const modifier.</li> + <li>.</li> </ul> </s4> - <anchor name="DeprecatedAPI210"/> + <anchor name="DeprecatedAPI220"/> <s4 title="Deprecated/Removed Public API"> <ul> <li>No Deprecated Public API in this release.</li> 1.10 +61 -1 xml-xerces/c/doc/migration_archive.xml Index: migration_archive.xml =================================================================== RCS file: /home/cvs/xml-xerces/c/doc/migration_archive.xml,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- migration_archive.xml 8 Aug 2002 19:24:54 -0000 1.9 +++ migration_archive.xml 8 Nov 2002 15:28:02 -0000 1.10 @@ -4,6 +4,7 @@ <s1 title="Migration Archive"> <s2 title="Migrating to earlier Releases"> <ul> + <li><link anchor="Migrateto210">Migrating from &XercesCName; 2.0.0 to 2.1.0</link></li> <li><link anchor="Migrateto200">Migrating from &XercesCName; 1.7.0 to 2.0.0</link></li> <li><link anchor="Migrateto170">Migrating from &XercesCName; 1.6.0 to 1.7.0</link></li> <li><link anchor="Migrateto160">Migrating from &XercesCName; 1.5.2 to 1.6.0</link></li> @@ -12,9 +13,68 @@ </ul> </s2> + <anchor name="Migrateto210"/> + <s2 title="Migrating from &XercesCName; 2.0.0 to &XercesCName; 2.1.0"> + <p>The following section is a discussion of the technical differences between + &XercesCName; 2.0.0 code base and the &XercesCName; 2.1.0.</p> + + <p>Topics discussed are:</p> + <ul> + <li><link anchor="NewFeatures210">New features in &XercesCName; 2.1.0</link></li> + <li><link anchor="API210">Public API Changes</link></li> + <ul> + <li><link anchor="NewAPI210">New Public API</link></li> + <li><link anchor="ModifiedAPI210">Modified Public API</link></li> + <li><link anchor="DeprecatedAPI210">Deprecated/Removed Public API</link></li> + </ul> + </ul> + + <anchor name="NewFeatures210"/> + <s3 title="New features in &XercesCName; 2.1.0"> + <ul> + <li>64 bit binaries distribution on Windows IA64 and Linux IA64</li> + <li>Support for Cygwin environment</li> + <li>DOM Level 3 DOMNode: compareTreePosition, lookupNamespaceURI, lookupNamespacePrefix and isDefaultNamespace</li> + <li>plus many more bug fixes</li> + </ul> + </s3> + + <anchor name="API210"/> + <s3 title="Public API Changes"> + + <p>The following lists the public API changes between the &XercesCName; + 2.0.0; and the &XercesCName; 2.1.0 releases + of the parser. </p> + + <anchor name="NewAPI210"/> + <s4 title="New Public API"> + <ul> + <li>To fix bug 7087, XMLEnumerator is added a virtual destructor.</li> + <li>To fix bug 11448, XMLNotationDecl::get/setBaseURI, and XMLEntityDecl::get/setBaseURI are added.</li> + </ul> + </s4> + + <anchor name="ModifiedAPI210"/> + <s4 title="Modified Public API"> + <ul> + <li>DOMNodeList: item, and getLength have been added a const modifier.</li> + <li>DOMNode: lookupNamespacePrefix, isDefaultNamespace, and lookupNamespaceURI have been added a const modifier.</li> + </ul> + </s4> + + <anchor name="DeprecatedAPI210"/> + <s4 title="Deprecated/Removed Public API"> + <ul> + <li>No Deprecated Public API in this release.</li> + </ul> + </s4> + + </s3> + </s2> + <anchor name="Migrateto200"/> <s2 title="Migrating from &XercesCName; 1.7.0 to &XercesCName; 2.0.0"> - <p>This document is a discussion of the technical differences between + <p>The following section is a discussion of the technical differences between &XercesCName; 1.7.0 code base and the &XercesCName; 2.0.0.</p> <p>Topics discussed are:</p> 1.6 +78 -0 xml-xerces/c/doc/program-others.xml Index: program-others.xml =================================================================== RCS file: /home/cvs/xml-xerces/c/doc/program-others.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- program-others.xml 26 Jul 2002 19:12:17 -0000 1.5 +++ program-others.xml 8 Nov 2002 15:28:02 -0000 1.6 @@ -272,4 +272,82 @@ provide.</p> </s2> + + <anchor name="CPPNamespace"/> + <s2 title="Using C++ Namespace"> + + <p>&XercesCName; &XercesCVersion; now supports C++ Namespace. Header + <code>"xercesc/util/XercesDefs.hpp"</code> has defined the following macros + so that C++ namespace is used if supported by the corresponding compiler.</p> + + <source> +#if defined(XERCES_HAS_CPP_NAMESPACE) + #define XERCES_CPP_NAMESPACE_BEGIN namespace &XercesCNSVersion; { + #define XERCES_CPP_NAMESPACE_END } + #define XERCES_CPP_NAMESPACE_USE using namespace &XercesCNSVersion; + #define XERCES_CPP_NAMESPACE_QUALIFIER &XercesCNSVersion;:: + + namespace &XercesCNSVersion; { } + namespace &XercesCNamespace; = &XercesCNSVersion;; +#else + #define XERCES_CPP_NAMESPACE_BEGIN + #define XERCES_CPP_NAMESPACE_END + #define XERCES_CPP_NAMESPACE_USE + #define XERCES_CPP_NAMESPACE_QUALIFIER +#endif + </source> + + <p>The macro <code>XERCES_HAS_CPP_NAMESPACE</code> is defined in each Compiler + Definition file if C++ Namespace is supported.</p> + <p>For example in header <code>xercesc/util/Compilers/GCCDefs.hpp</code>, + the C++ Namespace is enabled:</p> + + <source> +// ------------------------------------------------------------------------- +// Indicate that we support C++ namespace +// Do not define it if the compile cannot handle C++ namespace +// ------------------------------------------------------------------------- +#define XERCES_HAS_CPP_NAMESPACE + </source> + + <p>If C++ Namespace support is ENABLED (all the binary distributions of &XercesCName; + &XercesCVersion; are built with C++ Namespace enabled), users' applications + must namespace qualified all the &XercesCName; classes/data/variables with + <code>"&XercesCNamespace;::"</code> or add the <code>"using namespace &XercesCNamespace;"</code> + clause.</p> + + <p>NOTE: <code>"namespace &XercesCNamespace;"</code> and <code>"namespace &XercesCNSVersion;"</code> + are equivalent.</p> + + <p>Users can also make use of those pre-defined macro in their applications. For example:</p> + <source> +#include <xercesc/sax/HandlerBase.hpp> + +// need to properly scope any forward declarations +XERCES_CPP_NAMESPACE_BEGIN +class AttributeList; +XERCES_CPP_NAMESPACE_END + +// qualifier Xerces functions individually +void initializing() { + XERCES_CPP_NAMESPACE_QUALIFER XMLPlatformUtils::Initialize(); +} + +// or use &XercesCName; namespace in general +XERCES_CPP_NAMESPACE_USE + +class MySAXHandlers : public HandlerBase +{ +public: + // ----------------------------------------------------------------------- + // Handlers for the SAX DocumentHandler interface + // ----------------------------------------------------------------------- + void startElement(const XMLCh* const name, AttributeList& attributes); + void characters(const XMLCh* const chars, const unsigned int length); +: +: +}; + </source> + </s2> + </s1> 1.31 +1 -0 xml-xerces/c/doc/program.xml Index: program.xml =================================================================== RCS file: /home/cvs/xml-xerces/c/doc/program.xml,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- program.xml 26 Jul 2002 19:12:17 -0000 1.30 +++ program.xml 8 Nov 2002 15:28:02 -0000 1.31 @@ -78,6 +78,7 @@ <li><jump href="program-others.html#GrammarCache">Preparsing Grammar and Grammar Caching</jump></li> <li><jump href="program-others.html#LoadableMessageText">Loadable Message Text</jump></li> <li><jump href="program-others.html#PluggableTranscoders">Pluggable Transcoders</jump></li> + <li><jump href="program-others.html#CPPNamespace">Using C++ Namespace</jump></li> </ul> </s2> 1.27 +1 -1 xml-xerces/c/doc/readme.xml Index: readme.xml =================================================================== RCS file: /home/cvs/xml-xerces/c/doc/readme.xml,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- readme.xml 23 Aug 2002 14:09:37 -0000 1.26 +++ readme.xml 8 Nov 2002 15:28:02 -0000 1.27 @@ -17,7 +17,7 @@ <p>The parser provides high performance, modularity, and scalability. Source code, samples and API documentation are provided with the parser. For portability, care has been taken to make minimal use of templates, - no RTTI, no C++ namespaces and minimal use of #ifdefs.</p> + no RTTI, and minimal use of #ifdefs.</p> </s2>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]