summaryrefslogtreecommitdiff
path: root/ACE/ACEXML/parser/debug_validator
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/ACEXML/parser/debug_validator')
-rw-r--r--ACE/ACEXML/parser/debug_validator/Debug_Attributes_Builder.cpp211
-rw-r--r--ACE/ACEXML/parser/debug_validator/Debug_Attributes_Builder.h166
-rw-r--r--ACE/ACEXML/parser/debug_validator/Debug_DTD_Manager.cpp71
-rw-r--r--ACE/ACEXML/parser/debug_validator/Debug_DTD_Manager.h76
-rw-r--r--ACE/ACEXML/parser/debug_validator/Debug_DTD_Manager_Export.h38
-rw-r--r--ACE/ACEXML/parser/debug_validator/Debug_Element_Builder.cpp144
-rw-r--r--ACE/ACEXML/parser/debug_validator/Debug_Element_Builder.h123
-rw-r--r--ACE/ACEXML/parser/debug_validator/Element_Tree.cpp72
-rw-r--r--ACE/ACEXML/parser/debug_validator/Element_Tree.h160
-rw-r--r--ACE/ACEXML/parser/debug_validator/Element_Tree.inl92
10 files changed, 0 insertions, 1153 deletions
diff --git a/ACE/ACEXML/parser/debug_validator/Debug_Attributes_Builder.cpp b/ACE/ACEXML/parser/debug_validator/Debug_Attributes_Builder.cpp
deleted file mode 100644
index ccebd4b9098..00000000000
--- a/ACE/ACEXML/parser/debug_validator/Debug_Attributes_Builder.cpp
+++ /dev/null
@@ -1,211 +0,0 @@
-// $Id$
-
-#include "ACEXML/common/SAXExceptions.h"
-#include "ACEXML/parser/debug_validator/Debug_Attributes_Builder.h"
-
-ACEXML_Debug_Attribute_Builder::ACEXML_Debug_Attribute_Builder ()
- : type_ (ERROR_TYPE),
- default_decl_ (INVALID)
-{
-}
-
-ACEXML_Debug_Attribute_Builder::ACEXML_Debug_Attribute_Builder (const ACEXML_Debug_Attribute_Builder &rhs)
- : name_ (rhs.name_),
- type_ (rhs.type_),
- default_decl_ (rhs.default_decl_),
- default_value_ (rhs.default_value_),
- att_value_queue_ (rhs.att_value_queue_)
-{
-}
-
-ACEXML_Debug_Attribute_Builder::~ACEXML_Debug_Attribute_Builder ()
-{
-}
-
-int
-ACEXML_Debug_Attribute_Builder::setName (const ACEXML_Char *n)
-{
- this->name_.set (n, 0);
- return 0;
-}
-
-const ACEXML_Char *
-ACEXML_Debug_Attribute_Builder::getName (void)
-{
- return this->name_.fast_rep ();
-}
-
-int
-ACEXML_Debug_Attribute_Builder::setAttType (const ATT_TYPE type
- ACEXML_ENV_ARG_DECL)
-{
- if (this->type_ == ERROR_TYPE)
- {
- this->type_ = type;
- return 0;
- }
- ACEXML_THROW_RETURN (ACEXML_SAXParseException (ACE_TEXT("Attribute type redefinition in Debug Validator")), -1);
-
-}
-
-int
-ACEXML_Debug_Attribute_Builder::insertList (const ACEXML_Char *n
- ACEXML_ENV_ARG_DECL_NOT_USED)
-{
- ACEXML_String str (n, 0, 0);
-
- this->att_value_queue_.enqueue_tail (str);
- return 0;
-}
-
-int
-ACEXML_Debug_Attribute_Builder::setDefault (const DEFAULT_DECL def,
- const ACEXML_Char *value
- ACEXML_ENV_ARG_DECL_NOT_USED)
-{
- this->default_decl_ = def;
- this->default_value_.set (value, 0);
- return 0;
-}
-
-int
-ACEXML_Debug_Attribute_Builder::validAttr (void)
-{
- // @@ Not implemented. Always return 1 (true) for now.
- return 1;
-}
-
-void
-ACEXML_Debug_Attribute_Builder::dump (void)
-{
- cout << this->name_ << " ";
-
- switch (this->type_)
- {
- case CDATA:
- cout << "CDATA ";
- break;
- case ID:
- cout << "ID ";
- break;
- case IDREF:
- cout << "IDREF ";
- break;
- case IDREFS:
- cout << "IDREFS ";
- break;
- case ENTITY:
- cout << "ENTITY ";
- break;
- case ENTITIES:
- cout << "ENTITIES ";
- break;
- case NMTOKEN:
- cout << "NMTOKEN ";
- break;
- case NMTOKENS:
- cout << "NMTOKENS ";
- break;
- case NOTATION:
- cout << "NOTATION ";
- // Fall thru
- case ENUMERATION:
- {
- cout << "(";
- ACEXML_STRING_QUEUE_ITERATOR iter (this->att_value_queue_);
- ACEXML_String *n = 0;
-
- while (iter.advance () != 0)
- {
- if (n == 0)
- cout << " | ";
- iter.next (n);
- cout << *n;
- }
- cout << ") ";
- }
- break;
- default:
- cout << "*** UNKNOWN TYPE ***";
- break;
- }
-
- switch (this->default_decl_)
- {
- case REQUIRED:
- cout << "#REQUIRED";
- break;
- case IMPLIED:
- cout << "#IMPLIED";
- break;
- case FIXED:
- cout << "#FIXED " << this->default_value_;
- break;
- default:
- cout << "**** UNDEFINED DEFAULT DECL ****";
- break;
- }
-}
-// ========================================
-
-ACEXML_Debug_Attributes_Builder::ACEXML_Debug_Attributes_Builder ()
-{
-}
-
-ACEXML_Debug_Attributes_Builder::~ACEXML_Debug_Attributes_Builder ()
-{
-}
-
-int
-ACEXML_Debug_Attributes_Builder::setElement (const ACEXML_Char *,
- const ACEXML_Char *,
- const ACEXML_Char *qName ACEXML_ENV_ARG_DECL_NOT_USED)
-{
- this->element_name_.set (qName, 0);
- return 0;
-}
-
-ACEXML_Attribute_Def_Builder *
-ACEXML_Debug_Attributes_Builder::getAttribute_Def_Builder ()
-{
- ACEXML_Attribute_Def_Builder *tmp;
-
- ACE_NEW_RETURN (tmp,
- ACEXML_Debug_Attribute_Builder (),
- 0);
- return tmp;
-}
-
-int
-ACEXML_Debug_Attributes_Builder::insertAttribute (ACEXML_Attribute_Def_Builder *def ACEXML_ENV_ARG_DECL)
-{
- ACEXML_Attribute_Def_Builder::VAR ptr (def);
-
- if (def != 0)
- {
- ACEXML_String attname (def->getName (), 0, 0);
- ACEXML_Debug_Attribute_Builder *ptr =
- dynamic_cast<ACEXML_Debug_Attribute_Builder *> (def);
- this->attributes_.bind (attname, *ptr);
- return 0;
- }
- ACEXML_THROW_RETURN (ACEXML_SAXParseException (ACE_TEXT("ACEXML_Debug_Attributes_Builder internal error")), -1);
-}
-
-void
-ACEXML_Debug_Attributes_Builder::dump (void)
-{
- // @@ Print print.
- cout << "<!ATTLIST " << this->element_name_ << endl;
-
- ACEXML_ATT_MAP_ITER iter (this->attributes_);
- ACEXML_ATT_MAP_ENTRY *item;
-
- while (iter.advance () != 0)
- {
- iter.next (item);
- cout << "\n\t";
- item->int_id_.dump ();
- }
- cout << ">" << endl;
-}
diff --git a/ACE/ACEXML/parser/debug_validator/Debug_Attributes_Builder.h b/ACE/ACEXML/parser/debug_validator/Debug_Attributes_Builder.h
deleted file mode 100644
index e22b6ef936a..00000000000
--- a/ACE/ACEXML/parser/debug_validator/Debug_Attributes_Builder.h
+++ /dev/null
@@ -1,166 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Debug_Attributes_Builder.h
- *
- * $Id$
- *
- * @author Nanbor Wang <nanbor@cs.wustl.edu>
- */
-//=============================================================================
-#ifndef _ACEXML_DEBUG_ATTRIBUTES_BUILDER_H_
-#define _ACEXML_DEBUG_ATTRIBUTES_BUILDER_H_
-
-#include /**/ "ace/pre.h"
-#include "ACEXML/parser/debug_validator/Debug_DTD_Manager_Export.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-#pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ACEXML/common/Attributes_Def_Builder.h"
-#include "ace/Hash_Map_Manager.h"
-#include "ace/Unbounded_Queue.h"
-
-typedef ACE_Unbounded_Queue<ACEXML_String> ACEXML_STRING_QUEUE;
-typedef ACE_Unbounded_Queue_Iterator<ACEXML_String> ACEXML_STRING_QUEUE_ITERATOR;
-
-/**
- * @class ACEXML_Debug_Attribute_Builder Debug_Attributes_Builder.h "parser/debug_validator/Debug_Attributes_Builder.h"
- *
- * This class prints out the Attribute definition for debugging purpose.
- */
-class ACEXML_DEBUG_DTD_MANAGER_Export ACEXML_Debug_Attribute_Builder
- : public ACEXML_Attribute_Def_Builder
-{
-public:
- ACEXML_Debug_Attribute_Builder ();
-
- ACEXML_Debug_Attribute_Builder (const ACEXML_Debug_Attribute_Builder &rhs);
-
- virtual ~ACEXML_Debug_Attribute_Builder ();
-
- /**
- * Specify the name of the attribute.
- */
- virtual int setName (const ACEXML_Char *n);
- virtual const ACEXML_Char *getName (void);
-
- /**
- * Set the attribute type.
- */
- virtual int setAttType (const ATT_TYPE type ACEXML_ENV_ARG_DECL);
-
- /**
- * Insert an element for NOTATION or ENUMERATION type attribute.
- */
- virtual int insertList (const ACEXML_Char *Name ACEXML_ENV_ARG_DECL);
-
- /**
- * Set default attribute declaration.
- */
- virtual int setDefault (const DEFAULT_DECL def,
- const ACEXML_Char *value ACEXML_ENV_ARG_DECL)
- ;
-
- /**
- * Check validity of the current attribute definition being built.
- *
- * @retval 0 if the attribute is not a valid combo.
- */
- virtual int validAttr (void);
-
-
- /**
- * Dump the content of the attribute definition.
- */
- virtual void dump (void);
-private:
- /// Attribute name.
- ACEXML_String name_;
-
- /// Type of attribute.
- ATT_TYPE type_;
-
- /// Default value type.
- DEFAULT_DECL default_decl_;
-
- /// Default attribute value.
- ACEXML_String default_value_;
-
- /// Holds a queue of enumerated attribute values.
- ACEXML_STRING_QUEUE att_value_queue_;
-};
-
-typedef ACE_Hash_Map_Entry<ACEXML_String,
- ACEXML_Debug_Attribute_Builder> ACEXML_ATT_MAP_ENTRY;
-
-typedef ACE_Hash_Map_Manager_Ex <ACEXML_String,
- ACEXML_Debug_Attribute_Builder,
- ACE_Hash<ACEXML_String>,
- ACE_Equal_To<ACEXML_String>,
- ACE_Null_Mutex> ACEXML_ATT_MAP;
-
-typedef ACE_Hash_Map_Iterator_Ex<ACEXML_String,
- ACEXML_Debug_Attribute_Builder,
- ACE_Hash<ACEXML_String>,
- ACE_Equal_To<ACEXML_String>,
- ACE_Null_Mutex> ACEXML_ATT_MAP_ITER;
-
-typedef ACE_Hash_Map_Reverse_Iterator_Ex<ACEXML_String,
- ACEXML_Debug_Attribute_Builder,
- ACE_Hash<ACEXML_String>,
- ACE_Equal_To<ACEXML_String>,
- ACE_Null_Mutex> ACEXML_ATT_MAP_REVERSE_ITER;
-
-/**
- * @class ACEXML_Debug_Attributes_Builder Debug_Attributes_Builder.h "parser/debug_validator/Debug_Attributes_Builder.h"
- *
- * This class prints out Attribute definitions for debugging purpose.
- */
-class ACEXML_DEBUG_DTD_MANAGER_Export ACEXML_Debug_Attributes_Builder
- : public ACEXML_Attributes_Def_Builder
-{
-public:
- ACEXML_Debug_Attributes_Builder ();
-
- virtual ~ACEXML_Debug_Attributes_Builder ();
-
- /**
- * Set the element name that the attribute builder applies.
- *
- * @retval 0 if valid, -1 otherwise.
- */
- virtual int setElement (const ACEXML_Char *namespaceURI,
- const ACEXML_Char *localName,
- const ACEXML_Char *qName ACEXML_ENV_ARG_DECL)
- ;
-
- /**
- * Acquire an Attribute_Builder.
- */
- virtual ACEXML_Attribute_Def_Builder *getAttribute_Def_Builder ();
-
- /**
- * Add a definition for one attribute.
- */
- virtual int insertAttribute (ACEXML_Attribute_Def_Builder *def ACEXML_ENV_ARG_DECL);
-
-
- /**
- * Dump the content of the attribute definition.
- */
- virtual void dump (void);
-protected:
- /// The name of the element type these attributes applied.
- ACEXML_String element_name_;
-
- /// Collection of attributes.
- ACEXML_ATT_MAP attributes_;
-};
-
-
-#include /**/ "ace/post.h"
-
-#endif /* _ACEXML_DEBUG_ATTRIBUTES_BUILDER_H_ */
diff --git a/ACE/ACEXML/parser/debug_validator/Debug_DTD_Manager.cpp b/ACE/ACEXML/parser/debug_validator/Debug_DTD_Manager.cpp
deleted file mode 100644
index d0745d13bfc..00000000000
--- a/ACE/ACEXML/parser/debug_validator/Debug_DTD_Manager.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-// -*- C++ -*- $Id$
-
-#include "ACEXML/common/SAXExceptions.h"
-#include "ACEXML/parser/debug_validator/Debug_DTD_Manager.h"
-#include "ACEXML/parser/debug_validator/Debug_Element_Builder.h"
-#include "ACEXML/parser/debug_validator/Debug_Attributes_Builder.h"
-
-ACEXML_Debug_DTD_Manager::ACEXML_Debug_DTD_Manager ()
-{
-
-}
-
-ACEXML_Debug_DTD_Manager::~ACEXML_Debug_DTD_Manager ()
-{
-
-}
-
-ACEXML_Element_Def_Builder *
-ACEXML_Debug_DTD_Manager::getElement_Def_Builder ()
-{
- return new ACEXML_Debug_Element_Builder ();
-}
-
-int
-ACEXML_Debug_DTD_Manager::insertElement_Definition (ACEXML_Element_Def_Builder *def ACEXML_ENV_ARG_DECL)
-{
- ACEXML_Element_Def_Builder::VAR ptr (def);
-
- if (def != 0)
- {
- ptr->dump ();
- return 0;
- }
-
- ACEXML_THROW_RETURN (ACEXML_SAXParseException (ACE_TEXT("ACEXML_Debug_Attributes_Builder internal error")), -1);
-}
-
-ACEXML_Attributes_Def_Builder *
-ACEXML_Debug_DTD_Manager::getAttribute_Def_Builder ()
-{
- ACEXML_Attributes_Def_Builder *tmp;
- ACE_NEW_RETURN (tmp,
- ACEXML_Debug_Attributes_Builder (),
- 0);
- return tmp;
-}
-
-int
-ACEXML_Debug_DTD_Manager::insertAttributes_Definition (ACEXML_Attributes_Def_Builder *def ACEXML_ENV_ARG_DECL)
-{
- ACEXML_Attributes_Def_Builder::VAR ptr (def);
- if (def != 0)
- {
- ptr->dump ();
- return 0;
- }
-
- ACEXML_THROW_RETURN (ACEXML_SAXParseException (ACE_TEXT("ACEXML_Debug_Attributes_Builder internal error")), -1);
-}
-
-ACEXML_Validator *
-ACEXML_Debug_DTD_Manager::getValidator (const ACEXML_Char *namespaceURI,
- const ACEXML_Char *localName,
- const ACEXML_Char *qName ACEXML_ENV_ARG_DECL)
-{
- ACE_UNUSED_ARG (namespaceURI);
- ACE_UNUSED_ARG (localName);
- ACE_UNUSED_ARG (qName);
-
- ACEXML_THROW_RETURN (ACEXML_SAXNotSupportedException (ACE_TEXT ("getValidator()")), 0);
-}
diff --git a/ACE/ACEXML/parser/debug_validator/Debug_DTD_Manager.h b/ACE/ACEXML/parser/debug_validator/Debug_DTD_Manager.h
deleted file mode 100644
index 0849d95ecb2..00000000000
--- a/ACE/ACEXML/parser/debug_validator/Debug_DTD_Manager.h
+++ /dev/null
@@ -1,76 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Debug_DTD_Manager.h
- *
- * $Id$
- *
- * @author Nanbor Wang <nanbor@cs.wustl.edu>
- */
-//=============================================================================
-#ifndef _ACEXML_DEBUG_DTD_Manager_H_
-#define _ACEXML_DEBUG_DTD_Manager_H_
-
-#include /**/ "ace/pre.h"
-#include "ACEXML/parser/debug_validator/Debug_DTD_Manager_Export.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-#pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ACEXML/common/DTD_Manager.h"
-
-class ACEXML_DEBUG_DTD_MANAGER_Export ACEXML_Debug_DTD_Manager : public ACEXML_DTD_Manager
-{
-public:
- ACEXML_Debug_DTD_Manager ();
-
- virtual ~ACEXML_Debug_DTD_Manager ();
-
- /**
- * Acquire a pointer to an element definition builder. The XML parser use
- * this interface to acquire the definition builder and use the builder
- * to create the DTD element definition. The resulting builder is then
- * registered with the DTD Manager or destroyed if error occured when the
- * builder encountered errors.
- *
- * @retval 0 if error occurs creating the builder.
- */
- virtual ACEXML_Element_Def_Builder *getElement_Def_Builder ();
-
- /**
- * Insert a new element definition into the DTD Manager.
- *
- * @retval 0 if success, -1 if error.
- */
- virtual int insertElement_Definition (ACEXML_Element_Def_Builder *def ACEXML_ENV_ARG_DECL);
-
- /**
- * Acquire a pointer to an attributes definition builder.
- *
- */
- virtual ACEXML_Attributes_Def_Builder *getAttribute_Def_Builder ();
-
- /**
- * Insert a new attributes definition into the DTD Manager.
- *
- * @retval 0 if success, -1 otherwise.
- */
- virtual int insertAttributes_Definition (ACEXML_Attributes_Def_Builder *def ACEXML_ENV_ARG_DECL);
-
- /**
- * Acquire an element validator to validate an XML element.
- *
- * @todo I haven't figured out what memory management scheme
- * we should use for the acquired validator.
- */
- virtual ACEXML_Validator *getValidator (const ACEXML_Char *namespaceURI,
- const ACEXML_Char *localName,
- const ACEXML_Char *qName ACEXML_ENV_ARG_DECL);
-};
-
-#include /**/ "ace/post.h"
-
-
-#endif /* _ACEXML_DTD_Manager_H_ */
diff --git a/ACE/ACEXML/parser/debug_validator/Debug_DTD_Manager_Export.h b/ACE/ACEXML/parser/debug_validator/Debug_DTD_Manager_Export.h
deleted file mode 100644
index b4cf1c8a536..00000000000
--- a/ACE/ACEXML/parser/debug_validator/Debug_DTD_Manager_Export.h
+++ /dev/null
@@ -1,38 +0,0 @@
-
-// -*- C++ -*-
-// $Id$
-// Definition for Win32 Export directives.
-// This file is generated automatically by generate_export_file.pl -s ACEXML_DEBUG_DTD_MANAGER
-// ------------------------------
-#ifndef ACEXML_DEBUG_DTD_MANAGER_EXPORT_H
-#define ACEXML_DEBUG_DTD_MANAGER_EXPORT_H
-
-#include "ace/config-all.h"
-
-#if defined (ACE_AS_STATIC_LIBS) && !defined (ACEXML_DEBUG_DTD_MANAGER_HAS_DLL)
-# define ACEXML_DEBUG_DTD_MANAGER_HAS_DLL 0
-#endif /* ACE_AS_STATIC_LIBS && ACEXML_DEBUG_DTD_MANAGER_HAS_DLL */
-
-#if !defined (ACEXML_DEBUG_DTD_MANAGER_HAS_DLL)
-# define ACEXML_DEBUG_DTD_MANAGER_HAS_DLL 1
-#endif /* ! ACEXML_DEBUG_DTD_MANAGER_HAS_DLL */
-
-#if defined (ACEXML_DEBUG_DTD_MANAGER_HAS_DLL) && (ACEXML_DEBUG_DTD_MANAGER_HAS_DLL == 1)
-# if defined (ACEXML_DEBUG_DTD_MANAGER_BUILD_DLL)
-# define ACEXML_DEBUG_DTD_MANAGER_Export ACE_Proper_Export_Flag
-# define ACEXML_DEBUG_DTD_MANAGER_SINGLETON_DECLARATION(T) ACE_EXPORT_SINGLETON_DECLARATION (T)
-# define ACEXML_DEBUG_DTD_MANAGER_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_EXPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# else /* ACEXML_DEBUG_DTD_MANAGER_BUILD_DLL */
-# define ACEXML_DEBUG_DTD_MANAGER_Export ACE_Proper_Import_Flag
-# define ACEXML_DEBUG_DTD_MANAGER_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T)
-# define ACEXML_DEBUG_DTD_MANAGER_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK) ACE_IMPORT_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-# endif /* ACEXML_DEBUG_DTD_MANAGER_BUILD_DLL */
-#else /* ACEXML_DEBUG_DTD_MANAGER_HAS_DLL == 1 */
-# define ACEXML_DEBUG_DTD_MANAGER_Export
-# define ACEXML_DEBUG_DTD_MANAGER_SINGLETON_DECLARATION(T)
-# define ACEXML_DEBUG_DTD_MANAGER_SINGLETON_DECLARE(SINGLETON_TYPE, CLASS, LOCK)
-#endif /* ACEXML_DEBUG_DTD_MANAGER_HAS_DLL == 1 */
-
-#endif /* ACEXML_DEBUG_DTD_MANAGER_EXPORT_H */
-
-// End of auto generated file.
diff --git a/ACE/ACEXML/parser/debug_validator/Debug_Element_Builder.cpp b/ACE/ACEXML/parser/debug_validator/Debug_Element_Builder.cpp
deleted file mode 100644
index da422a3429f..00000000000
--- a/ACE/ACEXML/parser/debug_validator/Debug_Element_Builder.cpp
+++ /dev/null
@@ -1,144 +0,0 @@
-// $Id$
-
-#include "ACEXML/common/SAXExceptions.h"
-#include "ACEXML/parser/debug_validator/Debug_Element_Builder.h"
-
-ACEXML_Debug_Element_Builder::ACEXML_Debug_Element_Builder ()
- : type_ (UNDEFINED),
- root_ (0)
-{
-}
-
-ACEXML_Debug_Element_Builder::~ACEXML_Debug_Element_Builder ()
-{
- delete this->root_;
-}
-
-int
-ACEXML_Debug_Element_Builder::setElementName (const ACEXML_Char *,
- const ACEXML_Char *,
- const ACEXML_Char *qName ACEXML_ENV_ARG_DECL_NOT_USED)
-{
- this->element_.set (qName, 0);
- return 0;
-}
-
-int
-ACEXML_Debug_Element_Builder::setContentType (CONTENT_TYPE type ACEXML_ENV_ARG_DECL)
-{
- if (this->type_ == UNDEFINED)
- {
- this->type_ = type;
- return 0;
- }
-
- ACEXML_THROW_RETURN (ACEXML_SAXParseException (ACE_TEXT("Element type redefinition in Debug_Validator.")), -1);
-}
-
-int
-ACEXML_Debug_Element_Builder::insertMixedElement (const ACEXML_Char *,
- const ACEXML_Char *,
- const ACEXML_Char *qName ACEXML_ENV_ARG_DECL_NOT_USED)
-{
- ACEXML_Element_Tree_Name_Node *node;
-
- // @@ We should "throw" an exception here instead of returning -1.
- ACE_NEW_RETURN (node,
- ACEXML_Element_Tree_Name_Node (qName),
- -1);
-
- if (this->root_ == 0)
- // @@ Memory leak if fail?
- ACE_NEW_RETURN (this->root_,
- ACEXML_Element_Tree_List_Node (),
- -1);
-
-
- return this->root_->insert (node);
-}
-
-int
-ACEXML_Debug_Element_Builder::startChildGroup ()
-{
- ACEXML_Element_Tree_List_Node *lnode;
-
- ACE_NEW_RETURN (lnode,
- ACEXML_Element_Tree_List_Node (),
- -1);
-
- if (this->root_ == 0)
- {
- this->root_ = lnode;
- }
- else
- {
- // @@ check error?
- this->root_->insert (lnode);
- }
-
- this->active_list_.push (lnode);
- return 0;
-}
-
-int
-ACEXML_Debug_Element_Builder::endChildGroup (CARDINALITY ACEXML_ENV_ARG_DECL_NOT_USED)
-{
- this->active_list_.pop ();
- return 0;
-}
-
-int
-ACEXML_Debug_Element_Builder::setChoice ()
-{
- this->active_list_.top ()->set (ACEXML_Element_Tree_List_Node::CHOICE);
- return 0;
-}
-
-int
-ACEXML_Debug_Element_Builder::setSequence ()
-{
- this->active_list_.top ()->set (ACEXML_Element_Tree_List_Node::SEQUENCE);
- return 0;
-}
-
-int
-ACEXML_Debug_Element_Builder::insertElement (const ACEXML_Char *,
- const ACEXML_Char *,
- const ACEXML_Char *qName ACEXML_ENV_ARG_DECL_NOT_USED)
-{
- ACEXML_Element_Tree_Name_Node *node;
-
- // @@ We should "throw" an exception here instead of returning -1.
- ACE_NEW_RETURN (node,
- ACEXML_Element_Tree_Name_Node (qName),
- -1);
-
- return this->active_list_.top ()->insert (node);
-}
-
-void
-ACEXML_Debug_Element_Builder::dump ()
-{
- cout << "<!ELEMENT " << this->element_;
-
- // @@ Also dump element contentspec here.
- switch (this->type_)
- {
- case EMPTY:
- cout << "EMPTY";
- break;
- case ANY:
- cout << "ANY";
- break;
- case MIXED:
- case CHILDREN:
- // @@ Dump the content of this->root_
- cout << "*** not implemented ***";
- break;
- default:
- cout << "*** Unidentified element type ***";
- break;
- }
-
- cout << ">" << endl;
-}
diff --git a/ACE/ACEXML/parser/debug_validator/Debug_Element_Builder.h b/ACE/ACEXML/parser/debug_validator/Debug_Element_Builder.h
deleted file mode 100644
index dc1f7765441..00000000000
--- a/ACE/ACEXML/parser/debug_validator/Debug_Element_Builder.h
+++ /dev/null
@@ -1,123 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Debug_Element_Builder.h
- *
- * $Id$
- *
- * @author Nanbor Wang <nanbor@cs.wustl.edu>
- */
-//=============================================================================
-#ifndef _ACEXML_DEBUG_ELEMENT_BUILDER_H_
-#define _ACEXML_DEBUG_ELEMENT_BUILDER_H_
-
-#include /**/ "ace/pre.h"
-#include "ACEXML/parser/debug_validator/Debug_DTD_Manager_Export.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-#pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ACEXML/common/Element_Def_Builder.h"
-#include "ACEXML/parser/debug_validator/Element_Tree.h"
-
-/**
- * @class ACEXML_Debug_Element_Builder Debug_Element_Builder.h "parser/debug_validator/Debug_Element_Builder.h"
- *
- * This class prints out the element definition for debugging purpose.
- *
- * @todo This class is not namespace-aware.
- */
-class ACEXML_DEBUG_DTD_MANAGER_Export ACEXML_Debug_Element_Builder
- : public ACEXML_Element_Def_Builder
-{
-public:
- ACEXML_Debug_Element_Builder ();
-
- virtual ~ACEXML_Debug_Element_Builder ();
-
- /**
- * Define the name of the element.
- *
- * @retval 0 if valid, -1 otherwise.
- */
- virtual int setElementName (const ACEXML_Char *namespaceURI,
- const ACEXML_Char *localName,
- const ACEXML_Char *qName ACEXML_ENV_ARG_DECL)
- ;
-
- /**
- * Define the content type of the element.
- *
- * @retval 0 if valid, -1 otherwise.
- */
- virtual int setContentType (CONTENT_TYPE type ACEXML_ENV_ARG_DECL)
- ;
-
- /**
- * Insert one more element into Mixed definition.
- */
- virtual int insertMixedElement (const ACEXML_Char *namespaceURI,
- const ACEXML_Char *localName,
- const ACEXML_Char *qName ACEXML_ENV_ARG_DECL)
- ;
-
- /**
- * Start a new group of children.
- */
- virtual int startChildGroup ();
-
- /**
- * End a new group of children.
- *
- * @retval 0 on success.
- */
- virtual int endChildGroup (CARDINALITY card ACEXML_ENV_ARG_DECL);
-
- /**
- * Set the type of current child group to Choice.
- *
- * @retval 0 on success, -1 if the type of the child group has
- * already been set and this action conflicts with the previous
- * setting.
- */
- virtual int setChoice ();
-
- /**
- * Set the type of current child group to Sequence.
- *
- * @retval 0 on success, -1 if the type of the child group has
- * already been set and this action conflicts with the previous
- * setting.
- */
- virtual int setSequence ();
-
- /**
- * Insert an new element into the current child group.
- *
- * @retval 0 on success, -1 otherwise.
- */
- virtual int insertElement (const ACEXML_Char *namespaceURI,
- const ACEXML_Char *localName,
- const ACEXML_Char *qName ACEXML_ENV_ARG_DECL)
- ;
-
- /**
- * Dump the content of the attribute definition.
- */
- virtual void dump (void);
-private:
- CONTENT_TYPE type_;
-
- ACEXML_String element_;
-
- ACEXML_Element_Tree_List_Node *root_;
-
- ACEXML_Element_Tree_List_Stack active_list_;
-};
-
-
-#include /**/ "ace/post.h"
-
-#endif /* _ACEXML_DEBUG_ELEMENT_BUILDER_H_ */
diff --git a/ACE/ACEXML/parser/debug_validator/Element_Tree.cpp b/ACE/ACEXML/parser/debug_validator/Element_Tree.cpp
deleted file mode 100644
index e584e22dd62..00000000000
--- a/ACE/ACEXML/parser/debug_validator/Element_Tree.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-// $Id$
-
-#include "ACEXML/parser/debug_validator/Element_Tree.h"
-
-#if !defined (__ACEXML_INLINE__)
-# include "ACEXML/parser/debug_validator/Element_Tree.inl"
-#endif /* __ACEXML_INLINE__ */
-
-ACEXML_Element_Tree_Node::~ACEXML_Element_Tree_Node ()
-{
- delete this->next_;
-}
-
-ACE_ALLOC_HOOK_DEFINE (ACEXML_Element_Tree_Node)
-
-void
-ACEXML_Element_Tree_Name_Node::dump ()
-{
- cout << this->name_;
-}
-
-ACE_ALLOC_HOOK_DEFINE (ACEXML_Element_Tree_Name_Node)
-
-ACEXML_Element_Tree_List_Node::~ACEXML_Element_Tree_List_Node (void)
-{
- delete this->head_;
-}
-
-int
-ACEXML_Element_Tree_List_Node::insert (ACEXML_Element_Tree_Node *node)
-{
- if (this->head_ == 0)
- {
- this->tail_ = this->head_ = node;
- }
- else
- {
- this->tail_->next (node);
- this->tail_ = node;
- }
- return 0;
-}
-
-void
-ACEXML_Element_Tree_List_Node::dump (void)
-{
- ACEXML_Element_Tree_Node *ptr = this->head_;
- const ACEXML_Char *separator = (this->type_ == SEQUENCE) ? ACE_TEXT(" , ") : ACE_TEXT(" | ");
-
- cout << "(";
-
- if (ptr != 0)
- {
- ptr->dump ();
- ptr = ptr->next ();
-
- while (ptr != 0)
- {
- cout << separator;
- ptr->dump ();
- ptr->next ();
- }
- }
-
- cout << ")";
-}
-
-ACE_ALLOC_HOOK_DEFINE (ACEXML_Element_Tree_List_Node)
-
-
-
-ACE_ALLOC_HOOK_DEFINE (ACEXML_Element_Tree_List_Stack)
diff --git a/ACE/ACEXML/parser/debug_validator/Element_Tree.h b/ACE/ACEXML/parser/debug_validator/Element_Tree.h
deleted file mode 100644
index 4738b5de2f4..00000000000
--- a/ACE/ACEXML/parser/debug_validator/Element_Tree.h
+++ /dev/null
@@ -1,160 +0,0 @@
-// -*- C++ -*-
-
-//=============================================================================
-/**
- * @file Element_Tree.h
- *
- * $Id$
- *
- * @author Nanbor Wang <nanbor@cs.wustl.edu>
- */
-//=============================================================================
-#ifndef _ACEXML_ELEMENT_TREE_H_
-#define _ACEXML_ELEMENT_TREE_H_
-
-#include /**/ "ace/pre.h"
-#include "ACEXML/parser/debug_validator/Debug_DTD_Manager_Export.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-#pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-#include "ACEXML/common/XML_Types.h"
-
-/**
- * @class ACEXML_Element_Tree_Node Element_Tree.h "parser/debug_validator/Element_Tree.h"
- *
- * @brief An abstract base class for describing DTD child element definition.
- *
- * @sa ACEXML_Element_Tree_Name_Node, ACEXML_Element_Tree_List_Node
- */
-class ACEXML_DEBUG_DTD_MANAGER_Export ACEXML_Element_Tree_Node
-{
-public:
-
- /// Default constructor.
- ACEXML_Element_Tree_Node ();
-
- /// Destructor
- virtual ~ACEXML_Element_Tree_Node ();
-
- /// Accessor for next element in chain
- ACEXML_Element_Tree_Node *next ();
- void next (ACEXML_Element_Tree_Node *n);
-
- /// Displaying the content.
- virtual void dump () = 0;
-
- ACE_ALLOC_HOOK_DECLARE;
-
-protected:
- ACEXML_Element_Tree_Node *next_;
-};
-
-/**
- * @class ACEXML_Element_Tree_Name_Node Element_Tree.h "parser/debug_validator/Element_Tree.h"
- *
- * @brief An abstract base class for describing a name node in a DTD child
- * element definition.
- *
- * @sa ACEXML_Element_Tree_Node, ACEXML_Element_Tree_List_Node
- */
-class ACEXML_DEBUG_DTD_MANAGER_Export ACEXML_Element_Tree_Name_Node
- : public ACEXML_Element_Tree_Node
-{
-public:
- /// Constructor.
- ACEXML_Element_Tree_Name_Node (const ACEXML_Char *name,
- int release = 1);
-
- /// Change the name of this node.
- void set (const ACEXML_Char *name,
- int release = 1);
-
- virtual void dump ();
-
- ACE_ALLOC_HOOK_DECLARE;
-protected:
- ACEXML_String name_;
-};
-
-class ACEXML_Element_Tree_List_Stack;
-
-/**
- * @class ACEXML_Element_Tree_List_Node Element_Tree.h "parser/debug_validator/Element_Tree.h"
- *
- * @brief An abstract base class for describing a node list in a DTD child
- * element definition.
- *
- * @sa ACEXML_Element_Tree_Node, ACEXML_Element_Tree_Name_Node
- */
-class ACEXML_DEBUG_DTD_MANAGER_Export ACEXML_Element_Tree_List_Node
- : public ACEXML_Element_Tree_Node
-{
-public:
- friend class ACEXML_Element_Tree_List_Stack;
-
- typedef enum {
- SEQUENCE,
- CHOICE
- } LIST_TYPE;
-
- /// Default constructor.
- ACEXML_Element_Tree_List_Node (void);
-
- /// Destructor.
- virtual ~ACEXML_Element_Tree_List_Node (void);
-
- /// Insert a new ACEXML_Element_Tree_Node into the list.
- int insert (ACEXML_Element_Tree_Node *node);
-
- /// Get/set the type of list.
- LIST_TYPE get (void);
- int set (LIST_TYPE type);
-
- virtual void dump ();
-
- ACE_ALLOC_HOOK_DECLARE;
-protected:
- LIST_TYPE type_;
-
- ACEXML_Element_Tree_Node *head_;
-
- ACEXML_Element_Tree_Node *tail_;
-
- ACEXML_Element_Tree_List_Node *pop_next_;
-};
-
-/**
- * @class ACEXML_Element_Tree_List_Stack Element_Tree.h "parser/debug_validator/Element_Tree.h"
- *
- * @brief A class for managing a stack of ACEXML_Element_Tree_List_Node's.
- *
- * @sa ACEXML_Element_Tree_List_Node
- */
-class ACEXML_DEBUG_DTD_MANAGER_Export ACEXML_Element_Tree_List_Stack
-{
-public:
- ACEXML_Element_Tree_List_Stack ();
-
- void push (ACEXML_Element_Tree_List_Node *n);
-
- ACEXML_Element_Tree_List_Node *pop (void);
-
- ACEXML_Element_Tree_List_Node *top (void);
-
- int empty (void);
-
- ACE_ALLOC_HOOK_DECLARE;
-
-protected:
- ACEXML_Element_Tree_List_Node *top_;
-};
-
-#if defined (__ACEXML_INLINE__)
-# include "ACEXML/parser/debug_validator/Element_Tree.inl"
-#endif /* __ACEXML_INLINE__ */
-
-#include /**/ "ace/post.h"
-
-#endif /* _ACEXML_ELEMENT_TREE_H_ */
diff --git a/ACE/ACEXML/parser/debug_validator/Element_Tree.inl b/ACE/ACEXML/parser/debug_validator/Element_Tree.inl
deleted file mode 100644
index 4b408835403..00000000000
--- a/ACE/ACEXML/parser/debug_validator/Element_Tree.inl
+++ /dev/null
@@ -1,92 +0,0 @@
-// $Id$
-
-ACEXML_INLINE
-ACEXML_Element_Tree_Node::ACEXML_Element_Tree_Node ()
- : next_ (0)
-{
-}
-
-ACEXML_INLINE ACEXML_Element_Tree_Node *
-ACEXML_Element_Tree_Node::next ()
-{
- return this->next_;
-}
-
-ACEXML_INLINE void
-ACEXML_Element_Tree_Node::next (ACEXML_Element_Tree_Node * n)
-{
- this->next_ = n;
-}
-
-ACEXML_INLINE
-ACEXML_Element_Tree_Name_Node::ACEXML_Element_Tree_Name_Node (const ACEXML_Char *name,
- int release)
- : name_ (name, 0, release)
-{
-}
-
-ACEXML_INLINE void
-ACEXML_Element_Tree_Name_Node::set (const ACEXML_Char *name,
- int release)
-{
- this->name_.set (name, release);
-}
-
-ACEXML_INLINE
-ACEXML_Element_Tree_List_Node::ACEXML_Element_Tree_List_Node (void)
- : type_ (SEQUENCE),
- head_ (0),
- tail_ (0),
- pop_next_ (0)
-{
-}
-
-ACEXML_INLINE ACEXML_Element_Tree_List_Node::LIST_TYPE
-ACEXML_Element_Tree_List_Node::get (void)
-{
- return this->type_;
-}
-
-ACEXML_INLINE int
-ACEXML_Element_Tree_List_Node::set (ACEXML_Element_Tree_List_Node::LIST_TYPE type)
-{
- this->type_ = type;
- return 0;
-}
-
-ACEXML_INLINE
-ACEXML_Element_Tree_List_Stack::ACEXML_Element_Tree_List_Stack (void)
- : top_ (0)
-{
-}
-
-ACEXML_INLINE ACEXML_Element_Tree_List_Node *
-ACEXML_Element_Tree_List_Stack::top ()
-{
- return this->top_;
-}
-
-ACEXML_INLINE void
-ACEXML_Element_Tree_List_Stack::push (ACEXML_Element_Tree_List_Node *n)
-{
- n->pop_next_ = this->top_;
- this->top_ = n;
-}
-
-ACEXML_INLINE ACEXML_Element_Tree_List_Node *
-ACEXML_Element_Tree_List_Stack::pop ()
-{
- if (this->top_ != 0)
- {
- ACEXML_Element_Tree_List_Node *ptr = this->top_;
- this->top_ = this->top_->pop_next_;
- return ptr;
- }
- return 0;
-}
-
-ACEXML_INLINE int
-ACEXML_Element_Tree_List_Stack::empty ()
-{
- return this->top_ == 0;
-}