summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkitty <kitty@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-06-24 22:59:20 +0000
committerkitty <kitty@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2002-06-24 22:59:20 +0000
commit9b8ffd6ffcd39feb5546358eb911e942b12fbe92 (patch)
tree7d1f6721277089989b2ca1fa694852cfa4727428
parent2e7e619596ccf0fb4e3dfc541a57d32917e2a14b (diff)
downloadATCD-9b8ffd6ffcd39feb5546358eb911e942b12fbe92.tar.gz
ChangeLogTag: Mon Jun 24 17:55:58 2002 Krishnakumar B <kitty@cs.wustl.edu>
-rw-r--r--ACEXML/parser/parser/Parser.cpp102
-rw-r--r--ACEXML/parser/parser/Parser.h1
-rw-r--r--ChangeLog17
-rw-r--r--ChangeLogs/ChangeLog-02a17
-rw-r--r--ChangeLogs/ChangeLog-03a17
-rw-r--r--include/makeinclude/wrapper_macros.GNU6
6 files changed, 117 insertions, 43 deletions
diff --git a/ACEXML/parser/parser/Parser.cpp b/ACEXML/parser/parser/Parser.cpp
index 1ceed61c971..0834ce4d7a9 100644
--- a/ACEXML/parser/parser/Parser.cpp
+++ b/ACEXML/parser/parser/Parser.cpp
@@ -756,9 +756,16 @@ ACEXML_Parser::parse_element (int is_root, ACEXML_Env &xmlenv)
else
{
this->xml_namespace_.processName(startname, ns_uri, ns_lname, 0);
- const ACEXML_Char* prefix = this->xml_namespace_.getPrefix (ns_uri);
+ ACEXML_Char* temp (ACE::strnew (startname));
+ ACE_Auto_Basic_Array_Ptr<ACEXML_Char> cleanup_temp (temp);
+ ACE_Tokenizer ns_att (temp);
+ ns_att.delimiter_replace (':', 0);
+ ACEXML_Char* prefix = ns_att.next ();
+ ACEXML_Char* name = ns_att.next();
if (this->namespaces_)
{
+ if (name == 0)
+ prefix = 0;
this->content_handler_->startPrefixMapping (prefix,
ns_uri,
xmlenv);
@@ -788,9 +795,16 @@ ACEXML_Parser::parse_element (int is_root, ACEXML_Env &xmlenv)
case '>':
{
this->xml_namespace_.processName (startname, ns_uri, ns_lname, 0);
- const ACEXML_Char* prefix = this->xml_namespace_.getPrefix (ns_uri);
+ ACEXML_Char* temp (ACE::strnew (startname));
+ ACE_Auto_Basic_Array_Ptr<ACEXML_Char> cleanup_temp (temp);
+ ACE_Tokenizer ns_att (temp);
+ ns_att.delimiter_replace (':', 0);
+ ACEXML_Char* prefix = ns_att.next ();
+ ACEXML_Char* name = ns_att.next();
if (this->namespaces_)
{
+ if (name == 0)
+ prefix = 0;
this->content_handler_->startPrefixMapping (prefix,
ns_uri,
xmlenv);
@@ -987,44 +1001,52 @@ ACEXML_Parser::parse_element (int is_root, ACEXML_Env &xmlenv)
ACEXML_CHECK;
break;
case '/': // an ETag.
- this->get (); // consume '/'
- endname = this->read_name ();
- if (endname == 0 ||
- ACE_OS_String::strcmp (startname, endname) != 0)
- {
- ACE_NEW_NORETURN (exception,
- ACEXML_SAXParseException
- (ACE_LIB_TEXT
- ("Mismatched End-tag encountered")));
- xmlenv.exception (exception);
- this->report_fatal_error(*exception, xmlenv);
- return ;
- }
- if (this->skip_whitespace (0) != '>')
- {
- ACE_NEW_NORETURN (exception,
- ACEXML_SAXParseException
- (ACE_LIB_TEXT
- ("Expecting '>' in an end-tag")));
- xmlenv.exception (exception);
- this->report_fatal_error(*exception, xmlenv);
- return;
- }
- this->content_handler_->endElement (ns_uri,
- ns_lname,
- endname,
- xmlenv);
- ACEXML_CHECK;
- if (this->namespaces_)
- {
- const ACEXML_Char* prefix = this->xml_namespace_.getPrefix (ns_uri);
- this->content_handler_->endPrefixMapping (prefix, xmlenv);
- ACEXML_CHECK;
- }
- if (new_namespace != 0)
- this->xml_namespace_.popContext ();
- return;
-
+ {
+ this->get (); // consume '/'
+ endname = this->read_name ();
+ if (endname == 0 ||
+ ACE_OS_String::strcmp (startname, endname) != 0)
+ {
+ ACE_NEW_NORETURN (exception,
+ ACEXML_SAXParseException
+ (ACE_LIB_TEXT
+ ("Mismatched End-tag encountered")));
+ xmlenv.exception (exception);
+ this->report_fatal_error(*exception, xmlenv);
+ return ;
+ }
+ if (this->skip_whitespace (0) != '>')
+ {
+ ACE_NEW_NORETURN (exception,
+ ACEXML_SAXParseException
+ (ACE_LIB_TEXT
+ ("Expecting '>' in an end-tag")));
+ xmlenv.exception (exception);
+ this->report_fatal_error(*exception, xmlenv);
+ return;
+ }
+ this->content_handler_->endElement (ns_uri,
+ ns_lname,
+ endname,
+ xmlenv);
+ ACEXML_CHECK;
+ ACEXML_Char* temp (ACE::strnew (startname));
+ ACE_Auto_Basic_Array_Ptr<ACEXML_Char> cleanup_temp (temp);
+ ACE_Tokenizer ns_att (temp);
+ ns_att.delimiter_replace (':', 0);
+ ACEXML_Char* prefix = ns_att.next ();
+ ACEXML_Char* name = ns_att.next();
+ if (this->namespaces_)
+ {
+ if (name == 0)
+ prefix = 0;
+ this->content_handler_->endPrefixMapping (prefix, xmlenv);
+ ACEXML_CHECK;
+ }
+ if (new_namespace != 0)
+ this->xml_namespace_.popContext ();
+ return;
+ }
default: // a new nested element?
this->parse_element (0, xmlenv);
ACEXML_CHECK;
diff --git a/ACEXML/parser/parser/Parser.h b/ACEXML/parser/parser/Parser.h
index c1eb8680bd7..84aabd11e74 100644
--- a/ACEXML/parser/parser/Parser.h
+++ b/ACEXML/parser/parser/Parser.h
@@ -23,6 +23,7 @@
#include "ace/SString.h"
#include "ace/Hash_Map_Manager.h"
#include "ace/Containers_T.h"
+#include "ace/Auto_Ptr.h"
#include "ACEXML/parser/parser/Entity_Manager.h"
/**
diff --git a/ChangeLog b/ChangeLog
index f13d1c9d97d..866e82a5985 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+Mon Jun 24 17:55:58 2002 Krishnakumar B <kitty@cs.wustl.edu>
+
+ * include/makeinclude/wrapper_macros.GNU (ACE_BETA_VERSION):
+
+ Grab the version information from Version.h rather than VERSION
+ as VERSION is not likely to installed when doing a make install.
+ Thanks to Bala for the suggestion.
+
+ * ACEXML/parser/parser/Parser.cpp:
+ * ACEXML/parser/parser/Parser.h:
+
+ Get the prefix right in case of a default namespace being
+ present. Previously we were using a URI a get to the prefix,
+ which doesn't work when the URI is the same as URI for another
+ namespace prefix.
+
+
Mon Jun 24 19:54:34 UTC 2002 Craig Rodrigues <crodrigu@bbn.com>
* ace/config-g++-common.h: Define ACE_HAS_STD_TEMPLATE_METHOD_SPECIALIZATION
diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a
index f13d1c9d97d..866e82a5985 100644
--- a/ChangeLogs/ChangeLog-02a
+++ b/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,20 @@
+Mon Jun 24 17:55:58 2002 Krishnakumar B <kitty@cs.wustl.edu>
+
+ * include/makeinclude/wrapper_macros.GNU (ACE_BETA_VERSION):
+
+ Grab the version information from Version.h rather than VERSION
+ as VERSION is not likely to installed when doing a make install.
+ Thanks to Bala for the suggestion.
+
+ * ACEXML/parser/parser/Parser.cpp:
+ * ACEXML/parser/parser/Parser.h:
+
+ Get the prefix right in case of a default namespace being
+ present. Previously we were using a URI a get to the prefix,
+ which doesn't work when the URI is the same as URI for another
+ namespace prefix.
+
+
Mon Jun 24 19:54:34 UTC 2002 Craig Rodrigues <crodrigu@bbn.com>
* ace/config-g++-common.h: Define ACE_HAS_STD_TEMPLATE_METHOD_SPECIALIZATION
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index f13d1c9d97d..866e82a5985 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,3 +1,20 @@
+Mon Jun 24 17:55:58 2002 Krishnakumar B <kitty@cs.wustl.edu>
+
+ * include/makeinclude/wrapper_macros.GNU (ACE_BETA_VERSION):
+
+ Grab the version information from Version.h rather than VERSION
+ as VERSION is not likely to installed when doing a make install.
+ Thanks to Bala for the suggestion.
+
+ * ACEXML/parser/parser/Parser.cpp:
+ * ACEXML/parser/parser/Parser.h:
+
+ Get the prefix right in case of a default namespace being
+ present. Previously we were using a URI a get to the prefix,
+ which doesn't work when the URI is the same as URI for another
+ namespace prefix.
+
+
Mon Jun 24 19:54:34 UTC 2002 Craig Rodrigues <crodrigu@bbn.com>
* ace/config-g++-common.h: Define ACE_HAS_STD_TEMPLATE_METHOD_SPECIALIZATION
diff --git a/include/makeinclude/wrapper_macros.GNU b/include/makeinclude/wrapper_macros.GNU
index 9da7283cc8b..560ae965cf5 100644
--- a/include/makeinclude/wrapper_macros.GNU
+++ b/include/makeinclude/wrapper_macros.GNU
@@ -171,9 +171,9 @@ endif # PACE_ROOT
# minor and beta) to run, but applications with dependencies on libraries
# with different minor or major or beta versions to fail.
#
-ACE_MAJOR_VERSION := $(shell echo `perl -ne 'if (/ACE version/) { s/[^0-9]+(\d+)+\.(\d+)+\.(\d+)+.+/\1/ ; print }' ${ACE_ROOT}/VERSION`)
-ACE_MINOR_VERSION := $(shell echo `perl -ne 'if (/ACE version/) { s/[^0-9]+(\d+)+\.(\d+)+\.(\d+)+.+/\2/ ; print }' ${ACE_ROOT}/VERSION`)
-ACE_BETA_VERSION := $(shell echo `perl -ne 'if (/ACE version/) { s/[^0-9]+(\d+)+\.(\d+)+\.(\d+)+.+/\3/ ; print }' ${ACE_ROOT}/VERSION`)
+ACE_MAJOR_VERSION := $(shell echo `perl -ne 'if (/ACE_VERSION/) { s/[^0-9]+(\d+)+\.(\d+)+\.(\d+)+.+/\1/ ; print }' ${ACE_ROOT}/ace/Version.h`)
+ACE_MINOR_VERSION := $(shell echo `perl -ne 'if (/ACE_VERSION/) { s/[^0-9]+(\d+)+\.(\d+)+\.(\d+)+.+/\2/ ; print }' ${ACE_ROOT}/ace/Version.h`)
+ACE_BETA_VERSION := $(shell echo `perl -ne 'if (/ACE_VERSION/) { s/[^0-9]+(\d+)+\.(\d+)+\.(\d+)+.+/\3/ ; print }' ${ACE_ROOT}/ace/Version.h`)
# Version number of the libraries
#