You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by li...@apache.org on 2002/10/23 10:21:42 UTC
cvs commit: xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/dom ChildNode.hpp DOM.hpp DOMString.hpp DOM_Attr.hpp DOM_CDATASection.hpp DOM_CharacterData.hpp DOM_Comment.hpp DOM_DOMException.hpp DOM_DOMImplementation.hpp DOM_Document.hpp DOM_DocumentFragment.hpp DOM_DocumentType.hpp DOM_Element.hpp DOM_Entity.hpp DOM_EntityReference.hpp DOM_NamedNodeMap.hpp DOM_Node.hpp DOM_NodeFilter.hpp DOM_NodeIterator.hpp DOM_NodeList.hpp DOM_Notation.hpp DOM_ProcessingInstruction.hpp DOM_Range.hpp DOM_RangeException.hpp DOM_Text.hpp DOM_TreeWalker.hpp DOM_XMLDecl.hpp DomMemDebug.hpp MemDebug.hpp NameNodeFilter.hpp NodeIDMap.hpp NodeVector.hpp ParentNode.hpp
lilantha 2002/10/23 01:21:42
Added: contrib/Axis-C++/xerces-c/include/xercesc/dom ChildNode.hpp
DOM.hpp DOMString.hpp DOM_Attr.hpp
DOM_CDATASection.hpp DOM_CharacterData.hpp
DOM_Comment.hpp DOM_DOMException.hpp
DOM_DOMImplementation.hpp DOM_Document.hpp
DOM_DocumentFragment.hpp DOM_DocumentType.hpp
DOM_Element.hpp DOM_Entity.hpp
DOM_EntityReference.hpp DOM_NamedNodeMap.hpp
DOM_Node.hpp DOM_NodeFilter.hpp
DOM_NodeIterator.hpp DOM_NodeList.hpp
DOM_Notation.hpp DOM_ProcessingInstruction.hpp
DOM_Range.hpp DOM_RangeException.hpp DOM_Text.hpp
DOM_TreeWalker.hpp DOM_XMLDecl.hpp DomMemDebug.hpp
MemDebug.hpp NameNodeFilter.hpp NodeIDMap.hpp
NodeVector.hpp ParentNode.hpp
Log:
no message
Revision Changes Path
1.1 xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/dom/ChildNode.hpp
Index: ChildNode.hpp
===================================================================
#ifndef ChildNode_HEADER_GUARD_
#define ChildNode_HEADER_GUARD_
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache\@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation, and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com . For more information
* on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
/*
* $Id: ChildNode.hpp,v 1.1 2002/10/23 08:21:41 lilantha Exp $
*/
//
// This file is part of the internal implementation of the C++ XML DOM.
// It should NOT be included or used directly by application programs.
//
// Applications should include the file <dom/DOM.hpp> for the entire
// DOM API, or DOM_*.hpp for individual DOM classes, where the class
// name is substituded for the *.
//
/**
* ChildNode adds to NodeImpl the capability of being a child, this is having
* siblings.
**/
#include "NodeImpl.hpp"
class CDOM_EXPORT ChildNode: public NodeImpl {
public:
ChildNode *previousSibling;
ChildNode *nextSibling;
public:
ChildNode(DocumentImpl *ownerDocument);
ChildNode(const ChildNode &other);
virtual ~ChildNode();
virtual NodeImpl * getNextSibling();
virtual NodeImpl * getParentNode();
virtual NodeImpl* getPreviousSibling();
};
#endif
1.1 xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/dom/DOM.hpp
Index: DOM.hpp
===================================================================
#ifndef DOM_HEADER_GUARD_
#define DOM_HEADER_GUARD_
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2000 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache\@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation, and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com . For more information
* on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
/*
* $Log: DOM.hpp,v $
* Revision 1.1 2002/10/23 08:21:41 lilantha
* no message
*
* Revision 1.1.1.1 2002/02/01 22:21:43 peiyongz
* sane_include
*
* Revision 1.4 2000/04/25 20:29:32 aruna1
* DOM_XMLDecl type node introduced to get the information of the
* XML Declaration in a document and store it part of the tree
*
* Revision 1.3 2000/02/24 20:11:26 abagchi
* Swat for removing Log from API docs
*
* Revision 1.2 2000/02/06 07:47:27 rahulj
* Year 2K copyright swat.
*
* Revision 1.1.1.1 1999/11/09 01:08:46 twl
* Initial checkin
*
* Revision 1.2 1999/11/08 20:44:12 rahul
* Swat for adding in Product name and CVS comment log variable.
*
*/
//
// This is the primary header file for inclusion in application
// programs using the C++ XML Document Object Model API.
//
#include <xercesc/dom/DOM_Attr.hpp>
#include <xercesc/dom/DOM_CDATASection.hpp>
#include <xercesc/dom/DOM_CharacterData.hpp>
#include <xercesc/dom/DOM_Comment.hpp>
#include <xercesc/dom/DOM_Document.hpp>
#include <xercesc/dom/DOM_DocumentFragment.hpp>
#include <xercesc/dom/DOM_DocumentType.hpp>
#include <xercesc/dom/DOM_DOMException.hpp>
#include <xercesc/dom/DOM_DOMImplementation.hpp>
#include <xercesc/dom/DOM_Element.hpp>
#include <xercesc/dom/DOM_Entity.hpp>
#include <xercesc/dom/DOM_EntityReference.hpp>
#include <xercesc/dom/DOM_NamedNodeMap.hpp>
#include <xercesc/dom/DOM_Node.hpp>
#include <xercesc/dom/DOM_NodeList.hpp>
#include <xercesc/dom/DOM_Notation.hpp>
#include <xercesc/dom/DOM_ProcessingInstruction.hpp>
#include <xercesc/dom/DOM_Text.hpp>
#include <xercesc/dom/DOMString.hpp>
#include <xercesc/dom/DOM_XMLDecl.hpp>
#endif
1.1 xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/dom/DOMString.hpp
Index: DOMString.hpp
===================================================================
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2000 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache\@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation, and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com . For more information
* on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
/*
* $Log: DOMString.hpp,v $
* Revision 1.1 2002/10/23 08:21:41 lilantha
* no message
*
* Revision 1.2 2002/02/20 18:17:00 tng
* [Bug 5977] Warnings on generating apiDocs.
*
* Revision 1.1.1.1 2002/02/01 22:21:44 peiyongz
* sane_include
*
* Revision 1.12 2000/06/02 00:45:42 andyh
* DOM Fixes: DOMString::rawBuffer() now returns a const XMLCh * pointer.
* Two plain deletes changed to array deletes.
*
* Revision 1.11 2000/03/02 19:53:52 roddey
* This checkin includes many changes done while waiting for the
* 1.1.0 code to be finished. I can't list them all here, but a list is
* available elsewhere.
*
* Revision 1.10 2000/02/24 20:11:27 abagchi
* Swat for removing Log from API docs
*
* Revision 1.9 2000/02/16 22:54:56 abagchi
* Switched the order of CDOM_EXPORT DomString for operators, to make OS/390 happy
*
* Revision 1.8 2000/02/06 07:47:27 rahulj
* Year 2K copyright swat.
*
* Revision 1.7 2000/02/04 05:06:30 andyh
* Change all DOMString offsets and lengths form signed to unsigned
* Other misc. cleanups.
*
* Revision 1.6 2000/02/04 00:52:58 rahulj
* Changed size_t to int.
*
* Revision 1.5 2000/02/03 23:07:27 andyh
* Add several new functions from Robert Weir to DOMString.
*
* Revision 1.4 2000/01/05 22:16:26 robweir
* Move DOMString implementation class declarations into a new
* file: DOMStringImpl.hpp. Include this header in DOMString.hpp
* for XML_DEBUG builds so the underlying character array will be
* visible in the debugger. <ro...@lotus.com>
*
* Revision 1.3 1999/12/03 00:11:22 andyh
* Added DOMString.clone() to node parameters in and out of the DOM,
* where they had been missed.
*
* DOMString::rawBuffer, removed incorrect assumptions about it
* being null terminated.
*
* Revision 1.2 1999/11/30 21:16:25 roddey
* Changes to add the transcode() method to DOMString, which returns a transcoded
* version (to local code page) of the DOM string contents. And I changed all of the
* exception 'throw by pointer' to 'throw by value' style.
*
* Revision 1.1.1.1 1999/11/09 01:08:48 twl
* Initial checkin
*
* Revision 1.2 1999/11/08 20:44:12 rahul
* Swat for adding in Product name and CVS comment log variable.
*
*/
#ifndef DOMString_HEADER_GUARD_
#define DOMString_HEADER_GUARD_
#include <xercesc/util/XercesDefs.hpp>
#ifdef XML_DEBUG
#include "DOMStringImpl.hpp"
#else
class DOMStringHandle;
#endif
class DOM_NullPtr;
/**
* <code>DOMString</code> is the generic string class that stores all strings
* used in the DOM C++ API.
*
* Though this class supports most of the common string operations to manipulate
* strings, it is not meant to be a comphrehensive string class.
*/
class CDOM_EXPORT DOMString {
public:
/** @name Constructors and assignment operator */
//@{
/**
* Default constructor for DOMString. The resulting DOMString
* object refers to no string at all; it will compare == 0.
*
*/
DOMString();
/**
* Copy constructor.
*
* @param other The object to be copied.
*/
DOMString(const DOMString &other);
/**
* Constructor to build a DOMString from an XML character array.
* (XMLCh is a 16 bit UNICODE character).
*
* @param other The null-terminated character array to be
* that provides the initial value for the DOMString.
*/
DOMString(const XMLCh *other);
/**
* Constructor to build a DOMString from a character array of given length.
*
* @param other The character array to be imported into the <code>DOMString</code>
* @param length The length of the character array to be imported
*/
DOMString(const XMLCh *other, unsigned int length);
/**
* Constructor to build a DOMString from an 8 bit character array.
* The char * string will be transcoded to UNICODE using the default
* code page on the system where the code is running.
*
* @param other The character array to be imported into the <code>DOMString</code>
*/
DOMString(const char *other);
/**
* Construct a null DOMString.
*/
DOMString(int nullPointerValue);
/**
* Assignment operator. Make destination DOMString refer to the same
* underlying string in memory as the source string.
*
* @param other the source DOMString.
*/
DOMString & operator = (const DOMString &other);
DOMString & operator = (DOM_NullPtr *other);
//@}
/** @name Destructor. */
//@{
/**
* Destructor for DOMString
*
*/
~DOMString();
//@}
/** @name Operators for string manipulation. */
//@{
/**
* Concatenate a DOMString to another.
*
* @param other The string to be concatenated.
* @return The concatenated object
*/
// DOMString operator + (const DOMString &other);
//@}
/** @name Equality and Inequality operators. */
//@{
/**
* Equality operator.
*
* @param other The object to be compared with.
* @return True if the two DOMStrings refer to the same underlying string
* in memory.
* <p>
* WARNING: operator == does NOT compare the contents of
* the two strings. To do this, use the <code>DOMString::equals()</code>
* This behavior is modelled after the String operations in Java, and
* is also similar to operator == on the other DOM_* classes.
*/
bool operator == (const DOMString &other) const;
/**
* Inequality operator.
*
* @param other The object to be compared with.
* @return True if the two DOMStrings refer to different underlying strings in
* memory.
* <p>
* WARNING: operator == does NOT compare the contents of
* the two strings. To do this, use the <code>DOMString::equals()</code>
* This behavior is modelled after the String operations in Java, and
* is also similar to operator == on the other DOM_* classes.
*/
bool operator != (const DOMString &other) const;
/**
* Equality operator. Test for a null DOMString, which is one that does
* not refer to any string at all; similar to a null object reference
* variable in Java.
*
* @param other must be 0 or null.
* @return
*/
bool operator == (const DOM_NullPtr *other) const;
/**
* Inequality operator, for null test.
*
* @param other must be 0 or null.
* @return True if the two strings are different, false otherwise
*/
bool operator != (const DOM_NullPtr *other) const;
//@}
/** @name Functions to change the string. */
//@{
/**
* Preallocate storage in the string to hold a given number of characters.
* A DOMString will grow its buffer on demand, as characters are added,
* but it can be more efficient to allocate once in advance, if the size is known.
*
* @param size The number of 16 bit characters to reserve.
*/
void reserve(unsigned int size);
/**
* Appends the content of another <code>DOMString</code> to this string.
*
* @param other The object to be appended
*/
void appendData(const DOMString &other);
/**
* Append a single Unicode character to this string.
*
* @param ch The single character to be appended
*/
void appendData(XMLCh ch);
/**
* Append a null-terminated XMLCh * (Unicode) string to this string.
*
* @param other The object to be appended
*/
void appendData(const XMLCh *other);
/**
* Appends the content of another <code>DOMString</code> to this string.
*
* @param other The object to be appended
*/
DOMString& operator +=(const DOMString &other);
/**
* Appends the content of a c-style string to this string.
*
* @param other The string to be appended
*/
DOMString& operator +=(const XMLCh* other);
/**
* Appends a character to this string.
*
* @param ch The character to be appended
*/
DOMString& operator +=(XMLCh ch);
/**
* Clears the data of this <code>DOMString</code>.
*
* @param offset The position from the beginning from which the data must be deleted
* @param count The count of characters from the offset that must be deleted
*/
void deleteData(unsigned int offset, unsigned int count);
/**
* Inserts a string within the existing <code>DOMString</code> at an arbitrary position.
*
* @param offset The offset from the beginning at which the insertion needs to be done
* in <code>this</code> object
* @param data The <code>DOMString</code> containing the data that needs to be inserted
* @return The object to be returned.
*/
void insertData(unsigned int offset, const DOMString &data);
//@}
/** @name Functions to get properties of the string. */
//@{
/**
* Returns the character at the specified position.
*
* @param index The position at which the character is being requested
* @return Returns the character at the specified position.
*/
XMLCh charAt(unsigned int index) const;
/**
* Returns a handle to the raw buffer in the <code>DOMString</code>.
*
* @return The pointer inside the <code>DOMString</code> containg the string data.
* Note: the data is not always null terminated. Do not rely on
* a null being there, and do not add one, as several DOMStrings
* with different lengths may share the same raw buffer.
*/
const XMLCh *rawBuffer() const;
/**
* Returns a copy of the string, transcoded to the local code page. The
* caller owns the (char *) string that is returned, and is responsible
* for deleting it.
*
* @return A pointer to a newly allocated buffer of char elements, which
* represents the original string, but in the local encoding.
*/
char *transcode() const;
/**
* Creates a DOMString, transcoded from an input 8 bit char * string
* in the local code page.
*
* @param str The string to be transcoded
* @return A new DOMString object
*/
static DOMString transcode(const char* str);
/**
* Returns a sub-string of the <code>DOMString</code> starting at a specified position.
*
* @param offset The offset from the beginning from which the sub-string is being requested.
* @param count The count of characters in the requested sub-string
* @return The sub-string of the <code>DOMString</code> being requested
*/
DOMString substringData(unsigned int offset, unsigned int count) const;
/**
* Returns the length of the DOMString.
*
* @return The length of the string
*/
unsigned int length() const;
//@}
/** @name Cloning function. */
//@{
/**
* Makes a clone of a the DOMString.
*
* @return The object to be cloned.
*/
DOMString clone() const;
//@}
/** @name Print functions. */
//@{
/**
* Dumps the <code>DOMString</code> on the console.
*
*/
void print() const;
/**
* Dumps the <code>DOMString</code> on the console with a line feed at the end.
*
*/
void println() const;
//@}
/** @name Functions to compare a string with another. */
//@{
/**
* Compares a DOMString with another.
*
* This compareString does not match the semantics of the standard C strcmp.
* All it needs to do is define some less than - equals - greater than
* ordering of strings. How doesn't matter.
*
*
* @param other The object to be compared with
* @return Either -1, 0, or 1 based on the comparison.
*/
int compareString(const DOMString &other) const;
/**
* Tells if a <code>DOMString</code> contains the same character data
* as another.
*
* @param other The DOMString to be compared with.
* @return True if the two <code>DOMString</code>s are same, false otherwise.
*/
bool equals(const DOMString &other) const;
/**
* Compare a DOMString with a null-terminated raw 16-bit character
* string.
*
* @param other The character string to be compared with.
* @return True if the strings are the same, false otherwise.
*/
bool equals(const XMLCh *other) const;
//@}
friend class DOMStringData;
friend class DOMStringHandle;
friend class DomMemDebug;
private:
DOMStringHandle *fHandle;
static int gLiveStringHandleCount;
static int gTotalStringHandleCount;
static int gLiveStringDataCount;
static int gTotalStringDataCount;
};
/****** Global Helper Functions ******/
/**
* Concatenate two DOMString's.
*
* @param lhs the first string
* @param rhs the second string
* @return The concatenated object
*/
DOMString CDOM_EXPORT operator + (const DOMString &lhs, const DOMString &rhs);
/**
* Concatenate a null terminated Unicode string to a DOMString.
*
* @param lhs the DOMString
* @param rhs the XMLCh * string
* @return The concatenated object
*/
DOMString CDOM_EXPORT operator + (const DOMString &lhs, const XMLCh* rhs);
/**
* Concatenate a DOMString to a null terminated Unicode string
*
* @param lhs the null-terminated Unicode string
* @param rhs the DOMString
* @return The concatenated object
*/
DOMString CDOM_EXPORT operator + (const XMLCh* lhs, const DOMString &rhs);
/**
* Concatenate a single Unicode character to a DOMString.
*
* @param lhs the DOMString
* @param rhs the character
* @return The concatenated object
*/
DOMString CDOM_EXPORT operator + (const DOMString &lhs, XMLCh rhs);
/**
* Concatenate a DOMString to a single Unicode character.
*
* @param lhs the character
* @param rhs the DOMString
* @return The concatenated object
*/
DOMString CDOM_EXPORT operator + (XMLCh lhs, const DOMString &rhs);
#endif
1.1 xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/dom/DOM_Attr.hpp
Index: DOM_Attr.hpp
===================================================================
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache\@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation, and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com . For more information
* on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
/*
* $Log: DOM_Attr.hpp,v $
* Revision 1.1 2002/10/23 08:21:41 lilantha
* no message
*
* Revision 1.3 2002/02/20 18:17:00 tng
* [Bug 5977] Warnings on generating apiDocs.
*
* Revision 1.2 2002/02/04 19:57:15 tng
* Remove the phrase "Experimental".
*
* Revision 1.1.1.1 2002/02/01 22:21:44 peiyongz
* sane_include
*
* Revision 1.7 2000/03/11 02:58:38 chchou
* Fix bug # 18, remove set method of readonly attributes
*
* Revision 1.6 2000/03/02 19:53:52 roddey
* This checkin includes many changes done while waiting for the
* 1.1.0 code to be finished. I can't list them all here, but a list is
* available elsewhere.
*
* Revision 1.5 2000/02/24 20:11:27 abagchi
* Swat for removing Log from API docs
*
* Revision 1.4 2000/02/17 17:47:24 andyh
* Update Doc++ API comments
* NameSpace update to track W3C
* Changes were made by Chih Hsiang Chou
*
* Revision 1.3 2000/02/06 07:47:27 rahulj
* Year 2K copyright swat.
*
* Revision 1.2 2000/01/05 01:16:06 andyh
* DOM Level 2 core, namespace support added.
*
* Revision 1.1.1.1 1999/11/09 01:08:48 twl
* Initial checkin
*
* Revision 1.3 1999/11/08 20:44:13 rahul
* Swat for adding in Product name and CVS comment log variable.
*
*/
#ifndef DOM_Attr_HEADER_GUARD_
#define DOM_Attr_HEADER_GUARD_
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOM_Node.hpp>
#include <xercesc/dom/DOM_Element.hpp>
class AttrImpl;
/**
* The <code>DOM_Attr</code> class refers to an attribute of an XML element.
*
* Typically the allowable values for the
* attribute are defined in a documenttype definition.
* <p><code>DOM_Attr</code> objects inherit the <code>DOM_Node</code> interface, but
* since attributes are not actually child nodes of the elements they are associated with, the
* DOM does not consider them part of the document tree. Thus, the
* <code>DOM_Node</code> attributes <code>parentNode</code>,
* <code>previousSibling</code>, and <code>nextSibling</code> have a null
* value for <code>DOM_Attr</code> objects. The DOM takes the view that
* attributes are properties of elements rather than having a separate
* identity from the elements they are associated with; this should make it
* more efficient to implement such features as default attributes associated
* with all elements of a given type. Furthermore, attribute nodes
* may not be immediate children of a <code>DocumentFragment</code>. However,
* they can be associated with <code>Element</code> nodes contained within a
* <code>DocumentFragment</code>. In short, users of the DOM
* need to be aware that <code>Attr</code> nodes have some things in common
* with other objects inheriting the <code>Node</code> interface, but they
* also are quite distinct.
*
*/
class CDOM_EXPORT DOM_Attr: public DOM_Node {
public:
/** @name Constructors and assignment operators */
//@{
/**
* Default constructor for DOM_Attr. The resulting object does not
* refer to any Attribute; it will compare == to 0, and is similar
* to a null object reference variable in Java.
*
*/
DOM_Attr();
public:
/**
* Copy constructor. Creates a new <code>DOM_Attr</code> that refers to the
* same underlying Attribute as the original. See also DOM_Node::clone(),
* which will copy an actual attribute, rather than just creating a new
* reference to the original attribute.
*
* @param other The source attribute reference object
*/
DOM_Attr(const DOM_Attr &other);
/**
* Assignment operator
*
* @param other The source attribute object
*/
DOM_Attr & operator = (const DOM_Attr &other);
/**
* Assignment operator. This overloaded variant is provided for
* the sole purpose of setting a DOM_Node reference variable to
* zero. Nulling out a reference variable in this way will decrement
* the reference count on the underlying Node object that the variable
* formerly referenced. This effect is normally obtained when reference
* variable goes out of scope, but zeroing them can be useful for
* global instances, or for local instances that will remain in scope
* for an extended time, when the storage belonging to the underlying
* node needs to be reclaimed.
*
* @param val Only a value of 0, or null, is allowed.
*/
DOM_Attr & operator = (const DOM_NullPtr *val);
//@}
/** @name Destructor */
//@{
/**
* Destructor. The object being destroyed is a reference to the Attribute
* "node", not the underlying attribute itself.
*
*/
~DOM_Attr();
//@}
/** @name Getter functions */
//@{
/**
* Returns the name of this attribute.
*/
DOMString getName() const;
/**
*
* Returns true if the attribute received its value explicitly in the
* XML document, or if a value was assigned programatically with
* the setValue function. Returns false if the attribute value
* came from the default value declared in the document's DTD.
*/
bool getSpecified() const;
/**
* Returns the value of the attribute.
*
* The value of the attribute is returned as a string.
* Character and general entity references are replaced with their values.
*/
DOMString getValue() const;
//@}
/** @name Setter functions */
//@{
/**
* Sets the value of the attribute. A text node with the unparsed contents
* of the string will be created.
*
* @param value The value of the DOM attribute to be set
*/
void setValue(const DOMString &value);
//@}
/** @name Functions introduced in DOM Level 2. */
//@{
/**
* The <code>DOM_Element</code> node this attribute is attached to or
* <code>null</code> if this attribute is not in use.
*
*/
DOM_Element getOwnerElement() const;
//@}
protected:
DOM_Attr(AttrImpl *attr);
friend class DOM_Element;
friend class DOM_Document;
};
#endif
1.1 xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/dom/DOM_CDATASection.hpp
Index: DOM_CDATASection.hpp
===================================================================
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2000 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache\@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation, and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com . For more information
* on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
/*
* $Log: DOM_CDATASection.hpp,v $
* Revision 1.1 2002/10/23 08:21:41 lilantha
* no message
*
* Revision 1.2 2002/02/20 18:17:00 tng
* [Bug 5977] Warnings on generating apiDocs.
*
* Revision 1.1.1.1 2002/02/01 22:21:44 peiyongz
* sane_include
*
* Revision 1.5 2000/03/02 19:53:52 roddey
* This checkin includes many changes done while waiting for the
* 1.1.0 code to be finished. I can't list them all here, but a list is
* available elsewhere.
*
* Revision 1.4 2000/02/24 20:11:27 abagchi
* Swat for removing Log from API docs
*
* Revision 1.3 2000/02/06 07:47:28 rahulj
* Year 2K copyright swat.
*
* Revision 1.2 2000/01/05 01:16:06 andyh
* DOM Level 2 core, namespace support added.
*
* Revision 1.1.1.1 1999/11/09 01:08:49 twl
* Initial checkin
*
* Revision 1.2 1999/11/08 20:44:13 rahul
* Swat for adding in Product name and CVS comment log variable.
*
*/
#ifndef DOM_CDataSection_HEADER_GUARD_
#define DOM_CDataSection_HEADER_GUARD_
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOM_Text.hpp>
class CDATASectionImpl;
/**
* <code>DOM_CDataSection</code> objects refer to the data from an
* XML CDATA section. These are used to escape blocks of text containing characters
* that would otherwise be regarded as markup.
*
* <p>Note that the string data associated with the CDATA section may
* contain characters that need to be escaped when appearing in an
* XML document outside of a CDATA section.
* <p> The <code>DOM_CDATASection</code> class inherits from the
* <code>DOM_CharacterData</code> class through the <code>Text</code>
* interface. Adjacent CDATASection nodes are not merged by use
* of the Element.normalize() method.
*/
class CDOM_EXPORT DOM_CDATASection: public DOM_Text {
public:
/** @name Constructors and assignment operators */
//@{
/**
* Default constructor for DOM_CDATASection. The resulting object does not
* refer to any actual CData section; it will compare == to 0, and is similar
* to a null object reference variable in Java.
*
*/
DOM_CDATASection();
/**
* Copy constructor. Creates a new <code>DOM_CDataSection</code> that refers to the
* same underlying data as the original. See also <code>DOM_Node::clone()</code>,
* which will copy the underlying data, rather than just creating a new
* reference to the original object.
*
* @param other The source <code>DOM_CDATASection</code> object
*/
DOM_CDATASection(const DOM_CDATASection &other);
/**
* Assignment operator.
*
* @param other The object to be copied.
*/
DOM_CDATASection & operator = (const DOM_CDATASection &other);
/**
* Assignment operator. This overloaded variant is provided for
* the sole purpose of setting a DOM_Node reference variable to
* zero. Nulling out a reference variable in this way will decrement
* the reference count on the underlying Node object that the variable
* formerly referenced. This effect is normally obtained when reference
* variable goes out of scope, but zeroing them can be useful for
* global instances, or for local instances that will remain in scope
* for an extended time, when the storage belonging to the underlying
* node needs to be reclaimed.
*
* @param val Only a value of 0, or null, is allowed.
*/
DOM_CDATASection & operator = (const DOM_NullPtr *val);
//@}
/** @name Destructor. */
//@{
/**
* Destructor for DOM_CDATASection.
*
*/
~DOM_CDATASection();
//@}
protected:
DOM_CDATASection(CDATASectionImpl *);
friend class DOM_Document;
};
#endif
1.1 xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/dom/DOM_CharacterData.hpp
Index: DOM_CharacterData.hpp
===================================================================
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2000 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache\@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation, and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com . For more information
* on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
/*
* $Log: DOM_CharacterData.hpp,v $
* Revision 1.1 2002/10/23 08:21:41 lilantha
* no message
*
* Revision 1.2 2002/02/20 18:17:00 tng
* [Bug 5977] Warnings on generating apiDocs.
*
* Revision 1.1.1.1 2002/02/01 22:21:44 peiyongz
* sane_include
*
* Revision 1.6 2000/03/02 19:53:53 roddey
* This checkin includes many changes done while waiting for the
* 1.1.0 code to be finished. I can't list them all here, but a list is
* available elsewhere.
*
* Revision 1.5 2000/02/24 20:11:27 abagchi
* Swat for removing Log from API docs
*
* Revision 1.4 2000/02/15 23:17:36 andyh
* Update Doc++ API comments
* NameSpace bugfix and update to track W3C
* Chih Hsiang Chou
*
* Revision 1.3 2000/02/06 07:47:28 rahulj
* Year 2K copyright swat.
*
* Revision 1.2 2000/02/04 01:49:29 aruna1
* TreeWalker and NodeIterator changes
*
* Revision 1.1.1.1 1999/11/09 01:08:49 twl
* Initial checkin
*
* Revision 1.2 1999/11/08 20:44:13 rahul
* Swat for adding in Product name and CVS comment log variable.
*
*/
#ifndef DOM_CharacterData_HEADER_GUARD_
#define DOM_CharacterData_HEADER_GUARD_
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOM_Node.hpp>
class CharacterDataImpl;
/**
* The <code>DOM_CharacterData</code> interface extends Node with a set of
* methods for accessing character data in the DOM.
*
* For clarity this set is defined here rather than on each class that uses
* these methods. No DOM objects correspond directly to
* <code>CharacterData</code>, though <code>Text</code> and others do inherit
* the interface from it. All <code>offset</code>s in this interface start
* from 0, and index in terms of Unicode 16 bit storage units.
*/
class CDOM_EXPORT DOM_CharacterData: public DOM_Node {
private:
public:
/** @name Constructors and assignment operator */
//@{
/**
* Default constructor for DOM_CharacterData. While there can be
* no actual DOM nodes of type CharacterData, the C++ objects
* function more like reference variables, and instances of
* <code>DOM_CharacterData</code> can exist. They will be null when created
* by this constructor, and can then be assigned to refer to Text
* or CDATASection nodes.
*/
DOM_CharacterData();
/**
* Copy constructor
*
* @param other The object to be copied
*/
DOM_CharacterData(const DOM_CharacterData &other);
/**
* Assignment operator
*
* @param other The object to be copied
*/
DOM_CharacterData & operator = (const DOM_CharacterData &other);
/**
* Assignment operator. This overloaded variant is provided for
* the sole purpose of setting a DOM_Node reference variable to
* zero. Nulling out a reference variable in this way will decrement
* the reference count on the underlying Node object that the variable
* formerly referenced. This effect is normally obtained when reference
* variable goes out of scope, but zeroing them can be useful for
* global instances, or for local instances that will remain in scope
* for an extended time, when the storage belonging to the underlying
* node needs to be reclaimed.
*
* @param val Only a value of 0, or null, is allowed.
*/
DOM_CharacterData & operator = (const DOM_NullPtr *val);
//@}
/** @name Destructor. */
//@{
/**
* Destructor for DOM_CharacterData. The object being destroyed
* is the reference to the Character Data node, not the character
* data itself.
*/
~DOM_CharacterData();
//@}
/** @name Getter functions. */
//@{
/**
* Returns the character data of the node that implements this interface.
*
* The DOM implementation may not put arbitrary limits on the amount of data that
* may be stored in a <code>CharacterData</code> node. However,
* implementation limits may mean that the entirety of a node's data may
* not fit into a single <code>DOMString</code>. In such cases, the user
* may call <code>substringData</code> to retrieve the data in
* appropriately sized pieces.
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
* @exception DOMException
* DOMSTRING_SIZE_ERR: Raised when it would return more characters than
* fit in a <code>DOMString</code> variable on the implementation
* platform.
*/
DOMString getData() const;
/**
* Returns the number of characters that are available through <code>data</code> and
* the <code>substringData</code> method below.
*
* This may have the value
* zero, i.e., <code>CharacterData</code> nodes may be empty.
*/
unsigned int getLength() const;
/**
* Extracts a range of data from the node.
*
* @param offset Start offset of substring to extract.
* @param count The number of characters to extract.
* @return The specified substring. If the sum of <code>offset</code> and
* <code>count</code> exceeds the <code>length</code>, then all
* characters to the end of the data are returned.
* @exception DOMException
* INDEX_SIZE_ERR: Raised if the specified offset is negative or greater
* than the number of characters in <code>data</code>, or if the
* specified <code>count</code> is negative.
* <br>DOMSTRING_SIZE_ERR: Raised if the specified range of text does not
* fit into a <code>DOMString</code>.
*/
DOMString substringData(unsigned int offset,
unsigned int count) const;
//@}
/** @name Functions that set or change data. */
//@{
/**
* Append the string to the end of the character data of the node.
*
* Upon success, <code>data</code> provides access to the concatenation of
* <code>data</code> and the <code>DOMString</code> specified.
* @param arg The <code>DOMString</code> to append.
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
*/
void appendData(const DOMString &arg);
/**
* Insert a string at the specified character offset.
*
* @param offset The character offset at which to insert.
* @param arg The <code>DOMString</code> to insert.
* @exception DOMException
* INDEX_SIZE_ERR: Raised if the specified offset is negative or greater
* than the number of characters in <code>data</code>.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
*/
void insertData(unsigned int offset, const DOMString &arg);
/**
* Remove a range of characters from the node.
*
* Upon success,
* <code>data</code> and <code>length</code> reflect the change.
* @param offset The offset from which to remove characters.
* @param count The number of characters to delete. If the sum of
* <code>offset</code> and <code>count</code> exceeds <code>length</code>
* then all characters from <code>offset</code> to the end of the data
* are deleted.
* @exception DOMException
* INDEX_SIZE_ERR: Raised if the specified offset is negative or greater
* than the number of characters in <code>data</code>, or if the
* specified <code>count</code> is negative.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
*/
void deleteData(unsigned int offset,
unsigned int count);
/**
* Replace the characters starting at the specified character offset with
* the specified string.
*
* @param offset The offset from which to start replacing.
* @param count The number of characters to replace. If the sum of
* <code>offset</code> and <code>count</code> exceeds <code>length</code>
* , then all characters to the end of the data are replaced (i.e., the
* effect is the same as a <code>remove</code> method call with the same
* range, followed by an <code>append</code> method invocation).
* @param arg The <code>DOMString</code> with which the range must be
* replaced.
* @exception DOMException
* INDEX_SIZE_ERR: Raised if the specified offset is negative or greater
* than the number of characters in <code>data</code>, or if the
* specified <code>count</code> is negative.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
*/
void replaceData(unsigned int offset,
unsigned int count,
const DOMString &arg);
/**
* Sets the character data of the node that implements this interface.
*
* @param data The <code>DOMString</code> to set.
*/
void setData(const DOMString &data);
//@}
protected:
DOM_CharacterData(CharacterDataImpl *impl);
};
#endif
1.1 xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/dom/DOM_Comment.hpp
Index: DOM_Comment.hpp
===================================================================
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2000 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache\@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation, and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com . For more information
* on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
/*
* $Log: DOM_Comment.hpp,v $
* Revision 1.1 2002/10/23 08:21:41 lilantha
* no message
*
* Revision 1.2 2002/02/20 18:17:00 tng
* [Bug 5977] Warnings on generating apiDocs.
*
* Revision 1.1.1.1 2002/02/01 22:21:44 peiyongz
* sane_include
*
* Revision 1.5 2000/03/02 19:53:54 roddey
* This checkin includes many changes done while waiting for the
* 1.1.0 code to be finished. I can't list them all here, but a list is
* available elsewhere.
*
* Revision 1.4 2000/02/24 20:11:27 abagchi
* Swat for removing Log from API docs
*
* Revision 1.3 2000/02/06 07:47:28 rahulj
* Year 2K copyright swat.
*
* Revision 1.2 2000/01/05 01:16:06 andyh
* DOM Level 2 core, namespace support added.
*
* Revision 1.1.1.1 1999/11/09 01:08:50 twl
* Initial checkin
*
* Revision 1.2 1999/11/08 20:44:14 rahul
* Swat for adding in Product name and CVS comment log variable.
*
*/
#ifndef DOM_Comment_HEADER_GUARD_
#define DOM_Comment_HEADER_GUARD_
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOM_CharacterData.hpp>
class CommentImpl;
/**
* Class to refer to XML comment nodes in the DOM.
*
* <P>The string value contains all of the characters between
* the starting '<code><!--</code>' and ending '<code>--></code>'.
*/
class CDOM_EXPORT DOM_Comment: public DOM_CharacterData {
public:
/** @name Constructors and assignment operators */
//@{
/**
* Default constructor for DOM_Comment. The resulting object does not
* refer to an actual Comment node; it will compare == to 0, and is similar
* to a null object reference variable in Java. It may subsequently be
* assigned to refer to an actual comment node.
* <p>
* New comment nodes are created by DOM_Document::createComment().
*
*/
DOM_Comment();
/**
* Copy constructor. Creates a new <code>DOM_Comment</code> that refers to the
* same underlying node as the original. See also DOM_Node::clone(),
* which will copy the actual Comment node, rather than just creating a new
* reference to the original node.
*
* @param other The object to be copied.
*/
DOM_Comment(const DOM_Comment &other);
/**
* Assignment operator.
*
* @param other The object to be copied.
*/
DOM_Comment & operator = (const DOM_Comment &other);
/**
* Assignment operator. This overloaded variant is provided for
* the sole purpose of setting a DOM_Node reference variable to
* zero. Nulling out a reference variable in this way will decrement
* the reference count on the underlying Node object that the variable
* formerly referenced. This effect is normally obtained when reference
* variable goes out of scope, but zeroing them can be useful for
* global instances, or for local instances that will remain in scope
* for an extended time, when the storage belonging to the underlying
* node needs to be reclaimed.
*
* @param val Only a value of 0, or null, is allowed.
*/
DOM_Comment & operator = (const DOM_NullPtr *val);
//@}
/** @name Destructor. */
//@{
/**
* Destructor for DOM_Comment. The object being destroyed is the reference
* object, not the underlying Comment node itself.
*
*/
~DOM_Comment();
//@}
protected:
DOM_Comment(CommentImpl *comment);
friend class DOM_Document;
};
#endif
1.1 xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/dom/DOM_DOMException.hpp
Index: DOM_DOMException.hpp
===================================================================
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2000 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache\@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation, and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com . For more information
* on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
/*
* $Log: DOM_DOMException.hpp,v $
* Revision 1.1 2002/10/23 08:21:41 lilantha
* no message
*
* Revision 1.1.1.1 2002/02/01 22:21:45 peiyongz
* sane_include
*
* Revision 1.7 2000/03/02 19:53:54 roddey
* This checkin includes many changes done while waiting for the
* 1.1.0 code to be finished. I can't list them all here, but a list is
* available elsewhere.
*
* Revision 1.6 2000/02/24 20:11:27 abagchi
* Swat for removing Log from API docs
*
* Revision 1.5 2000/02/10 19:52:08 abagchi
* Added docs for enum
*
* Revision 1.4 2000/02/06 07:47:28 rahulj
* Year 2K copyright swat.
*
* Revision 1.3 2000/02/04 05:46:31 andyh
* Change offsets and lengths form signed to unsigned
*
* Revision 1.2 2000/01/05 01:16:06 andyh
* DOM Level 2 core, namespace support added.
*
* Revision 1.1.1.1 1999/11/09 01:08:53 twl
* Initial checkin
*
* Revision 1.3 1999/11/08 20:44:14 rahul
* Swat for adding in Product name and CVS comment log variable.
*
*/
#ifndef DOMException_HEADER_GUARD_
#define DOMException_HEADER_GUARD_
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOMString.hpp>
/**
* Encapsulate a general DOM error or warning.
*
* <p> The DOM will create and throw an instance of DOMException
* when an error condition is detected. Exceptions can occur
* when an application directly manipulates the DOM document
* tree that is produced by the parser, or when a document tree
* is created from scratch using the DOM API. DOM exceptions will
* not be generated by the parser while constructing a document
* tree from an XML source document.
*
* <p>Unlike the other classes in the C++ DOM API, DOM_DOMException
* is NOT a reference to an underlying implementation class, and
* does not provide automatic memory management. Code that catches
* a DOM exception is responsible for deleting it, or otherwise
* arranging for its disposal.
*
*/
class CDOM_EXPORT DOM_DOMException {
public:
/** @name Enumerators for DOM Exceptions */
//@{
enum ExceptionCode {
INDEX_SIZE_ERR = 1,
DOMSTRING_SIZE_ERR = 2,
HIERARCHY_REQUEST_ERR = 3,
WRONG_DOCUMENT_ERR = 4,
INVALID_CHARACTER_ERR = 5,
NO_DATA_ALLOWED_ERR = 6,
NO_MODIFICATION_ALLOWED_ERR = 7,
NOT_FOUND_ERR = 8,
NOT_SUPPORTED_ERR = 9,
INUSE_ATTRIBUTE_ERR = 10,
INVALID_STATE_ERR = 11,
SYNTAX_ERR = 12,
INVALID_MODIFICATION_ERR = 13,
NAMESPACE_ERR = 14,
INVALID_ACCESS_ERR = 15
};
//@}
public:
/** @name Constructors and assignment operator */
//@{
/**
* Default constructor for DOM_DOMException.
*
*/
DOM_DOMException();
/**
* Constructor which takes an error code and a message.
*
* @param code The error code which indicates the exception
* @param message The string containing the error message
*/
DOM_DOMException(short code, const DOMString &message);
/**
* Copy constructor.
*
* @param other The object to be copied.
*/
DOM_DOMException(const DOM_DOMException &other);
//@}
/** @name Destructor. */
//@{
/**
* Destructor for DOM_DOMException. Applications are responsible
* for deleting DOM_Exception objects that they catch after they
* have completed their exception processing.
*
*/
virtual ~DOM_DOMException();
//@}
/** @name Public variables. */
//@{
/**
* A code value, from the set defined by the ExceptionCode enum,
* indicating the type of error that occured.
*/
ExceptionCode code;
/**
* A string value. Applications may use this field to hold an error
* message. The field value is not set by the DOM implementation,
* meaning that the string will be empty when an exception is first
* thrown.
*/
DOMString msg;
//@}
};
#endif
1.1 xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/dom/DOM_DOMImplementation.hpp
Index: DOM_DOMImplementation.hpp
===================================================================
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache\@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation, and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com . For more information
* on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
/*
* $Log: DOM_DOMImplementation.hpp,v $
* Revision 1.1 2002/10/23 08:21:41 lilantha
* no message
*
* Revision 1.2 2002/02/04 19:57:15 tng
* Remove the phrase "Experimental".
*
* Revision 1.1.1.1 2002/02/01 22:21:45 peiyongz
* sane_include
*
* Revision 1.8 2001/10/25 21:47:14 peiyongz
* Replace XMLDeleterFor with XMLRegisterCleanup
*
* Revision 1.7 2000/03/02 19:53:54 roddey
* This checkin includes many changes done while waiting for the
* 1.1.0 code to be finished. I can't list them all here, but a list is
* available elsewhere.
*
* Revision 1.6 2000/02/24 20:11:27 abagchi
* Swat for removing Log from API docs
*
* Revision 1.5 2000/02/17 17:47:24 andyh
* Update Doc++ API comments
* NameSpace update to track W3C
* Changes were made by Chih Hsiang Chou
*
* Revision 1.4 2000/02/10 23:35:11 andyh
* Update DOM_DOMImplementation::CreateDocumentType and
* DOM_DocumentType to match latest from W3C
*
* Revision 1.3 2000/02/06 07:47:28 rahulj
* Year 2K copyright swat.
*
* Revision 1.2 2000/01/05 01:16:07 andyh
* DOM Level 2 core, namespace support added.
*
* Revision 1.1.1.1 1999/11/09 01:08:57 twl
* Initial checkin
*
* Revision 1.3 1999/11/08 20:44:15 rahul
* Swat for adding in Product name and CVS comment log variable.
*
*/
#ifndef DOMImplementation_HEADER_GUARD_
#define DOMImplementation_HEADER_GUARD_
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOMString.hpp>
class DOM_Document;
class DOM_DocumentType;
/**
* This class provides a way to query the capabilities of an implementation
* of the DOM
*/
class CDOM_EXPORT DOM_DOMImplementation {
private:
DOM_DOMImplementation(const DOM_DOMImplementation &other);
public:
/** @name Constructors and assignment operators */
//@{
/**
* Construct a DOM_Implementation reference variable, which should
* be assigned to the return value from
* <code>DOM_Implementation::getImplementation()</code>.
*/
DOM_DOMImplementation();
/**
* Assignment operator
*
*/
DOM_DOMImplementation & operator = (const DOM_DOMImplementation &other);
//@}
/** @name Destructor */
//@{
/**
* Destructor. The object being destroyed is a reference to the DOMImplemenentation,
* not the underlying DOMImplementation object itself, which is owned by
* the implementation code.
*
*/
~DOM_DOMImplementation();
//@}
/** @name Getter functions */
//@{
/**
* Test if the DOM implementation implements a specific feature.
*
* @param feature The string of the feature to test (case-insensitive). The legal
* values are defined throughout this specification. The string must be
* an <EM>XML name</EM> (see also Compliance).
* @param version This is the version number of the package name to test.
* In Level 1, this is the string "1.0". If the version is not specified,
* supporting any version of the feature will cause the method to return
* <code>true</code>.
* @return <code>true</code> if the feature is implemented in the specified
* version, <code>false</code> otherwise.
*/
bool hasFeature(const DOMString &feature, const DOMString &version);
/** Return a reference to a DOM_Implementation object for this
* DOM implementation.
*
* Intended to support applications that may be
* using DOMs retrieved from several different sources, potentially
* with different underlying implementations.
*/
static DOM_DOMImplementation &getImplementation();
//@}
/** @name Functions introduced in DOM Level 2. */
//@{
/**
* Creates an empty <code>DOM_DocumentType</code> node.
* Entity declarations and notations are not made available.
* Entity reference expansions and default attribute additions
* do not occur. It is expected that a future version of the DOM
* will provide a way for populating a <code>DOM_DocumentType</code>.
*
* @param qualifiedName The <em>qualified name</em>
* of the document type to be created.
* @param publicId The external subset public identifier.
* @param systemId The external subset system identifier.
* @return A new <code>DOM_DocumentType</code> node with
* <code>Node.ownerDocument</code> set to <code>null</code>.
* @exception DOMException
* INVALID_CHARACTER_ERR: Raised if the specified qualified name
* contains an illegal character.
* <br>
* NAMESPACE_ERR: Raised if the <code>qualifiedName</code> is malformed.
*/
DOM_DocumentType createDocumentType(const DOMString &qualifiedName,
const DOMString &publicId, const DOMString &systemId);
/**
* Creates an XML <code>DOM_Document</code> object of the specified type
* with its document element.
*
* @param namespaceURI The <em>namespace URI</em> of
* the document element to create, or <code>null</code>.
* @param qualifiedName The <em>qualified name</em>
* of the document element to be created.
* @param doctype The type of document to be created or <code>null</code>.
* <p>When <code>doctype</code> is not <code>null</code>, its
* <code>Node.ownerDocument</code> attribute is set to the document
* being created.
* @return A new <code>DOM_Document</code> object.
* @exception DOMException
* INVALID_CHARACTER_ERR: Raised if the specified qualified name
* contains an illegal character.
* <br>
* NAMESPACE_ERR: Raised if the <CODE>qualifiedName</CODE> is
* malformed, or if the <CODE>qualifiedName</CODE> has a prefix that is
* "xml" and the <CODE>namespaceURI</CODE> is different from
* "http://www.w3.org/XML/1998/namespace".
* <br>
* WRONG_DOCUMENT_ERR: Raised if <code>doctype</code> has already
* been used with a different document.
*/
DOM_Document createDocument(const DOMString &namespaceURI,
const DOMString &qualifiedName, const DOM_DocumentType &doctype);
//@}
// -----------------------------------------------------------------------
// Notification that lazy data has been deleted
// -----------------------------------------------------------------------
static void reinitDOM_DOMImplementation();
};
#endif
1.1 xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/dom/DOM_Document.hpp
Index: DOM_Document.hpp
===================================================================
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache\@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation, and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com . For more information
* on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
/*
* $Id: DOM_Document.hpp,v 1.1 2002/10/23 08:21:41 lilantha Exp $
*/
#ifndef DOM_Document_HEADER_GUARD_
#define DOM_Document_HEADER_GUARD_
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOM_DocumentType.hpp>
#include <xercesc/dom/DOM_DOMImplementation.hpp>
#include <xercesc/dom/DOM_Element.hpp>
#include <xercesc/dom/DOM_DocumentFragment.hpp>
#include <xercesc/dom/DOM_Comment.hpp>
#include <xercesc/dom/DOM_CDATASection.hpp>
#include <xercesc/dom/DOM_ProcessingInstruction.hpp>
#include <xercesc/dom/DOM_Attr.hpp>
#include <xercesc/dom/DOM_Entity.hpp>
#include <xercesc/dom/DOM_EntityReference.hpp>
#include <xercesc/dom/DOM_NodeList.hpp>
#include <xercesc/dom/DOM_Notation.hpp>
#include <xercesc/dom/DOM_Text.hpp>
#include <xercesc/dom/DOM_Node.hpp>
#include <xercesc/dom/DOM_NodeIterator.hpp>
#include <xercesc/dom/DOM_TreeWalker.hpp>
#include <xercesc/dom/DOM_XMLDecl.hpp>
#include <xercesc/dom/DOM_Range.hpp>
class DocumentImpl;
class NodeIteratorImpl;
/**
* Class to refer to XML Document nodes in the DOM.
*
* Conceptually, a DOM document node is the root of the document tree, and provides
* the primary access to the document's data.
* <p>Since elements, text nodes, comments, processing instructions, etc.
* cannot exist outside the context of a <code>Document</code>, the
* <code>Document</code> interface also contains the factory methods needed
* to create these objects. The <code>Node</code> objects created have a
* <code>ownerDocument</code> attribute which associates them with the
* <code>Document</code> within whose context they were created.
*/
class CDOM_EXPORT DOM_Document: public DOM_Node {
public:
/** @name Constructors and assignment operators */
//@{
/**
* The default constructor for DOM_Document creates a null
* DOM_Document object that refers to no document. It may subsequently be
* assigned to refer to an actual Document node.
*
* To create a new document, use the static method
* <code> DOM_Document::createDocument(). </code>
*
*/
DOM_Document();
/**
* Copy constructor. Creates a new <code>DOM_Document</code> that refers to the
* same underlying actual document as the original.
*
* @param other The object to be copied
*/
DOM_Document(const DOM_Document &other);
/**
* Assignment operator
*
* @param other The object to be copied
*/
DOM_Document & operator = (const DOM_Document &other);
/**
* Assignment operator. This overloaded variant is provided for
* the sole purpose of setting a DOM_Node reference variable to
* zero. Nulling out a reference variable in this way will decrement
* the reference count on the underlying Node object that the variable
* formerly referenced. This effect is normally obtained when reference
* variable goes out of scope, but zeroing them can be useful for
* global instances, or for local instances that will remain in scope
* for an extended time, when the storage belonging to the underlying
* node needs to be reclaimed.
*
* @param val Only a value of 0, or null, is allowed.
*/
DOM_Document & operator = (const DOM_NullPtr *val);
//@}
/** @name Destructor */
//@{
/**
* Destructor. The object being destroyed is the reference
* object, not the underlying Document itself.
*
* <p>The reference counting memory management will
* delete the underlying document itself if this
* DOM_Document is the last remaining to refer to the Document,
* and if there are no remaining references to any of the nodes
* within the document tree. If other live references do remain,
* the underlying document itself remains also.
*
*/
~DOM_Document();
//@}
/** @name Factory methods to create new nodes for the Document */
//@{
/**
* Create a new empty document.
*
* This differs from the <code> DOM_Document </code> default
* constructor, which creates
* a null reference only, not an actual document.
*
* <p>This function is an extension to the DOM API, which
* lacks any mechanism for the creation of new documents.
* @return A new <code>DOM_Document</code>, which may then
* be populated using the DOM API calls.
*/
static DOM_Document createDocument();
/**
* Create a new entity.
*
* Non-standard extension.
* @param name The name of the entity to instantiate
*
*/
DOM_Entity createEntity(const DOMString &name);
/**
* Creates an element of the type specified.
*
* Note that the instance returned
* implements the Element interface, so attributes can be specified
* directly on the returned object.
* @param tagName The name of the element type to instantiate.
* @return A <code>DOM_Element</code> that reference the new element.
* @exception DOMException
* INVALID_CHARACTER_ERR: Raised if the specified name contains an
* illegal character.
*/
DOM_Element createElement(const DOMString &tagName);
/**
* Creates an element of the type specified.
* This non-standard overload of createElement, with the name specified as
* raw Unicode string, is intended for use from XML parsers,
* and is the best performing way to create elements. The name
* string is not checked for conformance to the XML rules for valid
* element names.
*
*
* @param tagName The name of the element type to instantiate, as
* a null-terminated unicode string.
* @return A new <CODE>DOM_Element</CODE>
* object with the <CODE>nodeName</CODE> attribute set to
* <CODE>tagName</CODE>, and <CODE>localName</CODE>,
* <CODE>prefix</CODE>, and <CODE>namespaceURI</CODE> set to
* <CODE>null</CODE>.
*/
DOM_Element createElement(const XMLCh *tagName);
/**
* Creates an empty DocumentFragment object.
*
* @return A <code>DOM_DocumentFragment</code> that references the newly
* created document fragment.
*/
DOM_DocumentFragment createDocumentFragment();
/**
* Creates a Text node given the specified string.
*
* @param data The data for the node.
* @return A <code>DOM_Text</code> object that references the newly
* created text node.
*/
DOM_Text createTextNode(const DOMString &data);
/**
* Creates a Comment node given the specified string.
*
* @param data The data for the comment.
* @return A <code>DOM_Comment</code> that references the newly
* created comment node.
*/
DOM_Comment createComment(const DOMString &data);
/**
* Creates a CDATASection node whose value is the specified
* string.
*
* @param data The data for the <code>DOM_CDATASection</code> contents.
* @return A <code>DOM_CDATASection</code> object.
* @exception DOMException
* NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
*/
DOM_CDATASection createCDATASection(const DOMString &data);
/**
* Create a DocumentType node. Non-standard extension.
*
* @return A <code>DOM_DocumentType</code> that references the newly
* created DocumentType node.
*
*/
DOM_DocumentType createDocumentType(const DOMString &name);
/**
* Create a Notation.
*
* Non-standard extension.
*
* @param name The name of the notation to instantiate
* @return A <code>DOM_Notation</code> that references the newly
* created Notation node.
*/
DOM_Notation createNotation(const DOMString &name);
/**
* Creates a ProcessingInstruction node given the specified
* name and data strings.
*
* @param target The target part of the processing instruction.
* @param data The data for the node.
* @return A <code>DOM_ProcessingInstruction</code> that references the newly
* created PI node.
* @exception DOMException
* INVALID_CHARACTER_ERR: Raised if an illegal character is specified.
*/
DOM_ProcessingInstruction createProcessingInstruction(const DOMString &target,
const DOMString &data);
/**
* Creates an Attr of the given name.
*
* Note that the
* <code>Attr</code> instance can then be attached to an Element
* using the <code>DOMElement::setAttribute()</code> method.
* @param name The name of the attribute.
* @return A new <CODE>DOM_Attr</CODE>
* object with the <CODE>nodeName</CODE> attribute set to
* <CODE>name</CODE>, and <CODE>localName</CODE>, <CODE>prefix</CODE>,
* and <CODE>namespaceURI</CODE> set to
* <CODE>null</CODE>.
* @exception DOMException
* INVALID_CHARACTER_ERR: Raised if the specified name contains an
* illegal character.
*/
DOM_Attr createAttribute(const DOMString &name);
/**
* Creates an EntityReference object.
*
* @param name The name of the entity to reference.
* @return A <code>DOM_EntityReference</code> that references the newly
* created EntityReference node.
* @exception DOMException
* INVALID_CHARACTER_ERR: Raised if the specified name contains an
* illegal character.
*/
DOM_EntityReference createEntityReference(const DOMString &name);
/**
* Creates a NodeIterator object. (DOM2)
*
* NodeIterators are used to step through a set of nodes, e.g. the set of nodes in a NodeList, the
* document subtree governed by a particular node, the results of a query, or any other set of nodes.
* The set of nodes to be iterated is determined by the implementation of the NodeIterator. DOM Level 2
* specifies a single NodeIterator implementation for document-order traversal of a document subtree.
* Instances of these iterators are created by calling <code>DocumentTraversal.createNodeIterator()</code>.
*
* To produce a view of the document that has entity references expanded and does not
* expose the entity reference node itself, use the <code>whatToShow</code> flags to hide the entity
* reference node and set expandEntityReferences to true when creating the iterator. To
* produce a view of the document that has entity reference nodes but no entity expansion,
* use the <code>whatToShow</code> flags to show the entity reference node and set
* expandEntityReferences to false.
*
* @param root The root node of the DOM tree
* @param whatToShow This attribute determines which node types are presented via the iterator.
* @param filter The filter used to screen nodes
* @param entityReferenceExpansion The value of this flag determines whether the children of entity reference nodes are
* visible to the iterator. If false, they will be skipped over.
*/
DOM_NodeIterator createNodeIterator(DOM_Node root,
unsigned long whatToShow,
DOM_NodeFilter* filter,
bool entityReferenceExpansion);
/**
* Creates a TreeWalker object. (DOM2)
*
* TreeWalker objects are used to navigate a document tree or subtree using the view of the document defined
* by its whatToShow flags and any filters that are defined for the TreeWalker. Any function which performs
* navigation using a TreeWalker will automatically support any view defined by a TreeWalker.
*
* Omitting nodes from the logical view of a subtree can result in a structure that is substantially different from
* the same subtree in the complete, unfiltered document. Nodes that are siblings in the TreeWalker view may
* be children of different, widely separated nodes in the original view. For instance, consider a Filter that skips
* all nodes except for Text nodes and the root node of a document. In the logical view that results, all text
* nodes will be siblings and appear as direct children of the root node, no matter how deeply nested the
* structure of the original document.
*
* To produce a view of the document that has entity references expanded
* and does not expose the entity reference node itself, use the whatToShow
* flags to hide the entity reference node and set <code>expandEntityReferences</code> to
* true when creating the TreeWalker. To produce a view of the document
* that has entity reference nodes but no entity expansion, use the
* <code>whatToShow</code> flags to show the entity reference node and set
* <code>expandEntityReferences</code> to false
*
* @param root The root node of the DOM tree
* @param whatToShow This attribute determines which node types are presented via the tree-walker.
* @param filter The filter used to screen nodes
* @param entityReferenceExpansion The value of this flag determines whether the children of entity reference nodes are
* visible to the tree-walker. If false, they will be skipped over.
*/
DOM_TreeWalker createTreeWalker(DOM_Node root,
unsigned long whatToShow,
DOM_NodeFilter* filter,
bool entityReferenceExpansion);
/**
* Creates a XMLDecl type Node . Non-Standard (an extension to xerces)
*
* XMLDecl Nodes are created to get version, encoding and standalone information in a document tree
*
* This node if created gets attached to a document object or an entity node. There can be no child
* to this type of node.
*
* @param version The version data of the document. Currently possible value is 1.0
* @param encoding The encoding type specified in the document
* @param standalone The information whether the document is standalone or not
*/
DOM_XMLDecl createXMLDecl(const DOMString& version,
const DOMString& encoding,
const DOMString& standalone);
/**
* To create the range consisting of boundary-points and offset of the
* selected contents
*
* @return The initial state of the Range such that both the boundary-points
* are positioned at the beginning of the corresponding DOM_DOcument, before
* any content. The range returned can only be used to select content
* associated with this document, or with documentFragments and Attrs for
* which this document is the ownerdocument
*/
DOM_Range createRange();
//@}
/** @name Getter functions */
//@{
/**
* Get Document Type Declaration (see <code>DOM_DocumentType</code>) associated
* with this document.
*
* For documents without
* a document type declaration this returns <code>null</code> reference object. The DOM Level
* 1 does not support editing the Document Type Declaration, therefore
* <code>docType</code> cannot be altered in any way.
*/
DOM_DocumentType getDoctype() const;
/**
* Return the <code>DOMImplementation</code> object that handles this document.
*/
DOM_DOMImplementation &getImplementation() const;
/**
* Return a reference to the root element of the document.
*/
DOM_Element getDocumentElement() const;
/**
* Returns a <code>DOM_NodeList</code> of all the elements with a
* given tag name. The returned node list is "live", in that changes
* to the document tree made after a nodelist was initially
* returned will be immediately reflected in the node list.
*
* The elements in the node list are ordered in the same order in which they
* would be encountered in a
* preorder traversal of the <code>Document</code> tree.
* @param tagname The name of the tag to match on. The special value "*"
* matches all tags.
* @return A reference to a NodeList containing all the matched
* <code>Element</code>s.
*/
DOM_NodeList getElementsByTagName(const DOMString &tagname) const;
//@}
/** @name Functions introduced in DOM Level 2. */
//@{
/**
* Imports a node from another document to this document.
* The returned node has no parent (<CODE>parentNode</CODE> is
* <CODE>null</CODE>). The source node is not altered or removed from the
* original document; this method creates a new copy of the source
* node.<BR>For all nodes, importing a node creates a node object owned by
* the importing document, with attribute values identical to the source
* node's <CODE>nodeName</CODE> and <CODE>nodeType</CODE>, plus the
* attributes related to namespaces (prefix and namespaces URI).
*
* @param importedNode The node to import.
* @param deep If <CODE>true</CODE>, recursively import the subtree under the
* specified node; if <CODE>false</CODE>, import only the node itself,
* as explained above. This does not apply to <CODE>DOM_Attr</CODE>,
* <CODE>DOM_EntityReference</CODE>, and <CODE>DOM_Notation</CODE> nodes.
* @return The imported node that belongs to this <CODE>DOM_Document</CODE>.
* @exception DOMException
* NOT_SUPPORTED_ERR: Raised if the type of node being imported is
* not supported.
*/
DOM_Node importNode(const DOM_Node &importedNode, bool deep);
/**
* Creates an element of the given qualified name and
* namespace URI.
*
* @param namespaceURI The <em>namespace URI</em> of
* the element to create.
* @param qualifiedName The <em>qualified name</em>
* of the element type to instantiate.
* @return A new <code>DOM_Element</code> object.
* @exception DOMException
* INVALID_CHARACTER_ERR: Raised if the specified qualified name contains
* an illegal character.
* <br>
* NAMESPACE_ERR: Raised if the <CODE>qualifiedName</CODE> is
* malformed, if the <CODE>qualifiedName</CODE> has a prefix and the
* <CODE>namespaceURI</CODE> is <CODE>null</CODE> or an empty string,
* or if the <CODE>qualifiedName</CODE> has a prefix that is "xml" and
* the <CODE>namespaceURI</CODE> is different from
* "http://www.w3.org/XML/1998/namespace".
*/
DOM_Element createElementNS(const DOMString &namespaceURI,
const DOMString &qualifiedName);
/**
* Creates an attribute of the given qualified name and namespace
* URI.
*
* @param namespaceURI The <em>namespace URI</em> of
* the attribute to create.
* @param qualifiedName The <em>qualified name</em>
* of the attribute to instantiate.
* @return A new <code>DOM_Attr</code> object.
* @exception DOMException
* INVALID_CHARACTER_ERR: Raised if the specified qualified name contains
* an illegal character.
* <br>
* NAMESPACE_ERR: Raised if the <CODE>qualifiedName</CODE> is
* malformed, if the <CODE>qualifiedName</CODE> has a prefix and the
* <CODE>namespaceURI</CODE> is <CODE>null</CODE> or an empty string,
* if the <CODE>qualifiedName</CODE> has a prefix that is "xml" and the
* <CODE>namespaceURI</CODE> is different from
* "http://www.w3.org/XML/1998/namespace", if the
* <CODE>qualifiedName</CODE> has a prefix that is "xmlns" and the
* <CODE>namespaceURI</CODE> is different from
* "http://www.w3.org/2000/xmlns/", or if the
* <CODE>qualifiedName</CODE> is "xmlns" and the
* <CODE>namespaceURI</CODE> is different from
* "http://www.w3.org/2000/xmlns/".
*/
DOM_Attr createAttributeNS(const DOMString &namespaceURI,
const DOMString &qualifiedName);
/**
* Returns a <code>DOM_NodeList</code> of all the <code>DOM_Element</code>s
* with a given <em>local name</em> and
* namespace URI in the order in which they would be encountered in a
* preorder traversal of the <code>DOM_Document</code> tree.
*
* @param namespaceURI The <em>namespace URI</em> of
* the elements to match on. The special value "*" matches all
* namespaces.
* @param localName The <em>local name</em> of the
* elements to match on. The special value "*" matches all local names.
* @return A new <code>DOM_NodeList</code> object containing all the matched
* <code>DOM_Element</code>s.
*/
DOM_NodeList getElementsByTagNameNS(const DOMString &namespaceURI,
const DOMString &localName) const;
/**
* Returns the <code>DOM_Element</code> whose ID is given by <code>elementId</code>.
* If no such element exists, returns <code>null</code>.
* Behavior is not defined if more than one element has this <code>ID</code>.
* <P><B>Note:</B> The DOM implementation must have information that says
* which attributes are of type ID. Attributes with the name "ID" are not of
* type ID unless so defined. Implementations that do not know whether
* attributes are of type ID or not are expected to return
* <CODE>null</CODE>.</P>
*
* @param elementId The unique <code>id</code> value for an element.
* @return The matching element.
*/
DOM_Element getElementById(const DOMString &elementId);
/**
* Sets whether the DOM implementation performs error checking
* upon operations. Turning off error checking only affects
* the following DOM checks:
* <ul>
* <li>Checking strings to make sure that all characters are
* legal XML characters
* <li>Hierarchy checking such as allowed children, checks for
* cycles, etc.
* </ul>
* <p>
* Turning off error checking does <em>not</em> turn off the
* following checks:
* <ul>
* <li>Read only checks
* <li>Checks related to DOM events
* </ul>
*/
void setErrorChecking(bool check);
/**
* Returns true if the DOM implementation performs error checking.
*/
bool getErrorChecking();
//@}
protected:
DOM_Document (DocumentImpl *impl);
friend class DOM_Node;
friend class DocumentImpl;
friend class NodeIteratorImpl;
friend class DOM_DOMImplementation;
};
#endif
1.1 xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/dom/DOM_DocumentFragment.hpp
Index: DOM_DocumentFragment.hpp
===================================================================
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2000 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache\@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation, and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com . For more information
* on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
/*
* $Id: DOM_DocumentFragment.hpp,v 1.1 2002/10/23 08:21:41 lilantha Exp $
*/
#ifndef DOM_DocumentFragment_HEADER_GUARD_
#define DOM_DocumentFragment_HEADER_GUARD_
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOM_Node.hpp>
class DocumentFragmentImpl;
/**
* <code>DocumentFragment</code> is a "lightweight" or "minimal"
* <code>Document</code> object.
*
* It is very common to want to be able to
* extract a portion of a document's tree or to create a new fragment of a
* document. Imagine implementing a user command like cut or rearranging a
* document by moving fragments around. It is desirable to have an object
* which can hold such fragments and it is quite natural to use a Node for
* this purpose. While it is true that a <code>Document</code> object could
* fulfil this role, a <code>Document</code> object can potentially be a
* heavyweight object, depending on the underlying implementation. What is
* really needed for this is a very lightweight object.
* <code>DocumentFragment</code> is such an object.
* <p>Furthermore, various operations -- such as inserting nodes as children
* of another <code>Node</code> -- may take <code>DocumentFragment</code>
* objects as arguments; this results in all the child nodes of the
* <code>DocumentFragment</code> being moved to the child list of this node.
* <p>The children of a <code>DocumentFragment</code> node are zero or more
* nodes representing the tops of any sub-trees defining the structure of the
* document. <code>DocumentFragment</code> nodes do not need to be
* well-formed XML documents (although they do need to follow the rules
* imposed upon well-formed XML parsed entities, which can have multiple top
* nodes). For example, a <code>DocumentFragment</code> might have only one
* child and that child node could be a <code>Text</code> node. Such a
* structure model represents neither an HTML document nor a well-formed XML
* document.
* <p>When a <code>DocumentFragment</code> is inserted into a
* <code>Document</code> (or indeed any other <code>Node</code> that may take
* children) the children of the <code>DocumentFragment</code> and not the
* <code>DocumentFragment</code> itself are inserted into the
* <code>Node</code>. This makes the <code>DocumentFragment</code> very
* useful when the user wishes to create nodes that are siblings; the
* <code>DocumentFragment</code> acts as the parent of these nodes so that the
* user can use the standard methods from the <code>Node</code> interface,
* such as <code>insertBefore()</code> and <code>appendChild()</code>.
*/
class CDOM_EXPORT DOM_DocumentFragment: public DOM_Node {
public:
/** @name Constructors and assignment operators */
//@{
/**
* Default constructor for <code>DOM_DocumentFragment</code>. The resulting object does not
* refer to an actual Document Fragment node; it will compare == to 0, and is similar
* to a null object reference variable in Java. It may subsequently be
* assigned to refer to an actual Document Fragment node.
* <p>
* New document fragment nodes are created by DOM_Document::createDocumentFragment().
*
*/
DOM_DocumentFragment();
/**
* Copy constructor. Creates a new <code>DOM_DocumentFragment</code> that refers to the
* same underlying node as the original. See also DOM_Node::clone(),
* which will copy the actual Document fragment node, rather than just creating a new
* reference to the original node.
*
* @param other The object to be copied
*/
DOM_DocumentFragment(const DOM_DocumentFragment &other);
/**
* Assignment operator
*
* @param other The object to be copied
*/
DOM_DocumentFragment & operator = (const DOM_DocumentFragment &other);
/**
* Assignment operator. This overloaded variant is provided for
* the sole purpose of setting a DOM_Node reference variable to
* zero. Nulling out a reference variable in this way will decrement
* the reference count on the underlying Node object that the variable
* formerly referenced. This effect is normally obtained when reference
* variable goes out of scope, but zeroing them can be useful for
* global instances, or for local instances that will remain in scope
* for an extended time, when the storage belonging to the underlying
* node needs to be reclaimed.
*
* @param val Only a value of 0, or null, is allowed.
*/
DOM_DocumentFragment & operator = (const DOM_NullPtr *val);
//@}
/** @name Destructor */
//@{
/**
* Destructor. The object being destroyed is the reference
* object, not the underlying Comment node itself.
*
*/
~DOM_DocumentFragment();
//@}
protected:
DOM_DocumentFragment(DocumentFragmentImpl *);
friend class DOM_Document;
friend class RangeImpl;
};
#endif
1.1 xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/dom/DOM_DocumentType.hpp
Index: DOM_DocumentType.hpp
===================================================================
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache\@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation, and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com . For more information
* on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
/*
* $Log: DOM_DocumentType.hpp,v $
* Revision 1.1 2002/10/23 08:21:41 lilantha
* no message
*
* Revision 1.3 2002/02/20 18:17:00 tng
* [Bug 5977] Warnings on generating apiDocs.
*
* Revision 1.2 2002/02/04 19:57:15 tng
* Remove the phrase "Experimental".
*
* Revision 1.1.1.1 2002/02/01 22:21:45 peiyongz
* sane_include
*
* Revision 1.8 2000/03/10 02:14:39 chchou
* add null DOM_DocumentType constructor
*
* Revision 1.7 2000/03/02 19:53:55 roddey
* This checkin includes many changes done while waiting for the
* 1.1.0 code to be finished. I can't list them all here, but a list is
* available elsewhere.
*
* Revision 1.6 2000/02/24 20:11:27 abagchi
* Swat for removing Log from API docs
*
* Revision 1.5 2000/02/17 17:47:24 andyh
* Update Doc++ API comments
* NameSpace update to track W3C
* Changes were made by Chih Hsiang Chou
*
* Revision 1.4 2000/02/10 23:35:11 andyh
* Update DOM_DOMImplementation::CreateDocumentType and
* DOM_DocumentType to match latest from W3C
*
* Revision 1.3 2000/02/06 07:47:29 rahulj
* Year 2K copyright swat.
*
* Revision 1.2 2000/01/05 01:16:07 andyh
* DOM Level 2 core, namespace support added.
*
* Revision 1.1.1.1 1999/11/09 01:08:52 twl
* Initial checkin
*
* Revision 1.3 1999/11/08 20:44:16 rahul
* Swat for adding in Product name and CVS comment log variable.
*
*/
#ifndef DOM_DocumentType_HEADER_GUARD_
#define DOM_DocumentType_HEADER_GUARD_
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOM_Node.hpp>
class DOM_NamedNodeMap;
class DocumentTypeImpl;
/**
* Each <code>Document</code> has a <code>doctype</code> whose value
* is either <code>null</code> or a <code>DocumentType</code> object.
*
* The <code>DOM_DocumentType</code> class provides access
* to the list of entities and notations that are defined for the document.
* <p>The DOM Level 1 doesn't support editing <code>DocumentType</code> nodes.
*/
class CDOM_EXPORT DOM_DocumentType: public DOM_Node {
public:
/** @name Constructors and assignment operator */
//@{
/**
* Default constructor for DOM_DocumentType. The resulting object does not
* refer to an actual DocumentType node; it will compare == to 0, and is similar
* to a null object reference variable in Java. It may subsequently be
* assigned to refer to the actual DocumentType node.
* <p>
* A new DocumentType node for a document that does not already have one
* can be created by DOM_Document::createDocumentType().
*
*/
DOM_DocumentType();
/**
* Constructor for a null DOM_DocumentType.
* This allows passing 0 directly as a null DOM_DocumentType to
* function calls that take DOM_DocumentType as parameters.
*
* @param nullPointer Must be 0.
*/
DOM_DocumentType(int nullPointer);
/**
* Copy constructor. Creates a new <code>DOM_Comment</code> that refers to the
* same underlying node as the original.
*
*
* @param other The object to be copied.
*/
DOM_DocumentType(const DOM_DocumentType &other);
/**
* Assignment operator.
*
* @param other The object to be copied.
*/
DOM_DocumentType & operator = (const DOM_DocumentType &other);
/**
* Assignment operator. This overloaded variant is provided for
* the sole purpose of setting a DOM_Node reference variable to
* zero. Nulling out a reference variable in this way will decrement
* the reference count on the underlying Node object that the variable
* formerly referenced. This effect is normally obtained when reference
* variable goes out of scope, but zeroing them can be useful for
* global instances, or for local instances that will remain in scope
* for an extended time, when the storage belonging to the underlying
* node needs to be reclaimed.
*
* @param val Only a value of 0, or null, is allowed.
*/
DOM_DocumentType & operator = (const DOM_NullPtr *val);
//@}
/** @name Destructor. */
//@{
/**
* Destructor for DOM_DocumentType. The object being destroyed is the reference
* object, not the underlying DocumentType node itself.
*
*/
~DOM_DocumentType();
//@}
/** @name Getter functions. */
//@{
/**
* The name of DTD; i.e., the name immediately following the
* <code>DOCTYPE</code> keyword in an XML source document.
*/
DOMString getName() const;
/**
* This function returns a <code>NamedNodeMap</code> containing the general entities, both
* external and internal, declared in the DTD. Parameter entities are not contained.
* Duplicates are discarded.
* <p>
* Note: this functionality is not implemented in the initial release
* of the parser, and the returned NamedNodeMap will be empty.
*/
DOM_NamedNodeMap getEntities() const;
/**
* This function returns a named node map containing an entry for
* each notation declared in a document's DTD. Duplicates are discarded.
*
* <p>
* Note: this functionality is not implemented in the initial release
* of the parser, and the returned NamedNodeMap will be empty.
*/
DOM_NamedNodeMap getNotations() const;
//@}
/** @name Functions introduced in DOM Level 2. */
//@{
/**
* Get the public identifier of the external subset.
*
* @return The public identifier of the external subset.
*/
DOMString getPublicId() const;
/**
* Get the system identifier of the external subset.
*
* @return The system identifier of the external subset.
*/
DOMString getSystemId() const;
/**
* Get the internal subset as a string.
*
* @return The internal subset as a string.
*/
DOMString getInternalSubset() const;
//@}
protected:
DOM_DocumentType(DocumentTypeImpl *);
friend class DOM_Document;
friend class DOM_DOMImplementation;
};
#endif
1.1 xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/dom/DOM_Element.hpp
Index: DOM_Element.hpp
===================================================================
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache\@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation, and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com . For more information
* on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
/*
* $Log: DOM_Element.hpp,v $
* Revision 1.1 2002/10/23 08:21:41 lilantha
* no message
*
* Revision 1.3 2002/02/20 18:17:00 tng
* [Bug 5977] Warnings on generating apiDocs.
*
* Revision 1.2 2002/02/04 20:03:48 tng
* Add DOM Level missing functions:
* 1. NodeIterator::getRoot
* 2. TreeWalker::getRoot
* 3. Element::hasAttribute
* 4. Element::hasAttributeNS
* 5. Node::hasAttributes
* 6. Node::isSupported
*
* Revision 1.1.1.1 2002/02/01 22:21:45 peiyongz
* sane_include
*
* Revision 1.9 2001/05/11 13:25:20 tng
* Copyright update.
*
* Revision 1.8 2001/05/03 19:17:26 knoaman
* TraverseSchema Part II.
*
* Revision 1.7 2000/03/02 19:53:55 roddey
* This checkin includes many changes done while waiting for the
* 1.1.0 code to be finished. I can't list them all here, but a list is
* available elsewhere.
*
* Revision 1.6 2000/02/24 20:11:27 abagchi
* Swat for removing Log from API docs
*
* Revision 1.5 2000/02/17 17:47:24 andyh
* Update Doc++ API comments
* NameSpace update to track W3C
* Changes were made by Chih Hsiang Chou
*
* Revision 1.4 2000/02/06 07:47:29 rahulj
* Year 2K copyright swat.
*
* Revision 1.3 2000/01/05 01:16:07 andyh
* DOM Level 2 core, namespace support added.
*
* Revision 1.2 1999/12/21 07:47:06 robweir
* Patches to support Xalan, where we need to create a
* "special" DOM with subclassed Nodes.
*
* 1. Export the NodeImpl-derived classes
* 2. Ensure that their constructors have at least protected access
*
* Revision 1.1.1.1 1999/11/09 01:08:57 twl
* Initial checkin
*
* Revision 1.3 1999/11/08 20:44:17 rahul
* Swat for adding in Product name and CVS comment log variable.
*
*/
#ifndef DOM_Element_HEADER_GUARD_
#define DOM_Element_HEADER_GUARD_
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOM_Node.hpp>
class DOM_Attr;
class DOM_NodeList;
class ElementImpl;
/**
* By far the vast majority of objects (apart from text) that authors
* encounter when traversing a document are <code>DOM_Element</code> nodes.
*
* Assume the following XML document:<elementExample id="demo">
* <subelement1/>
* <subelement2><subsubelement/></subelement2>
* </elementExample>
* <p>When represented using DOM, the top node is an <code>DOM_Element</code> node
* for "elementExample", which contains two child <code>DOM_Element</code> nodes,
* one for "subelement1" and one for "subelement2". "subelement1" contains no
* child nodes.
* <p>Elements may have attributes associated with them; since the
* <code>DOM_Element</code> interface inherits from <code>DOM_Node</code>, the generic
* <code>DOM_Node</code> interface method <code>getAttributes</code> may be used
* to retrieve the set of all attributes for an element. There are methods on
* the <code>DOM_Element</code> interface to retrieve either an <code>DOM_Attr</code>
* object by name or an attribute value by name. In XML, where an attribute
* value may contain entity references, an <code>DOM_Attr</code> object should be
* retrieved to examine the possibly fairly complex sub-tree representing the
* attribute value. On the other hand, in HTML, where all attributes have
* simple string values, methods to directly access an attribute value can
* safely be used as a convenience.
*/
class CDOM_EXPORT DOM_Element: public DOM_Node {
private:
public:
/** @name Constructors and assignment operator */
//@{
/**
* Default constructor for DOM_Element. The resulting object does not
* refer to an actual Element node; it will compare == to 0, and is similar
* to a null object reference variable in Java. It may subsequently be
* assigned to refer to an actual Element node.
* <p>
* New comment nodes are created by DOM_Document::createElement().
*
*/
DOM_Element();
/**
* Copy constructor. Creates a new <code>DOM_Element</code> that refers to the
* same underlying actual element as the original.
*
* @param other The object to be copied
*/
DOM_Element(const DOM_Element &other);
/**
* Assignment operator.
*
* @param other The object to be copied.
*/
DOM_Element & operator = (const DOM_Element &other);
/**
* Assignment operator. This overloaded variant is provided for
* the sole purpose of setting a DOM_Node reference variable to
* zero. Nulling out a reference variable in this way will decrement
* the reference count on the underlying Node object that the variable
* formerly referenced. This effect is normally obtained when reference
* variable goes out of scope, but zeroing them can be useful for
* global instances, or for local instances that will remain in scope
* for an extended time, when the storage belonging to the underlying
* node needs to be reclaimed.
*
* @param val Only a value of 0, or null, is allowed.
*/
DOM_Element & operator = (const DOM_NullPtr *val);
//@}
/** @name Destructor. */
//@{
/**
* Destructor. The object being destroyed is the reference
* object, not the underlying Element itself.
*
*/
~DOM_Element();
//@}
/** @name Getter functions. */
//@{
/**
* The name of the element.
*
* For example, in: <elementExample
* id="demo"> ... </elementExample> , <code>tagName</code> has
* the value <code>"elementExample"</code>. Note that this is
* case-preserving in XML, as are all of the operations of the DOM.
*/
DOMString getTagName() const;
/**
* Retrieves an attribute value by name.
*
* @param name The name of the attribute to retrieve.
* @return The <code>DOM_Attr</code> value as a string, or the empty string if
* that attribute does not have a specified or default value.
*/
DOMString getAttribute(const DOMString &name) const;
/**
* Retrieves an <code>DOM_Attr</code> node by name.
*
* @param name The name (<CODE>nodeName</CODE>) of the attribute to retrieve.
* @return The <code>DOM_Attr</code> node with the specified name (<CODE>nodeName</CODE>) or
* <code>null</code> if there is no such attribute.
*/
DOM_Attr getAttributeNode(const DOMString &name) const;
/**
* Returns a <code>NodeList</code> of all descendant elements with a given
* tag name, in the order in which they would be encountered in a preorder
* traversal of the <code>DOM_Element</code> tree.
*
* @param name The name of the tag to match on. The special value "*"
* matches all tags.
* @return A list of matching <code>DOM_Element</code> nodes.
*/
DOM_NodeList getElementsByTagName(const DOMString &name) const;
//@}
/** @name Set functions. */
//@{
/**
* Adds a new attribute.
*
* If an attribute with that name is already present
* in the element, its value is changed to be that of the value parameter.
* This value is a simple string, it is not parsed as it is being set. So
* any markup (such as syntax to be recognized as an entity reference) is
* treated as literal text, and needs to be appropriately escaped by the
* implementation when it is written out. In order to assign an attribute
* value that contains entity references, the user must create an
* <code>DOM_Attr</code> node plus any <code>Text</code> and
* <code>EntityReference</code> nodes, build the appropriate subtree, and
* use <code>setAttributeNode</code> to assign it as the value of an
* attribute.
* @param name The name of the attribute to create or alter.
* @param value Value to set in string form.
* @exception DOMException
* INVALID_CHARACTER_ERR: Raised if the specified name contains an
* illegal character.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
*/
void setAttribute(const DOMString &name,
const DOMString &value);
/**
* Adds a new attribute.
*
* If an attribute with that name (<CODE>nodeName</CODE>) is already present
* in the element, it is replaced by the new one.
* @param newAttr The <code>DOM_Attr</code> node to add to the attribute list.
* @return If the <code>newAttr</code> attribute replaces an existing
* attribute, the replaced
* <code>DOM_Attr</code> node is returned, otherwise <code>null</code> is
* returned.
* @exception DOMException
* WRONG_DOCUMENT_ERR: Raised if <code>newAttr</code> was created from a
* different document than the one that created the element.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
* <br>INUSE_ATTRIBUTE_ERR: Raised if <code>newAttr</code> is already an
* attribute of another <code>DOM_Element</code> object. The DOM user must
* explicitly clone <code>DOM_Attr</code> nodes to re-use them in other
* elements.
*/
DOM_Attr setAttributeNode(DOM_Attr newAttr);
//@}
/** @name Functions which modify the Element. */
//@{
/**
* Removes the specified attribute node.
* If the removed <CODE>DOM_Attr</CODE>
* has a default value it is immediately replaced. The replacing attribute
* has the same namespace URI and local name, as well as the original prefix,
* when applicable.
*
* @param oldAttr The <code>DOM_Attr</code> node to remove from the attribute
* list.
* @return The <code>DOM_Attr</code> node that was removed.
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
* <br>NOT_FOUND_ERR: Raised if <code>oldAttr</code> is not an attribute
* of the element.
*/
DOM_Attr removeAttributeNode(DOM_Attr oldAttr);
/**
* Removes an attribute by name.
*
* If the removed attribute
* is known to have a default value, an attribute immediately appears
* containing the default value as well as the corresponding namespace URI,
* local name, and prefix when applicable.<BR>To remove an attribute by local
* name and namespace URI, use the <CODE>removeAttributeNS</CODE> method.
* @param name The name of the attribute to remove.
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
*/
void removeAttribute(const DOMString &name);
//@}
/** @name Functions introduced in DOM Level 2. */
//@{
/**
* Retrieves an attribute value by local name and namespace URI.
*
* @param namespaceURI The <em>namespace URI</em> of
* the attribute to retrieve.
* @param localName The <em>local name</em> of the
* attribute to retrieve.
* @return The <code>DOM_Attr</code> value as a string, or an <CODE>null</CODE> if
* that attribute does not have a specified or default value.
*/
DOMString getAttributeNS(const DOMString &namespaceURI,
const DOMString &localName) const;
/**
* Adds a new attribute. If an attribute with the same
* local name and namespace URI is already present on the element, its prefix
* is changed to be the prefix part of the <CODE>qualifiedName</CODE>, and
* its value is changed to be the <CODE>value</CODE> parameter. This value is
* a simple string, it is not parsed as it is being set. So any markup (such
* as syntax to be recognized as an entity reference) is treated as literal
* text, and needs to be appropriately escaped by the implementation when it
* is written out. In order to assign an attribute value that contains entity
* references, the user must create an <CODE>DOM_Attr</CODE>
* node plus any <CODE>DOM_Text</CODE> and <CODE>DOM_EntityReference</CODE>
* nodes, build the appropriate subtree, and use
* <CODE>setAttributeNodeNS</CODE> or <CODE>setAttributeNode</CODE> to assign
* it as the value of an attribute.
*
* @param namespaceURI The <em>namespace URI</em> of
* the attribute to create or alter.
* @param qualifiedName The <em>qualified name</em> of the
* attribute to create or alter.
* @param value The value to set in string form.
* @exception DOMException
* INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an
* illegal character.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
* <br>
* NAMESPACE_ERR: Raised if the <CODE>qualifiedName</CODE> is
* malformed, if the <CODE>qualifiedName</CODE> has a prefix and the
* <CODE>namespaceURI</CODE> is <CODE>null</CODE> or an empty string,
* if the <CODE>qualifiedName</CODE> has a prefix that is "xml" and the
* <CODE>namespaceURI</CODE> is different from
* "http://www.w3.org/XML/1998/namespace", if the
* <CODE>qualifiedName</CODE> has a prefix that is "xmlns" and the
* <CODE>namespaceURI</CODE> is different from
* "http://www.w3.org/2000/xmlns/", or if the
* <CODE>qualifiedName</CODE> is "xmlns" and the
* <CODE>namespaceURI</CODE> is different from
* "http://www.w3.org/2000/xmlns/".
*/
void setAttributeNS(const DOMString &namespaceURI,
const DOMString &qualifiedName, const DOMString &value);
/**
* Removes an attribute by local name and namespace URI. If the
* removed attribute has a default value it is immediately replaced.
* The replacing attribute has the same namespace URI and local name, as well as
* the original prefix.
*
* @param namespaceURI The <em>namespace URI</em> of
* the attribute to remove.
* @param localName The <em>local name</em> of the
* attribute to remove.
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
*/
void removeAttributeNS(const DOMString &namespaceURI,
const DOMString &localName);
/**
* Retrieves an <code>DOM_Attr</code> node by local name and namespace URI.
*
* @param namespaceURI The <em>namespace URI</em> of
* the attribute to retrieve.
* @param localName The <em>local name</em> of the
* attribute to retrieve.
* @return The <code>DOM_Attr</code> node with the specified attribute local
* name and namespace URI or <code>null</code> if there is no such attribute.
*/
DOM_Attr getAttributeNodeNS(const DOMString &namespaceURI,
const DOMString &localName) const;
/**
* Adds a new attribute.
*
* If an attribute with that local name and namespace URI is already present
* in the element, it is replaced by the new one.
*
* @param newAttr The <code>DOM_Attr</code> node to add to the attribute list.
* @return If the <code>newAttr</code> attribute replaces an existing
* attribute with the same <em>local name</em> and <em>namespace URI</em>,
* the replaced <code>DOM_Attr</code> node is
* returned, otherwise <code>null</code> is returned.
* @exception DOMException
* WRONG_DOCUMENT_ERR: Raised if <code>newAttr</code> was created from a
* different document than the one that created the element.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
* <br>INUSE_ATTRIBUTE_ERR: Raised if <code>newAttr</code> is already an
* attribute of another <code>DOM_Element</code> object. The DOM user must
* explicitly clone <code>DOM_Attr</code> nodes to re-use them in other
* elements.
*/
DOM_Attr setAttributeNodeNS(DOM_Attr newAttr);
/**
* Returns a <code>DOM_NodeList</code> of all the <code>DOM_Element</code>s
* with a given local name and namespace URI in the order in which they
* would be encountered in a preorder traversal of the
* <code>DOM_Document</code> tree, starting from this node.
*
* @param namespaceURI The <em>namespace URI</em> of
* the elements to match on. The special value "*" matches all
* namespaces.
* @param localName The <em>local name</em> of the
* elements to match on. The special value "*" matches all local names.
* @return A new <code>DOM_NodeList</code> object containing all the matched
* <code>DOM_Element</code>s.
*/
DOM_NodeList getElementsByTagNameNS(const DOMString &namespaceURI,
const DOMString &localName) const;
/**
* Returns whether this node (if it is an element) has any attributes.
* @return <code>true</code> if this node has any attributes,
* <code>false</code> otherwise.
*/
bool hasAttributes() const;
/**
* Returns <code>true</code> when an attribute with a given name is
* specified on this element or has a default value, <code>false</code>
* otherwise.
* @param name The name of the attribute to look for.
* @return <code>true</code> if an attribute with the given name is
* specified on this element or has a default value, <code>false</code>
* otherwise.
*/
bool hasAttribute(const DOMString &name) const;
/**
* Returns <code>true</code> when an attribute with a given local name and
* namespace URI is specified on this element or has a default value,
* <code>false</code> otherwise. HTML-only DOM implementations do not
* need to implement this method.
* @param namespaceURI The namespace URI of the attribute to look for.
* @param localName The local name of the attribute to look for.
* @return <code>true</code> if an attribute with the given local name
* and namespace URI is specified or has a default value on this
* element, <code>false</code> otherwise.
* @since DOM Level 2
*/
bool hasAttributeNS(const DOMString &namespaceURI,
const DOMString &localName) const;
//@}
protected:
DOM_Element(ElementImpl *impl);
friend class DOM_Document;
friend class DOM_Attr;
friend class TraverseSchema;
};
#endif
1.1 xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/dom/DOM_Entity.hpp
Index: DOM_Entity.hpp
===================================================================
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2000 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache\@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation, and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com . For more information
* on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
/*
* $Log: DOM_Entity.hpp,v $
* Revision 1.1 2002/10/23 08:21:41 lilantha
* no message
*
* Revision 1.2 2002/02/20 18:17:00 tng
* [Bug 5977] Warnings on generating apiDocs.
*
* Revision 1.1.1.1 2002/02/01 22:21:45 peiyongz
* sane_include
*
* Revision 1.8 2000/09/09 00:11:46 andyh
* Virtual Destructor Patch, submitted by Kirk Wylie
*
* Revision 1.7 2000/04/19 02:26:16 aruna1
* Full support for DOM_EntityReference, DOM_Entity and DOM_DocumentType introduced
*
* Revision 1.6 2000/03/11 02:58:38 chchou
* Fix bug # 18, remove set method of readonly attributes
*
* Revision 1.5 2000/03/02 19:53:55 roddey
* This checkin includes many changes done while waiting for the
* 1.1.0 code to be finished. I can't list them all here, but a list is
* available elsewhere.
*
* Revision 1.4 2000/02/24 20:11:28 abagchi
* Swat for removing Log from API docs
*
* Revision 1.3 2000/02/06 07:47:30 rahulj
* Year 2K copyright swat.
*
* Revision 1.2 2000/01/05 01:16:07 andyh
* DOM Level 2 core, namespace support added.
*
* Revision 1.1.1.1 1999/11/09 01:08:58 twl
* Initial checkin
*
* Revision 1.2 1999/11/08 20:44:17 rahul
* Swat for adding in Product name and CVS comment log variable.
*
*/
#ifndef DOM_Entity_HEADER_GUARD_
#define DOM_Entity_HEADER_GUARD_
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOM_Node.hpp>
class EntityImpl;
/**
* This interface represents an entity, either parsed or unparsed, in an XML
* document.
*
* Note that this models the entity itself not the entity
* declaration. <code>Entity</code> declaration modeling has been left for a
* later Level of the DOM specification.
* <p>The <code>nodeName</code> attribute that is inherited from
* <code>Node</code> contains the name of the entity.
* <p>An XML processor may choose to completely expand entities before the
* structure model is passed to the DOM; in this case there will be no
* <code>EntityReference</code> nodes in the document tree.
*
* <p>Note: the first release of this parser does not create entity
* nodes when reading an XML document. Entities may be
* programatically created using DOM_Document::createEntity().
*/
class CDOM_EXPORT DOM_Entity: public DOM_Node {
public:
/** @name Constructors and assignment operator */
//@{
/**
* Default constructor for DOM_Entity.
*
*/
DOM_Entity();
/**
* Copy constructor.
*
* @param other The object to be copied.
*/
DOM_Entity(const DOM_Entity &other);
/**
* Assignment operator.
*
* @param other The object to be copied.
*/
DOM_Entity & operator = (const DOM_Entity &other);
/**
* Assignment operator. This overloaded variant is provided for
* the sole purpose of setting a DOM_Node reference variable to
* zero. Nulling out a reference variable in this way will decrement
* the reference count on the underlying Node object that the variable
* formerly referenced. This effect is normally obtained when reference
* variable goes out of scope, but zeroing them can be useful for
* global instances, or for local instances that will remain in scope
* for an extended time, when the storage belonging to the underlying
* node needs to be reclaimed.
*
* @param val Only a value of 0, or null, is allowed.
*/
DOM_Entity & operator = (const DOM_NullPtr *val);
//@}
/** @name Destructor. */
//@{
/**
* Destructor for DOM_Entity.
*
*/
~DOM_Entity();
//@}
/** @name Get functions. */
//@{
/**
* The public identifier associated with the entity, if specified.
*
* If the public identifier was not specified, this is <code>null</code>.
*/
DOMString getPublicId() const;
/**
* The system identifier associated with the entity, if specified.
*
* If the system identifier was not specified, this is <code>null</code>.
*/
DOMString getSystemId() const;
/**
* For unparsed entities, the name of the notation for the entity.
*
* For parsed entities, this is <code>null</code>.
*/
DOMString getNotationName() const;
DOM_Node getFirstChild() const;
DOM_Node getLastChild() const;
DOM_NodeList getChildNodes() const;
bool hasChildNodes() const;
DOM_Node getPreviousSibling() const;
DOM_Node getNextSibling() const;
//@}
protected:
DOM_Entity(EntityImpl *impl);
friend class DOM_Document;
};
#endif
1.1 xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/dom/DOM_EntityReference.hpp
Index: DOM_EntityReference.hpp
===================================================================
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2000 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache\@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation, and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com . For more information
* on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
/*
* $Log: DOM_EntityReference.hpp,v $
* Revision 1.1 2002/10/23 08:21:41 lilantha
* no message
*
* Revision 1.2 2002/02/20 18:17:00 tng
* [Bug 5977] Warnings on generating apiDocs.
*
* Revision 1.1.1.1 2002/02/01 22:21:45 peiyongz
* sane_include
*
* Revision 1.5 2000/03/02 19:53:56 roddey
* This checkin includes many changes done while waiting for the
* 1.1.0 code to be finished. I can't list them all here, but a list is
* available elsewhere.
*
* Revision 1.4 2000/02/24 20:11:28 abagchi
* Swat for removing Log from API docs
*
* Revision 1.3 2000/02/06 07:47:30 rahulj
* Year 2K copyright swat.
*
* Revision 1.2 2000/01/05 01:16:07 andyh
* DOM Level 2 core, namespace support added.
*
* Revision 1.1.1.1 1999/11/09 01:08:58 twl
* Initial checkin
*
* Revision 1.2 1999/11/08 20:44:18 rahul
* Swat for adding in Product name and CVS comment log variable.
*
*/
#ifndef DOM_EntityReference_HEADER_GUARD_
#define DOM_EntityReference_HEADER_GUARD_
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOM_Node.hpp>
class EntityReferenceImpl;
/**
* <code>EntityReference</code> nodes will appear in the structure
* model when an entity reference is in the source document, or when the user
* wishes to insert an entity reference.
*
* The expansion of the entity will appear as child nodes of the entity
* reference node. The expansion may be just simple text, or it may
* be more complex, containing additional entity refs.
*
*/
class CDOM_EXPORT DOM_EntityReference: public DOM_Node {
public:
/** @name Constructors and assignment operator */
//@{
/**
* Default constructor for DOM_EntityReference. The resulting object does not
* refer to an actual Entity Reference node; it will compare == to 0, and is similar
* to a null object reference variable in Java. It may subsequently be
* assigned to refer to an actual entity reference node.
* <p>
* New entity reference nodes are created by DOM_Document::createEntityReference().
*
*/
DOM_EntityReference();
/**
* Copy constructor. Creates a new <code>DOM_EntityReference</code> that refers to the
* same underlying node as the original.
*
* @param other The object to be copied.
*/
DOM_EntityReference(const DOM_EntityReference &other);
/**
* Assignment operator.
*
* @param other The object to be copied.
*/
DOM_EntityReference & operator = (const DOM_EntityReference &other);
/**
* Assignment operator. This overloaded variant is provided for
* the sole purpose of setting a DOM_Node reference variable to
* zero. Nulling out a reference variable in this way will decrement
* the reference count on the underlying Node object that the variable
* formerly referenced. This effect is normally obtained when reference
* variable goes out of scope, but zeroing them can be useful for
* global instances, or for local instances that will remain in scope
* for an extended time, when the storage belonging to the underlying
* node needs to be reclaimed.
*
* @param val Only a value of 0, or null, is allowed.
*/
DOM_EntityReference & operator = (const DOM_NullPtr *val);
//@}
/** @name Destructor. */
//@{
/**
* Destructor for DOM_EntityReference. The object being destroyed is the reference
* object, not the underlying entity reference node itself.
*
*/
~DOM_EntityReference();
//@}
protected:
DOM_EntityReference(EntityReferenceImpl *impl);
friend class DOM_Document;
};
#endif
1.1 xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/dom/DOM_NamedNodeMap.hpp
Index: DOM_NamedNodeMap.hpp
===================================================================
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache\@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation, and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com . For more information
* on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
/*
* $Log: DOM_NamedNodeMap.hpp,v $
* Revision 1.1 2002/10/23 08:21:41 lilantha
* no message
*
* Revision 1.3 2002/02/20 18:17:00 tng
* [Bug 5977] Warnings on generating apiDocs.
*
* Revision 1.2 2002/02/04 19:57:15 tng
* Remove the phrase "Experimental".
*
* Revision 1.1.1.1 2002/02/01 22:21:45 peiyongz
* sane_include
*
* Revision 1.13 2000/06/07 22:49:40 andyh
* Memory usage reduction: DOM NamedNodeMaps for attributes are allocated
* only for elements that actually have attributes. By Joe Polastre.
*
* Revision 1.12 2000/03/11 03:19:13 chchou
* Fix bug # 19, add const keyword to API
*
* Revision 1.11 2000/03/02 19:53:56 roddey
* This checkin includes many changes done while waiting for the
* 1.1.0 code to be finished. I can't list them all here, but a list is
* available elsewhere.
*
* Revision 1.10 2000/02/24 20:11:28 abagchi
* Swat for removing Log from API docs
*
* Revision 1.9 2000/02/17 17:47:24 andyh
* Update Doc++ API comments
* NameSpace update to track W3C
* Changes were made by Chih Hsiang Chou
*
* Revision 1.8 2000/02/15 23:17:36 andyh
* Update Doc++ API comments
* NameSpace bugfix and update to track W3C
* Chih Hsiang Chou
*
* Revision 1.7 2000/02/10 20:20:42 abagchi
* Added docs for assignment operators
*
* Revision 1.6 2000/02/10 20:19:24 abagchi
* Added docs for equality operators
*
* Revision 1.5 2000/02/06 07:47:30 rahulj
* Year 2K copyright swat.
*
* Revision 1.4 2000/02/04 01:49:28 aruna1
* TreeWalker and NodeIterator changes
*
* Revision 1.3 2000/01/22 01:38:29 andyh
* Remove compiler warnings in DOM impl classes
*
* Revision 1.2 2000/01/05 01:16:07 andyh
* DOM Level 2 core, namespace support added.
*
* Revision 1.1.1.1 1999/11/09 01:08:59 twl
* Initial checkin
*
* Revision 1.3 1999/11/08 20:44:18 rahul
* Swat for adding in Product name and CVS comment log variable.
*
*/
#ifndef DOM_NamedNodeMap_HEADER_GUARD_
#define DOM_NamedNodeMap_HEADER_GUARD_
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOM_Node.hpp>
class NamedNodeMapImpl;
/**
* <code>NamedNodeMap</code>s are used to
* represent collections of nodes that can be accessed by name.
*
* Note that <code>NamedNodeMap</code> does not inherit from <code>NodeList</code>;
* <code>NamedNodeMap</code>s are not maintained in any particular order.
* Nodes contained in a <code>NamedNodeMap</code> may
* also be accessed by an ordinal index, but this is simply to allow
* convenient enumeration of the contents, and
* does not imply that the DOM specifies an order to these Nodes.
*/
class CDOM_EXPORT DOM_NamedNodeMap {
private:
void *fImpl;
short flagElem;
static const unsigned short NNM_ELEMENT;
static const unsigned short NNM_OTHER;
public:
/** @name Constructors and assignment operator */
//@{
/**
* Default constructor for DOM_NamedNodeMap. The resulting object does not
* refer to an actual DOM_NamedNodeMap node; it will compare == to 0, and is similar
* to a null object reference variable in Java. NamedNopes are instantiated
* by these methods: DOM_Node::getAttributes, DOM_DocumentType::getEntities
* andDOM_DocumentType::getNotations
*
*/
DOM_NamedNodeMap();
/**
* Copy constructor. Creates a new <code>DOM_NamedNodeMap</code> reference object
* that refers to the same underlying NamedNodeMap as the original.
*
* @param other The object to be copied.
*/
DOM_NamedNodeMap(const DOM_NamedNodeMap &other);
/**
* Assignment operator.
*
* @param other The object to be copied.
*/
DOM_NamedNodeMap & operator = (const DOM_NamedNodeMap &other);
/**
* Assignment operator.
*
* @param other The object to be copied.
*/
DOM_NamedNodeMap & operator = (const DOM_NullPtr *other);
//@}
/** @name Destructor. */
//@{
/**
* Destructor for DOM_NamedNodeMap. The object being destroyed is the reference
* object, not the underlying NamedNodeMap itself.
*
* <p>Like most other DOM types in this implementation, memory management
* of named node maps is automatic. Instances of DOM_NamedNodeMap function
* as references to an underlying heap based implementation object,
* and should never be explicitly new-ed or deleted in application code, but
* should appear only as local variables or function parameters.
*
*/
~DOM_NamedNodeMap();
//@}
/** @Comparisons. */
//@{
/**
* Test whether this NamedNodeMap reference refers to the same underlying
* named node map as the other reference object. This does not
* compare the contents of two different objects.
*
* @param other The value to be compared
* @return Returns true if the underlying named node map is same
*/
bool operator == (const DOM_NamedNodeMap &other) const;
/**
* Test whether this NamedNodeMap reference refers to a different underlying
* named node map as the other reference object. This does not
* compare the contents of two different objects.
*
* @param other The value to be compared
* @return Returns true if the underlying named node map is different
*/
bool operator != (const DOM_NamedNodeMap &other) const;
/**
* Use this comparison operator to test whether a Named Node Map reference
* is null.
*
* @param p The value to be compared, which must be 0 or null.
* @return Returns true if the named node map is null
*/
bool operator == (const DOM_NullPtr *p) const;
/**
* Use this comparison operator to test whether a Named Node Map reference
* is not null.
*
* @param p The value to be compared, which must not be 0 or null.
* @return Returns true if the named node map is not null
*/
bool operator != (const DOM_NullPtr *p) const;
//@}
/** @name Set functions. */
//@{
/**
* Adds a node using its <code>nodeName</code> attribute.
*
* <br>As the <code>nodeName</code> attribute is used to derive the name
* which the node must be stored under, multiple nodes of certain types
* (those that have a "special" string value) cannot be stored as the names
* would clash. This is seen as preferable to allowing nodes to be aliased.
* @param arg A node to store in a named node map. The node will later be
* accessible using the value of the <code>nodeName</code> attribute of
* the node. If a node with that name is already present in the map, it
* is replaced by the new one.
* @return If the new <code>Node</code> replaces an existing node the
* replaced <code>Node</code> is returned,
* otherwise <code>null</code> is returned.
* @exception DOMException
* WRONG_DOCUMENT_ERR: Raised if <code>arg</code> was created from a
* different document than the one that created the
* <code>NamedNodeMap</code>.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this
* <code>NamedNodeMap</code> is readonly.
* <br>INUSE_ATTRIBUTE_ERR: Raised if <code>arg</code> is an
* <code>Attr</code> that is already an attribute of another
* <code>Element</code> object. The DOM user must explicitly clone
* <code>Attr</code> nodes to re-use them in other elements.
*/
DOM_Node setNamedItem(DOM_Node arg);
//@}
/** @name Get functions. */
//@{
/**
* Returns the <code>index</code>th item in the map.
*
* If <code>index</code>
* is greater than or equal to the number of nodes in the map, this returns
* <code>null</code>.
* @param index Index into the map.
* @return The node at the <code>index</code>th position in the
* <code>NamedNodeMap</code>, or <code>null</code> if that is not a valid
* index.
*/
DOM_Node item(unsigned int index) const;
/**
* Retrieves a node specified by name.
*
* @param name The <code>nodeName</code> of a node to retrieve.
* @return A <code>DOM_Node</code> (of any type) with the specified <code>nodeName</code>, or
* <code>null</code> if it does not identify any node in
* the map.
*/
DOM_Node getNamedItem(const DOMString &name) const;
/**
* The number of nodes in the map.
*
* The range of valid child node indices is
* 0 to <code>length-1</code> inclusive.
*/
unsigned int getLength() const;
//@}
/** @name Functions to change the node collection. */
//@{
/**
* Removes a node specified by name.
*
* If the removed node is an
* <code>Attr</code> with a default value it is immediately replaced.
* @param name The <code>nodeName</code> of a node to remove.
* @return The node removed from the map or <code>null</code> if no node
* with such a name exists.
* @exception DOMException
* NOT_FOUND_ERR: Raised if there is no node named <code>name</code> in
* the map.
* <br>
* NO_MODIFICATION_ALLOWED_ERR: Raised if this <code>NamedNodeMap</code>
* is readonly.
*/
DOM_Node removeNamedItem(const DOMString &name);
//@}
/** @name Functions introduced in DOM Level 2. */
//@{
/**
* Retrieves a node specified by local name and namespace URI.
*
* @param namespaceURI The <em>namespace URI</em> of
* the node to retrieve.
* @param localName The <em>local name</em> of the node to retrieve.
* @return A <code>DOM_Node</code> (of any type) with the specified
* local name and namespace URI, or <code>null</code> if they do not
* identify any node in the map.
*/
DOM_Node getNamedItemNS(const DOMString &namespaceURI,
const DOMString &localName);
/**
* Adds a node using its <CODE>namespaceURI</CODE> and <CODE>localName</CODE>.
*
* @param arg A node to store in a named node map. The node will later be
* accessible using the value of the <CODE>namespaceURI</CODE> and
* <CODE>localName</CODE> attribute of the node. If a node with those
* namespace URI and local name is already present in the map, it is
* replaced by the new one.
* @return If the new <code>DOM_Node</code> replaces an existing node the
* replaced <code>DOM_Node</code> is returned,
* otherwise <code>null</code> is returned.
* @exception DOMException
* WRONG_DOCUMENT_ERR: Raised if <code>arg</code> was created from a
* different document than the one that created the
* <code>DOM_NamedNodeMap</code>.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this
* <code>vNamedNodeMap</code> is readonly.
* <br>INUSE_ATTRIBUTE_ERR: Raised if <code>arg</code> is an
* <code>DOM_Attr</code> that is already an attribute of another
* <code>DOM_Element</code> object. The DOM user must explicitly clone
* <code>DOM_Attr</code> nodes to re-use them in other elements.
*/
DOM_Node setNamedItemNS(DOM_Node arg);
/**
* Removes a node specified by local name and namespace URI.
*
* @param namespaceURI The <em>namespace URI</em> of
* the node to remove.
* @param localName The <em>local name</em> of the
* node to remove. When this <code>DOM_NamedNodeMap</code> contains the
* attributes attached to an element, as returned by the attributes
* attribute of the <code>DOM_Node</code> interface, if the removed
* attribute is known to have a default value, an attribute
* immediately appears containing the default value
* as well as the corresponding namespace URI, local name, and prefix.
* @return The node removed from the map if a node with such a local name
* and namespace URI exists.
* @exception DOMException
* NOT_FOUND_ERR: Raised if there is no node named <code>name</code> in
* the map.
* <br>
* NO_MODIFICATION_ALLOWED_ERR: Raised if this <code>DOM_NamedNodeMap</code>
* is readonly.
*/
DOM_Node removeNamedItemNS(const DOMString &namespaceURI,
const DOMString &localName);
//@}
protected:
DOM_NamedNodeMap(NamedNodeMapImpl *impl);
DOM_NamedNodeMap(NodeImpl *impl);
friend class DOM_DocumentType;
friend class DOM_Node;
};
#endif
1.1 xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/dom/DOM_Node.hpp
Index: DOM_Node.hpp
===================================================================
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache\@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation, and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com . For more information
* on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
/*
* $Id: DOM_Node.hpp,v 1.1 2002/10/23 08:21:41 lilantha Exp $
*/
#ifndef DOM_Node_HEADER_GUARD_
#define DOM_Node_HEADER_GUARD_
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOMString.hpp>
class DOM_NodeList;
class DOM_NamedNodeMap;
class DOM_Document;
class NodeImpl;
class DOM_NullPtr; // A dummy class, with no implementation, that is
// used as in overloaded functions as a way to
// pass 0 or null.
/**
* The <code>Node</code> interface is the primary datatype for the entire
* Document Object Model.
*
* It represents a single node in the document tree.
* While all objects implementing the <code>Node</code> interface expose
* methods for dealing with children, not all objects implementing the
* <code>Node</code> interface may have children. For example,
* <code>Text</code> nodes may not have children, and adding children to such
* nodes results in a <code>DOMException</code> being raised.
* <p>The attributes <code>nodeName</code>, <code>nodeValue</code> and
* <code>attributes</code> are included as a mechanism to get at node
* information without casting down to the specific derived interface. In
* cases where there is no obvious mapping of these attributes for a specific
* <code>nodeType</code> (e.g., <code>nodeValue</code> for an Element or
* <code>attributes</code> for a Comment), this returns <code>null</code>.
* Note that the specialized interfaces may contain additional and more
* convenient mechanisms to get and set the relevant information.
*/
class CDOM_EXPORT DOM_Node {
public:
/** @name Constructors and assignment operators */
//@{
/**
* Default constructor for DOM_Node. The resulting object does not
* refer to an actual node; it will compare == to 0, and is similar
* to a null object reference variable in Java. It may subsequently be
* assigned to refer to an actual node. "Acutal Nodes" will always
* be of some derived type, such as Element or Attr.
*
*/
DOM_Node();
/**
* Copy constructor.
*
* @param other The object to be copied.
*/
DOM_Node(const DOM_Node &other);
/**
* Assignment operator.
*
* @param other The source to be assigned.
*/
DOM_Node & operator = (const DOM_Node &other);
/**
* Assignment operator. This overloaded variant is provided for
* the sole purpose of setting a DOM_Node reference variable to
* zero. Nulling out a reference variable in this way will decrement
* the reference count on the underlying Node object that the variable
* formerly referenced. This effect is normally obtained when reference
* variable goes out of scope, but zeroing them can be useful for
* global instances, or for local instances that will remain in scope
* for an extended time, when the storage belonging to the underlying
* node needs to be reclaimed.
*
* @param val Only a value of 0, or null, is allowed.
*/
DOM_Node & operator = (const DOM_NullPtr *val);
//@}
/** @name Destructor. */
//@{
/**
* Destructor for DOM_Node. The object being destroyed is the reference
* object, not the underlying node itself.
*
*/
~DOM_Node();
//@}
/** @name Equality and Inequality operators. */
//@{
/**
* The equality operator. This compares to references to nodes, and
* returns true if they both refer to the same underlying node. It
* is exactly analogous to Java's operator == on object reference
* variables. This operator can not be used to compare the values
* of two different nodes in the document tree.
*
* @param other The object reference with which <code>this</code> object is compared
* @returns True if both <code>DOM_Node</code>s refer to the same
* actual node, or are both null; return false otherwise.
*/
bool operator == (const DOM_Node & other)const;
/**
* Compare with a pointer. Intended only to allow a convenient
* comparison with null.
*
*/
bool operator == (const DOM_NullPtr *other) const;
/**
* The inequality operator. See operator ==.
*
*/
bool operator != (const DOM_Node & other) const;
/**
* Compare with a pointer. Intended only to allow a convenient
* comparison with null.
*
*/
bool operator != (const DOM_NullPtr * other) const;
enum NodeType {
ELEMENT_NODE = 1,
ATTRIBUTE_NODE = 2,
TEXT_NODE = 3,
CDATA_SECTION_NODE = 4,
ENTITY_REFERENCE_NODE = 5,
ENTITY_NODE = 6,
PROCESSING_INSTRUCTION_NODE = 7,
COMMENT_NODE = 8,
DOCUMENT_NODE = 9,
DOCUMENT_TYPE_NODE = 10,
DOCUMENT_FRAGMENT_NODE = 11,
NOTATION_NODE = 12,
XML_DECL_NODE = 13
};
//@}
/** @name Get functions. */
//@{
/**
* The name of this node, depending on its type; see the table above.
*/
DOMString getNodeName() const;
/**
* Gets the value of this node, depending on its type.
*
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
* @exception DOMException
* DOMSTRING_SIZE_ERR: Raised when it would return more characters than
* fit in a <code>DOMString</code> variable on the implementation
* platform.
*/
DOMString getNodeValue() const;
/**
* An enum value representing the type of the underlying object.
*/
short getNodeType() const;
/**
* Gets the parent of this node.
*
* All nodes, except <code>Document</code>,
* <code>DocumentFragment</code>, and <code>Attr</code> may have a parent.
* However, if a node has just been created and not yet added to the tree,
* or if it has been removed from the tree, a <code>null</code> DOM_Node
* is returned.
*/
DOM_Node getParentNode() const;
/**
* Gets a <code>NodeList</code> that contains all children of this node.
*
* If there
* are no children, this is a <code>NodeList</code> containing no nodes.
* The content of the returned <code>NodeList</code> is "live" in the sense
* that, for instance, changes to the children of the node object that
* it was created from are immediately reflected in the nodes returned by
* the <code>NodeList</code> accessors; it is not a static snapshot of the
* content of the node. This is true for every <code>NodeList</code>,
* including the ones returned by the <code>getElementsByTagName</code>
* method.
*/
DOM_NodeList getChildNodes() const;
/**
* Gets the first child of this node.
*
* If there is no such node, this returns <code>null</code>.
*/
DOM_Node getFirstChild() const;
/**
* Gets the last child of this node.
*
* If there is no such node, this returns <code>null</code>.
*/
DOM_Node getLastChild() const;
/**
* Gets the node immediately preceding this node.
*
* If there is no such node, this returns <code>null</code>.
*/
DOM_Node getPreviousSibling() const;
/**
* Gets the node immediately following this node.
*
* If there is no such node, this returns <code>null</code>.
*/
DOM_Node getNextSibling() const;
/**
* Gets a <code>NamedNodeMap</code> containing the attributes of this node (if it
* is an <code>Element</code>) or <code>null</code> otherwise.
*/
DOM_NamedNodeMap getAttributes() const;
/**
* Gets the <code>DOM_Document</code> object associated with this node.
*
* This is also
* the <code>DOM_Document</code> object used to create new nodes. When this
* node is a <code>DOM_Document</code> or a <code>DOM_DocumentType</code>
* which is not used with any <code>DOM_Document</code> yet, this is
* <code>null</code>.
*
*/
DOM_Document getOwnerDocument() const;
/**
* Return the user data pointer.
*
* User data allows application programs
* to attach extra data to DOM nodes, and can be set using the
* function <code>DOM_Node::setUserData(p)</code>.
* @return The user data pointer.
*/
void *getUserData() const;
//@}
/** @name Cloning function. */
//@{
/**
* Returns a duplicate of this node.
*
* This function serves as a generic copy constructor for nodes.
*
* The duplicate node has no parent (
* <code>parentNode</code> returns <code>null</code>.).
* <br>Cloning an <code>Element</code> copies all attributes and their
* values, including those generated by the XML processor to represent
* defaulted attributes, but this method does not copy any text it contains
* unless it is a deep clone, since the text is contained in a child
* <code>Text</code> node. Cloning any other type of node simply returns a
* copy of this node.
* @param deep If <code>true</code>, recursively clone the subtree under the
* specified node; if <code>false</code>, clone only the node itself (and
* its attributes, if it is an <code>Element</code>).
* @return The duplicate node.
*/
DOM_Node cloneNode(bool deep) const;
//@}
/** @name Functions to modify the DOM Node. */
//@{
/**
* Inserts the node <code>newChild</code> before the existing child node
* <code>refChild</code>.
*
* If <code>refChild</code> is <code>null</code>,
* insert <code>newChild</code> at the end of the list of children.
* <br>If <code>newChild</code> is a <code>DocumentFragment</code> object,
* all of its children are inserted, in the same order, before
* <code>refChild</code>. If the <code>newChild</code> is already in the
* tree, it is first removed. Note that a <code>DOM_Node</code> that
* has never been assigned to refer to an actual node is == null.
* @param newChild The node to insert.
* @param refChild The reference node, i.e., the node before which the new
* node must be inserted.
* @return The node being inserted.
* @exception DOMException
* HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
* allow children of the type of the <code>newChild</code> node, or if
* the node to insert is one of this node's ancestors.
* <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created
* from a different document than the one that created this node.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node or the node being
* inserted is readonly.
* <br>NOT_FOUND_ERR: Raised if <code>refChild</code> is not a child of
* this node.
*/
DOM_Node insertBefore(const DOM_Node &newChild,
const DOM_Node &refChild);
/**
* Replaces the child node <code>oldChild</code> with <code>newChild</code>
* in the list of children, and returns the <code>oldChild</code> node.
*
* If <CODE>newChild</CODE> is a <CODE>DOM_DocumentFragment</CODE> object,
* <CODE>oldChild</CODE> is replaced by all of the <CODE>DOM_DocumentFragment</CODE>
* children, which are inserted in the same order.
*
* If the <code>newChild</code> is already in the tree, it is first removed.
* @param newChild The new node to put in the child list.
* @param oldChild The node being replaced in the list.
* @return The node replaced.
* @exception DOMException
* HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
* allow children of the type of the <code>newChild</code> node, or it
* the node to put in is one of this node's ancestors.
* <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created
* from a different document than the one that created this node.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node or the new node is readonly.
* <br>NOT_FOUND_ERR: Raised if <code>oldChild</code> is not a child of
* this node.
*/
DOM_Node replaceChild(const DOM_Node &newChild,
const DOM_Node &oldChild);
/**
* Removes the child node indicated by <code>oldChild</code> from the list
* of children, and returns it.
*
* @param oldChild The node being removed.
* @return The node removed.
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
* <br>NOT_FOUND_ERR: Raised if <code>oldChild</code> is not a child of
* this node.
*/
DOM_Node removeChild(const DOM_Node &oldChild);
/**
* Adds the node <code>newChild</code> to the end of the list of children of
* this node.
*
* If the <code>newChild</code> is already in the tree, it is
* first removed.
* @param newChild The node to add.If it is a <code>DocumentFragment</code>
* object, the entire contents of the document fragment are moved into
* the child list of this node
* @return The node added.
* @exception DOMException
* HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
* allow children of the type of the <code>newChild</code> node, or if
* the node to append is one of this node's ancestors.
* <br>WRONG_DOCUMENT_ERR: Raised if <code>newChild</code> was created
* from a different document than the one that created this node.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node or the node being
* appended is readonly.
*/
DOM_Node appendChild(const DOM_Node &newChild);
//@}
/** @name Query functions. */
//@{
/**
* This is a convenience method to allow easy determination of whether a
* node has any children.
*
* @return <code>true</code> if the node has any children,
* <code>false</code> if the node has no children.
*/
bool hasChildNodes() const;
/**
* Test whether this node is null.
*
* This C++ class, <code>DOM_Node<code>
* functions much like an object reference to an underlying Node, and
* this function tests for that reference being null. Several DOM
* APIs, <code>Node.getNextSibling()</code> for example, can return null, and
* this function is used to test for that condition.
*
* <p>Operator == provides another way to perform this null test on a
* DOM_Node.
*/
bool isNull() const;
//@}
/** @name Set functions. */
//@{
/**
* Sets the value of the node.
*
* Any node which can have a nodeValue (@see getNodeValue) will
* also accept requests to set it to a string. The exact response to
* this varies from node to node -- Attribute, for example, stores
* its values in its children and has to replace them with a new Text
* holding the replacement value.
*
* For most types of Node, value is null and attempting to set it
* will throw DOMException(NO_MODIFICATION_ALLOWED_ERR). This will
* also be thrown if the node is read-only.
*/
void setNodeValue(const DOMString &nodeValue);
/**
* Set the user data for a node.
*
* User data allows application programs
* to attach extra data to DOM nodes, and can be retrieved using the
* function <code>DOM_Node::getUserData(p)</code>.
* <p>
* Deletion of the user data remains the responsibility of the
* application program; it will not be automatically deleted when
* the nodes themselves are reclaimed.
*
* <p> Because DOM_Node is not designed to be subclassed, userdata
* provides an alternative means for extending the the information
* kept with nodes by an application program.
*
* @param p The pointer to be kept with the node.
*/
void setUserData(void *p);
//@}
/** @name Functions introduced in DOM Level 2. */
//@{
/**
* Puts all <CODE>DOM_Text</CODE>
* nodes in the full depth of the sub-tree underneath this <CODE>DOM_Node</CODE>,
* including attribute nodes, into a "normal" form where only markup (e.g.,
* tags, comments, processing instructions, CDATA sections, and entity
* references) separates <CODE>DOM_Text</CODE>
* nodes, i.e., there are neither adjacent <CODE>DOM_Text</CODE>
* nodes nor empty <CODE>DOM_Text</CODE>
* nodes. This can be used to ensure that the DOM view of a document is the
* same as if it were saved and re-loaded, and is useful when operations
* (such as XPointer lookups) that depend on a particular document tree
* structure are to be used.
* <P><B>Note:</B> In cases where the document contains <CODE>DOM_CDATASections</CODE>,
* the normalize operation alone may not be sufficient, since XPointers do
* not differentiate between <CODE>DOM_Text</CODE>
* nodes and <CODE>DOM_CDATASection</CODE>
* nodes.</P>
*
*/
void normalize();
/**
* Tests whether the DOM implementation implements a specific
* feature and that feature is supported by this node.
*
* @param feature The string of the feature to test. This is the same
* name as what can be passed to the method <code>hasFeature</code> on
* <code>DOM_DOMImplementation</code>.
* @param version This is the version number of the feature to test. In
* Level 2, version 1, this is the string "2.0". If the version is not
* specified, supporting any version of the feature will cause the
* method to return <code>true</code>.
* @return Returns <code>true</code> if the specified feature is supported
* on this node, <code>false</code> otherwise.
*/
bool isSupported(const DOMString &feature,
const DOMString &version) const;
/**
* Get the <em>namespace URI</em> of
* this node, or <code>null</code> if it is unspecified.
* <p>
* This is not a computed value that is the result of a namespace lookup
* based on an examination of the namespace declarations in scope. It is
* merely the namespace URI given at creation time.
* <p>
* For nodes of any type other than <CODE>ELEMENT_NODE</CODE> and
* <CODE>ATTRIBUTE_NODE</CODE> and nodes created with a DOM Level 1 method,
* such as <CODE>createElement</CODE> from the <CODE>DOM_Document</CODE>
* interface, this is always <CODE>null</CODE>.
*
*/
DOMString getNamespaceURI() const;
/**
* Get the <em>namespace prefix</em>
* of this node, or <code>null</code> if it is unspecified.
*
*/
DOMString getPrefix() const;
/**
* Returns the local part of the <em>qualified name</em> of this node.
* <p>
* For nodes created with a DOM Level 1 method, such as
* <code>createElement</code> from the <code>DOM_Document</code> interface,
* it is null.
*
*/
DOMString getLocalName() const;
/**
* Set the <em>namespace prefix</em> of this node.
* <p>
* Note that setting this attribute, when permitted, changes
* the <CODE>nodeName</CODE> attribute, which holds the <EM>qualified
* name</EM>, as well as the <CODE>tagName</CODE> and <CODE>name</CODE>
* attributes of the <CODE>DOM_Element</CODE> and <CODE>DOM_Attr</CODE>
* interfaces, when applicable.
* <p>
* Note also that changing the prefix of an
* attribute, that is known to have a default value, does not make a new
* attribute with the default value and the original prefix appear, since the
* <CODE>namespaceURI</CODE> and <CODE>localName</CODE> do not change.
*
* @param prefix The prefix of this node.
* @exception DOMException
* INVALID_CHARACTER_ERR: Raised if the specified prefix contains
* an illegal character.
* <br>
* NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
* <br>
* NAMESPACE_ERR: Raised if the specified <CODE>prefix</CODE> is
* malformed, if the <CODE>namespaceURI</CODE> of this node is
* <CODE>null</CODE>, if the specified prefix is "xml" and the
* <CODE>namespaceURI</CODE> of this node is different from
* "http://www.w3.org/XML/1998/namespace", if this node is an attribute
* and the specified prefix is "xmlns" and the
* <CODE>namespaceURI</CODE> of this node is different from
* "http://www.w3.org/2000/xmlns/", or if this node is an attribute and
* the <CODE>qualifiedName</CODE> of this node is "xmlns".
*/
void setPrefix(const DOMString &prefix);
/**
* Returns whether this node (if it is an element) has any attributes.
* @return <code>true</code> if this node has any attributes,
* <code>false</code> otherwise.
*/
bool hasAttributes() const;
//@}
protected:
NodeImpl *fImpl;
DOM_Node(NodeImpl *);
friend class DOM_Document;
friend class DocumentImpl;
friend class TreeWalkerImpl;
friend class NodeIteratorImpl;
friend class DOM_NamedNodeMap;
friend class DOM_NodeList;
friend class DOMParser;
friend class DOM_Entity;
friend class RangeImpl;
friend class CharacterDataImpl;
friend class XUtil;
};
#endif
1.1 xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/dom/DOM_NodeFilter.hpp
Index: DOM_NodeFilter.hpp
===================================================================
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache\@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation, and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com . For more information
* on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
/*
* $Log: DOM_NodeFilter.hpp,v $
* Revision 1.1 2002/10/23 08:21:41 lilantha
* no message
*
* Revision 1.2 2002/02/04 19:57:15 tng
* Remove the phrase "Experimental".
*
* Revision 1.1.1.1 2002/02/01 22:21:46 peiyongz
* sane_include
*
* Revision 1.10 2000/10/20 22:03:04 andyh
* DOM NodeFileter - define values for FilterAction enum to match those in the DOM spec.
*
* Revision 1.9 2000/05/11 00:07:38 abagchi
* Removed tables. It was confusing doxygen
*
* Revision 1.8 2000/03/11 03:19:13 chchou
* Fix bug # 19, add const keyword to API
*
* Revision 1.7 2000/02/24 20:11:28 abagchi
* Swat for removing Log from API docs
*
* Revision 1.6 2000/02/17 17:47:25 andyh
* Update Doc++ API comments
* NameSpace update to track W3C
* Changes were made by Chih Hsiang Chou
*
* Revision 1.5 2000/02/15 23:17:37 andyh
* Update Doc++ API comments
* NameSpace bugfix and update to track W3C
* Chih Hsiang Chou
*
* Revision 1.4 2000/02/10 21:47:12 abagchi
* Added API docs
*
* Revision 1.3 2000/02/06 07:47:30 rahulj
* Year 2K copyright swat.
*
* Revision 1.2 2000/02/04 01:49:28 aruna1
* TreeWalker and NodeIterator changes
*
* Revision 1.1.1.1 1999/11/09 01:09:00 twl
* Initial checkin
*
* Revision 1.2 1999/11/08 20:44:19 rahul
* Swat for adding in Product name and CVS comment log variable.
*
*/
// DOM_NodeFilter.h: interface for the DOM_NodeFilter class.
//
//////////////////////////////////////////////////////////////////////
#ifndef DOM_NodeFilter_HEADER_GUARD_
#define DOM_NodeFilter_HEADER_GUARD_
#include "DOM_Node.hpp"
class NodeFilterImpl;
/**
* Filters are objects that know how to "filter out" nodes. If a
* <code>DOM_NodeIterator</code> or <code>DOM_TreeWalker</code> is given a
* filter, it applies the filter before it returns the next node.
*
* If the filter says to accept the node, the iterator returns it; otherwise, the
* iterator looks for the next node and pretends that the node that was rejected
* was not there.
*
* The DOM does not provide any filters. Filter is just an interface that users can
* implement to provide their own filters.
*
* Filters do not need to know how to iterate, nor do they need to know anything
* about the data structure that is being iterated. This makes it very easy to write
* filters, since the only thing they have to know how to do is evaluate a single node.
* One filter may be used with a number of different kinds of iterators, encouraging
* code reuse.
*
*/
class CDOM_EXPORT DOM_NodeFilter
{
public:
/** @name Enumerators for Node Filter */
//@{
/*
* <table><tr><td>FILTER_ACCEPT</td>
* <td>Accept the node. Navigation methods defined for
* NodeIterator or TreeWalker will return this node.</td>
* </tr>
* <tr><td>
* FILTER_REJECT</td>
* <td>Reject the node. Navigation methods defined for
* NodeIterator or TreeWalker will not return this
* node. For TreeWalker, the children of this node will
* also be rejected. Iterators treat this as a synonym
* for FILTER_SKIP.</td>
* </tr>
* <tr><td>FILTER_SKIP</td>
* <td>Reject the node. Navigation methods defined for
* NodeIterator or TreeWalker will not return this
* node. For both NodeIterator and Treewalker, the
* children of this node will still be considered.</td>
* </tr>
* </table>
*
*/
enum FilterAction {FILTER_ACCEPT = 1,
FILTER_REJECT = 2,
FILTER_SKIP = 3};
enum ShowType {
SHOW_ALL = 0x0000FFFF,
SHOW_ELEMENT = 0x00000001,
SHOW_ATTRIBUTE = 0x00000002,
SHOW_TEXT = 0x00000004,
SHOW_CDATA_SECTION = 0x00000008,
SHOW_ENTITY_REFERENCE = 0x00000010,
SHOW_ENTITY = 0x00000020,
SHOW_PROCESSING_INSTRUCTION = 0x00000040,
SHOW_COMMENT = 0x00000080,
SHOW_DOCUMENT = 0x00000100,
SHOW_DOCUMENT_TYPE = 0x00000200,
SHOW_DOCUMENT_FRAGMENT = 0x00000400,
SHOW_NOTATION = 0x00000800
};
//@}
/** @name Constructors */
//@{
/**
* Default constructor for DOM_NodeFilter.
*/
DOM_NodeFilter();
//@}
/** @name Destructor. */
//@{
/**
* Destructor for DOM_NodeFilter.
*/
virtual ~DOM_NodeFilter();
//@}
/** @name Test function. */
//@{
/**
* Test whether a specified node is visible in the logical view of a DOM_TreeWalker
* or DOM_NodeIterator. This function will be called by the implementation of
* DOM_TreeWalker and DOM_NodeIterator; it is not intended to be called directly from user
* code.
*
* @param node The node to check to see if it passes the filter or not.
* @return A constant to determine whether the node is accepted, rejected, or skipped.
*/
virtual short acceptNode (const DOM_Node &node) const =0;
//@}
private:
DOM_NodeFilter(const DOM_NodeFilter &other);
DOM_NodeFilter & operator = (const DOM_NodeFilter &other);
bool operator == (const DOM_NodeFilter &other) const;
bool operator != (const DOM_NodeFilter &other) const;
};
#endif
1.1 xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/dom/DOM_NodeIterator.hpp
Index: DOM_NodeIterator.hpp
===================================================================
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache\@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation, and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com . For more information
* on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
/*
* $Log: DOM_NodeIterator.hpp,v $
* Revision 1.1 2002/10/23 08:21:41 lilantha
* no message
*
* Revision 1.3 2002/02/20 18:17:00 tng
* [Bug 5977] Warnings on generating apiDocs.
*
* Revision 1.2 2002/02/04 20:03:48 tng
* Add DOM Level missing functions:
* 1. NodeIterator::getRoot
* 2. TreeWalker::getRoot
* 3. Element::hasAttribute
* 4. Element::hasAttributeNS
* 5. Node::hasAttributes
* 6. Node::isSupported
*
* Revision 1.1.1.1 2002/02/01 22:21:46 peiyongz
* sane_include
*
* Revision 1.9 2000/02/17 17:47:25 andyh
* Update Doc++ API comments
* NameSpace update to track W3C
* Changes were made by Chih Hsiang Chou
*
* Revision 1.8 2000/02/16 19:39:38 aruna1
* API Doc++ changes in
*
* Revision 1.7 2000/02/15 23:17:37 andyh
* Update Doc++ API comments
* NameSpace bugfix and update to track W3C
* Chih Hsiang Chou
*
* Revision 1.6 2000/02/11 18:14:11 abagchi
* Fixed doc++ bugs
*
* Revision 1.5 2000/02/11 03:01:04 abagchi
* Made protected method public to compile, must be fixed later
*
* Revision 1.4 2000/02/10 23:38:05 abagchi
* Added API docs
*
* Revision 1.3 2000/02/06 07:47:30 rahulj
* Year 2K copyright swat.
*
* Revision 1.2 2000/02/04 01:49:28 aruna1
* TreeWalker and NodeIterator changes
*
* Revision 1.3 1999/11/08 20:44:20 rahul
* Swat for adding in Product name and CVS comment log variable.
*
* Revision 1.1.1.1 1999/11/09 01:09:01 twl
* Initial checkin
*
*/
#ifndef DOM_NodeIterator_HEADER_GUARD_
#define DOM_NodeIterator_HEADER_GUARD_
#include "DOM_NodeFilter.hpp"
#include "DOM_Node.hpp"
class NodeIteratorImpl;
/**
* NodeIterators are used to step through a set of nodes
* e.g. the set of nodes in a NodeList, the document subtree governed by
* a particular node, the results of a query, or any other set of nodes.
* The set of nodes to be iterated is determined by the implementation
* of the NodeIterator. DOM Level 2 specifies a single NodeIterator
* implementation for document-order traversal of a document
* subtree. Instances of these iterators are created by calling
* <code>DocumentTraversal.createNodeIterator()</code>.
*
*/
class CDOM_EXPORT DOM_NodeIterator
{
public:
/** @name Constructors and assignment operator */
//@{
/**
* Default constructor.
*/
DOM_NodeIterator ();
/**
* Copy constructor.
*
* @param other The object to be copied.
*/
DOM_NodeIterator(const DOM_NodeIterator &other);
/**
* Assignment operator.
*
* @param other The object to be copied.
*/
DOM_NodeIterator & operator = (const DOM_NodeIterator &other);
/**
* Assignment operator. This overloaded variant is provided for
* the sole purpose of setting a DOM_NodeIterator to null.
*
* @param val Only a value of 0, or null, is allowed.
*/
DOM_NodeIterator & operator = (const DOM_NullPtr *val);
//@}
/** @name Destructor. */
//@{
/**
* Destructor for DOM_NodeIterator.
*/
~DOM_NodeIterator();
//@}
/** @name Equality and Inequality operators. */
//@{
/**
* The equality operator.
*
* @param other The object reference with which <code>this</code> object is compared
* @returns True if both <code>DOM_NodeIterator</code>s refer to the same
* actual node, or are both null; return false otherwise.
*/
bool operator == (const DOM_NodeIterator & other)const;
/**
* Compare with a pointer. Intended only to allow a convenient
* comparison with null.
*/
bool operator == (const DOM_NullPtr *other) const;
/**
* The inequality operator. See operator ==.
*/
bool operator != (const DOM_NodeIterator & other) const;
/**
* Compare with a pointer. Intended only to allow a convenient
* comparison with null.
*
*/
bool operator != (const DOM_NullPtr * other) const;
//@}
/** @name Get functions. */
//@{
/**
* The root node of the <code>NodeIterator</code>, as specified when it
* was created.
*/
DOM_Node getRoot();
/**
* Return which node types are presented via the iterator.
* The available set of constants is defined in the DOM_NodeFilter interface.
*
*/
unsigned long getWhatToShow();
/**
* Return The filter used to screen nodes.
*
*/
DOM_NodeFilter* getFilter();
/**
* Return the expandEntityReferences flag.
* The value of this flag determines whether the children of entity reference
* nodes are visible to the DOM_NodeFilter. If false, they will be skipped over.
*
*/
bool getExpandEntityReferences();
/**
* Returns the next node in the set and advances the position of the iterator
* in the set. After a DOM_NodeIterator is created, the first call to nextNode()
* returns the first node in the set.
*
* @exception DOMException
* INVALID_STATE_ERR: Raised if this method is called after the
* <code>detach</code> method was invoked.
*/
DOM_Node nextNode();
/**
* Returns the previous node in the set and moves the position of the iterator
* backwards in the set.
*
* @exception DOMException
* INVALID_STATE_ERR: Raised if this method is called after the
* <code>detach</code> method was invoked.
*/
DOM_Node previousNode();
//@}
/** @name Detaching functions. */
//@{
/**
* Detaches the iterator from the set which it iterated over, releasing any
* computational resources and placing the iterator in the INVALID state. After
* <code>detach</code> has been invoked, calls to <code>nextNode</code> or
* <code>previousNode</code> will raise the exception INVALID_STATE_ERR.
*
*/
void detach();
//@}
protected:
DOM_NodeIterator (NodeIteratorImpl* impl);
friend class DOM_Document;
private:
NodeIteratorImpl* fImpl;
};
#endif
1.1 xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/dom/DOM_NodeList.hpp
Index: DOM_NodeList.hpp
===================================================================
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2000 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache\@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation, and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com . For more information
* on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
/*
* $Log: DOM_NodeList.hpp,v $
* Revision 1.1 2002/10/23 08:21:41 lilantha
* no message
*
* Revision 1.2 2002/02/20 18:17:00 tng
* [Bug 5977] Warnings on generating apiDocs.
*
* Revision 1.1.1.1 2002/02/01 22:21:46 peiyongz
* sane_include
*
* Revision 1.9 2000/04/19 02:26:16 aruna1
* Full support for DOM_EntityReference, DOM_Entity and DOM_DocumentType introduced
*
* Revision 1.8 2000/03/02 19:53:56 roddey
* This checkin includes many changes done while waiting for the
* 1.1.0 code to be finished. I can't list them all here, but a list is
* available elsewhere.
*
* Revision 1.7 2000/02/24 20:11:28 abagchi
* Swat for removing Log from API docs
*
* Revision 1.6 2000/02/10 20:38:46 abagchi
* Added docs for equality operators
*
* Revision 1.5 2000/02/06 07:47:30 rahulj
* Year 2K copyright swat.
*
* Revision 1.4 2000/02/04 01:49:27 aruna1
* TreeWalker and NodeIterator changes
*
* Revision 1.3 2000/01/22 01:38:29 andyh
* Remove compiler warnings in DOM impl classes
*
* Revision 1.2 2000/01/05 01:16:08 andyh
* DOM Level 2 core, namespace support added.
*
* Revision 1.1.1.1 1999/11/09 01:09:02 twl
* Initial checkin
*
* Revision 1.2 1999/11/08 20:44:20 rahul
* Swat for adding in Product name and CVS comment log variable.
*
*/
#ifndef DOM_NodeList_HEADER_GUARD_
#define DOM_NodeList_HEADER_GUARD_
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOM_Node.hpp>
class NodeListImpl;
/**
* The <code>NodeList</code> interface provides the abstraction of an ordered
* collection of nodes. NodeLists are created by DOM_Document::getElementsByTagName(),
* DOM_Node::getChildNodes(),
*
* <p>The items in the <code>NodeList</code> are accessible via an integral
* index, starting from 0.
*
* NodeLists are "live", in that any changes to the document tree are immediately
* reflected in any NodeLists that may have been created for that tree.
*/
class CDOM_EXPORT DOM_NodeList {
private:
NodeListImpl *fImpl;
public:
/** @name Constructors and assignment operator */
//@{
/**
* Default constructor for DOM_NodeList. The resulting object does not
* refer to an actual NodeList; it will compare == to 0, and is similar
* to a null object reference variable in Java. It may subsequently be
* assigned to refer to an actual NodeList.
*
*/
DOM_NodeList();
/**
* Copy constructor.
*
* @param other The object to be copied.
*/
DOM_NodeList(const DOM_NodeList &other);
/**
* Assignment operator.
*
* @param other The object to be copied.
*/
DOM_NodeList & operator = (const DOM_NodeList &other);
/**
* Assignment operator. This overloaded variant is provided for
* the sole purpose of setting a DOM_Node reference variable to
* zero. Nulling out a reference variable in this way will decrement
* the reference count on the underlying Node object that the variable
* formerly referenced. This effect is normally obtained when reference
* variable goes out of scope, but zeroing them can be useful for
* global instances, or for local instances that will remain in scope
* for an extended time, when the storage belonging to the underlying
* node needs to be reclaimed.
*
* @param val Only a value of 0, or null, is allowed.
*/
DOM_NodeList & operator = (const DOM_NullPtr *val);
//@}
/** @name Destructor. */
//@{
/**
* Destructor for DOM_NodeList. The object being destroyed is the reference
* object, not the underlying NodeList node itself.
*
* <p>Like most other DOM types in this implementation, memory management
* of Node Lists is automatic. Instances of DOM_NodeList function
* as references to an underlying heap based implementation object,
* and should never be explicitly new-ed or deleted in application code, but
* should appear only as local variables or function parameters.
*/
~DOM_NodeList();
//@}
/** @name Comparison operators. */
//@{
/**
* Equality operator.
* Compares whether two node list
* variables refer to the same underlying node list. It does
* not compare the contents of the node lists themselves.
*
* @param other The value to be compared
* @return Returns true if node list refers to same underlying node list
*/
bool operator == (const DOM_NodeList &other) const;
/**
* Use this comparison operator to test whether a Node List reference
* is null.
*
* @param nullPtr The value to be compared, which must be 0 or null.
* @return Returns true if node list reference is null
*/
bool operator == (const DOM_NullPtr *nullPtr) const;
/**
* Inequality operator.
* Compares whether two node list
* variables refer to the same underlying node list. It does
* not compare the contents of the node lists themselves.
*
* @param other The value to be compared
* @return Returns true if node list refers to a different underlying node list
*/
bool operator != (const DOM_NodeList &other) const;
/**
* Use this comparison operator to test whether a Node List reference
* is not null.
*
* @param nullPtr The value to be compared, which must be 0 or null.
* @return Returns true if node list reference is not null
*/
bool operator != (const DOM_NullPtr *nullPtr) const;
//@}
/** @name Get functions. */
//@{
/**
* Returns the <code>index</code>th item in the collection.
*
* If <code>index</code> is greater than or equal to the number of nodes in
* the list, this returns <code>null</code>.
*
* @param index Index into the collection.
* @return The node at the <code>index</code>th position in the
* <code>NodeList</code>, or <code>null</code> if that is not a valid
* index.
*/
DOM_Node item(unsigned int index) const;
/**
* Returns the number of nodes in the list.
*
* The range of valid child node indices is 0 to <code>length-1</code> inclusive.
*/
unsigned int getLength() const;
//@}
protected:
DOM_NodeList(NodeListImpl *impl);
friend class DOM_Document;
friend class DOM_Element;
friend class DOM_Node;
friend class DOM_Entity;
};
#endif
1.1 xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/dom/DOM_Notation.hpp
Index: DOM_Notation.hpp
===================================================================
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2000 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache\@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation, and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com . For more information
* on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
/*
* $Log: DOM_Notation.hpp,v $
* Revision 1.1 2002/10/23 08:21:41 lilantha
* no message
*
* Revision 1.2 2002/02/20 18:17:00 tng
* [Bug 5977] Warnings on generating apiDocs.
*
* Revision 1.1.1.1 2002/02/01 22:21:46 peiyongz
* sane_include
*
* Revision 1.6 2000/03/11 02:58:39 chchou
* Fix bug # 18, remove set method of readonly attributes
*
* Revision 1.5 2000/03/02 19:53:57 roddey
* This checkin includes many changes done while waiting for the
* 1.1.0 code to be finished. I can't list them all here, but a list is
* available elsewhere.
*
* Revision 1.4 2000/02/24 20:11:28 abagchi
* Swat for removing Log from API docs
*
* Revision 1.3 2000/02/06 07:47:31 rahulj
* Year 2K copyright swat.
*
* Revision 1.2 2000/01/05 01:16:08 andyh
* DOM Level 2 core, namespace support added.
*
* Revision 1.1.1.1 1999/11/09 01:09:03 twl
* Initial checkin
*
* Revision 1.2 1999/11/08 20:44:21 rahul
* Swat for adding in Product name and CVS comment log variable.
*
*/
#ifndef DOM_Notation_HEADER_GUARD_
#define DOM_Notation_HEADER_GUARD_
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOM_Node.hpp>
class NotationImpl;
/**
* This interface represents a notation declared in the DTD. A notation either
* declares, by name, the format of an unparsed entity (see section 4.7 of
* the XML 1.0 specification), or is used for formal declaration of
* Processing Instruction targets (see section 2.6 of the XML 1.0
* specification). The <code>nodeName</code> attribute inherited from
* <code>Node</code> is set to the declared name of the notation.
* <p>The DOM Level 1 does not support editing <code>Notation</code> nodes;
* they are therefore readonly.
* <p>A <code>Notation</code> node does not have any parent.
*/
class CDOM_EXPORT DOM_Notation: public DOM_Node {
public:
/** @name Constructors and assignment operator */
//@{
/**
* Default constructor for DOM_Notation. The resulting object does not
* refer to an actual Notation node; it will compare == to 0, and is similar
* to a null object reference variable in Java. It may subsequently be
* assigned to refer to an actual Notation node.
* <p>
* New notation nodes are created by DOM_Document::createNotation().
*
*
*/
DOM_Notation();
/**
* Copy constructor. Creates a new <code>DOM_Notation</code> that refers to the
* same underlying node as the original. See also DOM_Node::clone(),
* which will copy the actual notation node, rather than just creating a new
* reference to the original node.
*
* @param other The object to be copied.
*/
DOM_Notation(const DOM_Notation &other);
/**
* Assignment operator.
*
* @param other The object to be copied.
*/
DOM_Notation & operator = (const DOM_Notation &other);
/**
* Assignment operator. This overloaded variant is provided for
* the sole purpose of setting a DOM_Node reference variable to
* zero. Nulling out a reference variable in this way will decrement
* the reference count on the underlying Node object that the variable
* formerly referenced. This effect is normally obtained when reference
* variable goes out of scope, but zeroing them can be useful for
* global instances, or for local instances that will remain in scope
* for an extended time, when the storage belonging to the underlying
* node needs to be reclaimed.
*
* @param val Only a value of 0, or null, is allowed.
*/
DOM_Notation & operator = (const DOM_NullPtr *val);
//@}
/** @name Destructor. */
//@{
/**
* Destructor for DOM_Notation. The object being destroyed is the reference
* object, not the underlying Notation node itself.
*
*/
~DOM_Notation();
//@}
/** @name Get functions. */
//@{
/**
* Get the public identifier of this notation.
*
* If the public identifier was not
* specified, this is <code>null</code>.
* @return Returns the public identifier of the notation
*/
DOMString getPublicId() const;
/**
* Get the system identifier of this notation.
*
* If the system identifier was not
* specified, this is <code>null</code>.
* @return Returns the system identifier of the notation
*/
DOMString getSystemId() const;
//@}
protected:
DOM_Notation(NotationImpl *impl);
friend class DOM_Document;
};
#endif
1.1 xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/dom/DOM_ProcessingInstruction.hpp
Index: DOM_ProcessingInstruction.hpp
===================================================================
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2000 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache\@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation, and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com . For more information
* on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
/*
* $Log: DOM_ProcessingInstruction.hpp,v $
* Revision 1.1 2002/10/23 08:21:41 lilantha
* no message
*
* Revision 1.2 2002/02/20 18:17:00 tng
* [Bug 5977] Warnings on generating apiDocs.
*
* Revision 1.1.1.1 2002/02/01 22:21:46 peiyongz
* sane_include
*
* Revision 1.5 2000/03/02 19:53:57 roddey
* This checkin includes many changes done while waiting for the
* 1.1.0 code to be finished. I can't list them all here, but a list is
* available elsewhere.
*
* Revision 1.4 2000/02/24 20:11:28 abagchi
* Swat for removing Log from API docs
*
* Revision 1.3 2000/02/06 07:47:31 rahulj
* Year 2K copyright swat.
*
* Revision 1.2 2000/01/05 01:16:08 andyh
* DOM Level 2 core, namespace support added.
*
* Revision 1.1.1.1 1999/11/09 01:09:03 twl
* Initial checkin
*
* Revision 1.2 1999/11/08 20:44:21 rahul
* Swat for adding in Product name and CVS comment log variable.
*
*/
#ifndef DOM_ProcessingInstruction_HEADER_GUARD_
#define DOM_ProcessingInstruction_HEADER_GUARD_
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOM_Node.hpp>
class ProcessingInstructionImpl;
/**
* The <code>ProcessingInstruction</code> interface represents a "processing
* instruction", used in XML as a way to keep processor-specific information
* in the text of the document.
*/
class CDOM_EXPORT DOM_ProcessingInstruction: public DOM_Node {
public:
/** @name Constructors and assignment operator */
//@{
/**
* Default constructor for DOM_ProcessingInstruction. The resulting object
* does not refer to an actual PI node; it will compare == to 0, and is similar
* to a null object reference variable in Java. It may subsequently be
* assigned to refer to an actual PI node.
* <p>
* New Processing Instruction nodes are created by DOM_Document::createProcessingInstruction().
*
*
*/
DOM_ProcessingInstruction();
/**
* Copy constructor. Creates a new <code>DOM_ProcessingInstruction</code> that refers to the
* same underlying node as the original. See also DOM_Node::clone(),
* which will copy the actual PI node, rather than just creating a new
* reference to the original node.
*
* @param other The object to be copied.
*/
DOM_ProcessingInstruction(const DOM_ProcessingInstruction &other);
/**
* Assignment operator.
*
* @param other The object to be copied.
*/
DOM_ProcessingInstruction & operator = (const DOM_ProcessingInstruction &other);
/**
* Assignment operator. This overloaded variant is provided for
* the sole purpose of setting a DOM_Node reference variable to
* zero. Nulling out a reference variable in this way will decrement
* the reference count on the underlying Node object that the variable
* formerly referenced. This effect is normally obtained when reference
* variable goes out of scope, but zeroing them can be useful for
* global instances, or for local instances that will remain in scope
* for an extended time, when the storage belonging to the underlying
* node needs to be reclaimed.
*
* @param val Only a value of 0, or null, is allowed.
*/
DOM_ProcessingInstruction & operator = (const DOM_NullPtr *val);
//@}
/** @name Destructor. */
//@{
/**
* Destructor for DOM_processingInstruction. The object being destroyed is the reference
* object, not the underlying PI node itself.
*
*/
~DOM_ProcessingInstruction();
//@}
/** @name Get functions. */
//@{
/**
* The target of this processing instruction.
*
* XML defines this as being the
* first token following the markup that begins the processing instruction.
*/
DOMString getTarget() const;
/**
* The content of this processing instruction.
*
* This is from the first non
* white space character after the target to the character immediately
* preceding the <code>?></code>.
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
*/
DOMString getData() const;
//@}
/** @name Set functions. */
//@{
/**
* Sets the content of this processing instruction.
*
* This is from the first non
* white space character after the target to the character immediately
* preceding the <code>?></code>.
* @param data The string containing the processing instruction
*/
void setData(const DOMString &data);
//@}
protected:
DOM_ProcessingInstruction(ProcessingInstructionImpl *impl);
friend class DOM_Document;
};
#endif
1.1 xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/dom/DOM_Range.hpp
Index: DOM_Range.hpp
===================================================================
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2000 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache\@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation, and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com . For more information
* on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
/*
* $Id: DOM_Range.hpp,v 1.1 2002/10/23 08:21:41 lilantha Exp $
*/
#ifndef DOM_Range_HEADER_GUARD_
#define DOM_Range_HEADER_GUARD_
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOM_Node.hpp>
#include <xercesc/dom/DOMString.hpp>
#include <xercesc/dom/DOM_DocumentFragment.hpp>
class RangeImpl;
//class RangeImpl;
class CDOM_EXPORT DOM_Range {
public:
enum CompareHow {
START_TO_START = 0,
START_TO_END = 1,
END_TO_END = 2,
END_TO_START = 3
};
//c'tor & d'tor
DOM_Range();
DOM_Range(const DOM_Range& other);
~DOM_Range();
DOM_Range & operator = (const DOM_Range &other);
DOM_Range & operator = (const DOM_NullPtr *other);
bool operator != (const DOM_Range & other) const;
bool operator == (const DOM_Range & other) const;
bool operator != (const DOM_NullPtr * other) const;
bool operator == (const DOM_NullPtr * other) const;
//getter functions
DOM_Node getStartContainer() const;
unsigned int getStartOffset() const;
DOM_Node getEndContainer() const;
unsigned int getEndOffset() const;
bool getCollapsed() const;
const DOM_Node getCommonAncestorContainer() const;
//setter functions
void setStart(const DOM_Node &parent, unsigned int offset);
void setEnd(const DOM_Node &parent, unsigned int offset);
void setStartBefore(const DOM_Node &refNode);
void setStartAfter(const DOM_Node &refNode);
void setEndBefore(const DOM_Node &refNode);
void setEndAfter(const DOM_Node &refNode);
//misc functions
void collapse(bool toStart);
void selectNode(const DOM_Node &node);
void selectNodeContents(const DOM_Node &node);
//Functions related to comparing range Boundrary-Points
short compareBoundaryPoints(CompareHow how, const DOM_Range& range) const;
void deleteContents();
DOM_DocumentFragment extractContents();
DOM_DocumentFragment cloneContents() const;
void insertNode(DOM_Node& node);
//Misc functions
void surroundContents(DOM_Node &node);
DOM_Range cloneRange() const;
DOMString toString() const;
void detach();
protected:
DOM_Range(RangeImpl *);
RangeImpl *fImpl;
friend class DOM_Document;
};
#endif
1.1 xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/dom/DOM_RangeException.hpp
Index: DOM_RangeException.hpp
===================================================================
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2000 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache\@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation, and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com . For more information
* on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
/*
* $Log: DOM_RangeException.hpp,v $
* Revision 1.1 2002/10/23 08:21:41 lilantha
* no message
*
* Revision 1.1.1.1 2002/02/01 22:21:46 peiyongz
* sane_include
*
* Revision 1.1 2000/07/28 01:33:31 aruna1
* DOM Level 2 Range feature introduced
*
*/
#ifndef DOM_RangeException_HEADER_GUARD_
#define DOM_RangeException_HEADER_GUARD_
#include <xercesc/dom/DOM_DOMException.hpp>
/**
* Encapsulate range related DOM error or warning. DOM level 2 implementation.
*
* <p> The DOM will create and throw an instance of DOM_RangeException
* when an error condition in range is detected. Exceptions can occur
* when an application directly manipulates the range elements in DOM document
* tree that is produced by the parser.
*
* <p>Unlike the other classes in the C++ DOM API, DOM_RangeException
* is NOT a reference to an underlying implementation class, and
* does not provide automatic memory management. Code that catches
* a DOM Range exception is responsible for deleting it, or otherwise
* arranging for its disposal.
*
*/
class CDOM_EXPORT DOM_RangeException : public DOM_DOMException {
public:
/** @name Enumerators for DOM Range Exceptions */
//@{
enum RangeExceptionCode {
BAD_BOUNDARYPOINTS_ERR = 1,
INVALID_NODE_TYPE_ERR = 2
};
//@}
public:
/** @name Constructors and assignment operator */
//@{
/**
* Default constructor for DOM_RangeException.
*
*/
DOM_RangeException();
/**
* Constructor which takes an error code and a message.
*
* @param code The error code which indicates the exception
* @param message The string containing the error message
*/
DOM_RangeException(RangeExceptionCode code, const DOMString &message);
/**
* Copy constructor.
*
* @param other The object to be copied.
*/
DOM_RangeException(const DOM_RangeException &other);
//@}
/** @name Destructor. */
//@{
/**
* Destructor for DOM_RangeException. Applications are responsible
* for deleting DOM_RangeException objects that they catch after they
* have completed their exception processing.
*
*/
virtual ~DOM_RangeException();
//@}
/** @name Public variables. */
//@{
/**
* A code value, from the set defined by the RangeExceptionCode enum,
* indicating the type of error that occured.
*/
RangeExceptionCode code;
//@}
};
#endif
1.1 xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/dom/DOM_Text.hpp
Index: DOM_Text.hpp
===================================================================
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache\@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation, and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com . For more information
* on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
/*
* $Log: DOM_Text.hpp,v $
* Revision 1.1 2002/10/23 08:21:41 lilantha
* no message
*
* Revision 1.3 2002/02/20 18:17:00 tng
* [Bug 5977] Warnings on generating apiDocs.
*
* Revision 1.2 2002/02/04 19:57:15 tng
* Remove the phrase "Experimental".
*
* Revision 1.1.1.1 2002/02/01 22:21:46 peiyongz
* sane_include
*
* Revision 1.8 2000/07/28 01:33:31 aruna1
* DOM Level 2 Range feature introduced
*
* Revision 1.7 2000/03/24 01:30:50 chchou
* Fix bug #8 to support ignorable whitespace text nodes
*
* Revision 1.6 2000/03/02 19:53:57 roddey
* This checkin includes many changes done while waiting for the
* 1.1.0 code to be finished. I can't list them all here, but a list is
* available elsewhere.
*
* Revision 1.5 2000/02/24 20:11:28 abagchi
* Swat for removing Log from API docs
*
* Revision 1.4 2000/02/06 07:47:31 rahulj
* Year 2K copyright swat.
*
* Revision 1.3 2000/02/04 01:49:27 aruna1
* TreeWalker and NodeIterator changes
*
* Revision 1.2 2000/01/05 01:16:08 andyh
* DOM Level 2 core, namespace support added.
*
* Revision 1.1.1.1 1999/11/09 01:09:04 twl
* Initial checkin
*
* Revision 1.2 1999/11/08 20:44:22 rahul
* Swat for adding in Product name and CVS comment log variable.
*
*/
#ifndef DOM_Text_HEADER_GUARD_
#define DOM_Text_HEADER_GUARD_
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/dom/DOM_CharacterData.hpp>
class TextImpl;
/**
* The <code>Text</code> interface represents the textual content (termed
* character data in XML) of an <code>Element</code> or <code>Attr</code>.
* If there is no markup inside an element's content, the text is contained
* in a single object implementing the <code>Text</code> interface that is
* the only child of the element. If there is markup, it is parsed into a
* list of elements and <code>Text</code> nodes that form the list of
* children of the element.
* <p>When a document is first made available via the DOM, there is only one
* <code>Text</code> node for each block of text. Users may create adjacent
* <code>Text</code> nodes that represent the contents of a given element
* without any intervening markup, but should be aware that there is no way
* to represent the separations between these nodes in XML, so they
* will not (in general) persist between DOM editing sessions. The
* <code>normalize()</code> method on <code>Element</code> merges any such
* adjacent <code>Text</code> objects into a single node for each block of
* text; this is recommended before employing operations that depend on a
* particular document structure, such as navigation with
* <code>XPointers.</code>
*/
class CDOM_EXPORT DOM_Text: public DOM_CharacterData {
public:
/** @name Constructors and assignment operator */
//@{
/**
* Default constructor for DOM_Text. The resulting object does not
* refer to an actual Text node; it will compare == to 0, and is similar
* to a null object reference variable in Java. It may subsequently be
* assigned to refer to an actual comment node.
*
*/
DOM_Text();
/**
* Copy constructor. Creates a new <code>DOM_Text</code> that refers to the
* same underlying node as the original. See also DOM_Node::clone(),
* which will copy the actual Text node, rather than just creating a new
* reference to the original node.
*
* @param other The object to be copied.
*/
DOM_Text(const DOM_Text &other);
/**
* Assignment operator.
*
* @param other The object to be copied.
*/
DOM_Text & operator = (const DOM_Text &other);
/**
* Assignment operator. This overloaded variant is provided for
* the sole purpose of setting a DOM_Node reference variable to
* zero. Nulling out a reference variable in this way will decrement
* the reference count on the underlying Node object that the variable
* formerly referenced. This effect is normally obtained when reference
* variable goes out of scope, but zeroing them can be useful for
* global instances, or for local instances that will remain in scope
* for an extended time, when the storage belonging to the underlying
* node needs to be reclaimed.
*
* @param val Only a value of 0, or null, is allowed.
*/
DOM_Text & operator = (const DOM_NullPtr *val);
//@}
/** @name Destructor. */
//@{
/**
* Destructor for DOM_Text. The object being destroyed is the reference
* object, not the underlying Comment node itself.
*
*/
~DOM_Text();
//@}
/** @name Functions to modify the Text node. */
//@{
/**
* Breaks this node into two nodes at the specified
* offset, keeping both in the tree as siblings.
*
* This node then only
* contains all the content up to the <code>offset</code> point. And a new
* node of the same nodeType, which is inserted as the next sibling of this
* node, contains all the content at and after the <code>offset</code>
* point. When the <code>offset</code> is equal to the lenght of this node,
* the new node has no data.
* @param offset The offset at which to split, starting from 0.
* @return The new <code>Text</code> node.
* @exception DOMException
* INDEX_SIZE_ERR: Raised if the specified offset is negative or greater
* than the number of characters in <code>data</code>.
* <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
*/
DOM_Text splitText(unsigned int offset);
//@}
/** @name Non-standard (not defined by the DOM specification) functions. */
//@{
/**
*
* Return true if this node contains ignorable whitespaces only.
* @return True if this node contains ignorable whitespaces only.
*/
bool isIgnorableWhitespace();
//@}
protected:
DOM_Text(TextImpl *);
friend class DOM_Document;
friend class RangeImpl;
};
#endif
1.1 xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/dom/DOM_TreeWalker.hpp
Index: DOM_TreeWalker.hpp
===================================================================
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache\@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation, and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com . For more information
* on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
/*
* $Log: DOM_TreeWalker.hpp,v $
* Revision 1.1 2002/10/23 08:21:41 lilantha
* no message
*
* Revision 1.3 2002/02/20 18:17:00 tng
* [Bug 5977] Warnings on generating apiDocs.
*
* Revision 1.2 2002/02/04 20:03:48 tng
* Add DOM Level missing functions:
* 1. NodeIterator::getRoot
* 2. TreeWalker::getRoot
* 3. Element::hasAttribute
* 4. Element::hasAttributeNS
* 5. Node::hasAttributes
* 6. Node::isSupported
*
* Revision 1.1.1.1 2002/02/01 22:21:46 peiyongz
* sane_include
*
* Revision 1.9 2000/08/08 01:00:36 aruna1
* detach functionality removed from TreeWalker
*
* Revision 1.8 2000/02/24 20:11:29 abagchi
* Swat for removing Log from API docs
*
* Revision 1.7 2000/02/17 17:47:25 andyh
* Update Doc++ API comments
* NameSpace update to track W3C
* Changes were made by Chih Hsiang Chou
*
* Revision 1.6 2000/02/15 23:17:37 andyh
* Update Doc++ API comments
* NameSpace bugfix and update to track W3C
* Chih Hsiang Chou
*
* Revision 1.5 2000/02/11 03:01:04 abagchi
* Made protected method public to compile, must be fixed later
*
* Revision 1.4 2000/02/11 01:05:11 abagchi
* Added API docs
*
* Revision 1.3 2000/02/06 07:47:31 rahulj
* Year 2K copyright swat.
*
* Revision 1.2 2000/02/04 01:49:27 aruna1
* TreeWalker and NodeIterator changes
*
* Revision 1.1.1.1 1999/11/09 01:09:05 twl
* Initial checkin
*
* Revision 1.3 1999/11/08 20:44:22 rahul
* Swat for adding in Product name and CVS comment log variable.
*
*/
#ifndef DOM_TreeWalker_HEADER_GUARD_
#define DOM_TreeWalker_HEADER_GUARD_
#include "DOM_Node.hpp"
#include "DOM_NodeFilter.hpp"
class TreeWalkerImpl;
/**
* <code>DOM_TreeWalker</code> objects are used to navigate a document tree or
* subtree using the view of the document defined by its <code>whatToShow</code>
* flags and any filters that are defined for the <code>DOM_TreeWalker</code>. Any
* function which performs navigation using a <code>DOM_TreeWalker</code> will
* automatically support any view defined by a <code>DOM_TreeWalker</code>.
*
* Omitting nodes from the logical view of a subtree can result in a structure that is
* substantially different from the same subtree in the complete, unfiltered document. Nodes
* that are siblings in the DOM_TreeWalker view may be children of different, widely separated
* nodes in the original view. For instance, consider a Filter that skips all nodes except for
* Text nodes and the root node of a document. In the logical view that results, all text
* nodes will be siblings and appear as direct children of the root node, no matter how
* deeply nested the structure of the original document.
*
*/
class CDOM_EXPORT DOM_TreeWalker {
public:
/** @name Constructors and assignment operator */
//@{
/**
* Default constructor.
*/
DOM_TreeWalker();
/**
* Copy constructor.
*
* @param other The object to be copied.
*/
DOM_TreeWalker(const DOM_TreeWalker &other);
/**
* Assignment operator.
*
* @param other The object to be copied.
*/
DOM_TreeWalker & operator = (const DOM_TreeWalker &other);
/**
* Assignment operator. This overloaded variant is provided for
* the sole purpose of setting a DOM_NodeIterator to null.
*
* @param val Only a value of 0, or null, is allowed.
*/
DOM_TreeWalker & operator = (const DOM_NullPtr *val);
//@}
/** @name Destructor. */
//@{
/**
* Destructor for DOM_TreeWalker.
*/
~DOM_TreeWalker();
//@}
/** @name Equality and Inequality operators. */
//@{
/**
* The equality operator.
*
* @param other The object reference with which <code>this</code> object is compared
* @returns True if both <code>DOM_TreeWalker</code>s refer to the same
* actual node, or are both null; return false otherwise.
*/
bool operator == (const DOM_TreeWalker & other)const;
/**
* Compare with a pointer. Intended only to allow a convenient
* comparison with null.
*/
bool operator == (const DOM_NullPtr *other) const;
/**
* The inequality operator. See operator ==.
*/
bool operator != (const DOM_TreeWalker & other) const;
/**
* Compare with a pointer. Intended only to allow a convenient
* comparison with null.
*
*/
bool operator != (const DOM_NullPtr * other) const;
//@}
/** @name Get functions. */
//@{
/**
* The <code>root</code> node of the <code>TreeWalker</code>, as specified
* when it was created.
*/
DOM_Node getRoot();
/**
* Return which node types are presented via the DOM_TreeWalker.
* These constants are defined in the DOM_NodeFilter interface.
*
*/
unsigned long getWhatToShow();
/**
* Return The filter used to screen nodes.
*
*/
DOM_NodeFilter* getFilter();
/**
* Return the expandEntityReferences flag.
* The value of this flag determines whether the children of entity reference
* nodes are visible to the DOM_TreeWalker. If false, they will be skipped over.
*
*/
bool getExpandEntityReferences();
/**
* Return the node at which the DOM_TreeWalker is currently positioned.
*
*/
DOM_Node getCurrentNode();
/**
* Moves to and returns the closest visible ancestor node of the current node.
* If the search for parentNode attempts to step upward from the DOM_TreeWalker's root
* node, or if it fails to find a visible ancestor node, this method retains the
* current position and returns null.
*
*/
DOM_Node parentNode();
/**
* Moves the <code>DOM_TreeWalker</code> to the first child of the current node,
* and returns the new node. If the current node has no children, returns
* <code>null</code>, and retains the current node.
*
*/
DOM_Node firstChild();
/**
* Moves the <code>DOM_TreeWalker</code> to the last child of the current node, and
* returns the new node. If the current node has no children, returns
* <code>null</code>, and retains the current node.
*
*/
DOM_Node lastChild();
/**
* Moves the <code>DOM_TreeWalker</code> to the previous sibling of the current
* node, and returns the new node. If the current node has no previous sibling,
* returns <code>null</code>, and retains the current node.
*
*/
DOM_Node previousSibling();
/**
* Moves the <code>DOM_TreeWalker</code> to the next sibling of the current node,
* and returns the new node. If the current node has no next sibling, returns
* <code>null</code>, and retains the current node.
*
*/
DOM_Node nextSibling();
/**
* Moves the <code>DOM_TreeWalker</code> to the previous visible node in document
* order relative to the current node, and returns the new node. If the current
* node has no previous node,
* or if the search for previousNode attempts to step upward from the DOM_TreeWalker's
* root node, returns <code>null</code>, and retains the current node.
*
*/
DOM_Node previousNode();
/**
* Moves the <code>DOM_TreeWalker</code> to the next visible node in document order
* relative to the current node, and returns the new node. If the current node has
* no next node,
* or if the search for nextNode attempts to step upward from the DOM_TreeWalker's
* root node, returns <code>null</code>, and retains the current node.
*
*/
DOM_Node nextNode();
//@}
/** @name Set functions. */
//@{
/**
* Set the node at which the DOM_TreeWalker is currently positioned.
*
*/
void setCurrentNode(DOM_Node currentNode);
//@}
protected:
DOM_TreeWalker(TreeWalkerImpl* impl);
friend class DOM_Document;
private:
TreeWalkerImpl* fImpl;
};
#endif
1.1 xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/dom/DOM_XMLDecl.hpp
Index: DOM_XMLDecl.hpp
===================================================================
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2000 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache\@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation, and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com . For more information
* on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
/*
* $Id: DOM_XMLDecl.hpp,v 1.1 2002/10/23 08:21:41 lilantha Exp $
*
*/
#ifndef DOM_XMLDecl_HEADER_GUARD_
#define DOM_XMLDecl_HEADER_GUARD_
#include <xercesc/util/XercesDefs.hpp>
#include "xercesc/dom/DOM_Node.hpp"
class XMLDeclImpl;
/**
* Class to refer to XML Declaration nodes in the DOM.
*
*/
class CDOM_EXPORT DOM_XMLDecl: public DOM_Node {
public:
/** @name Constructors and assignment operators */
//@{
/**
* The default constructor for DOM_XMLDecl creates a null
* DOM_XMLDecl object that refers to a declaration node with
* version= 1.0, encoding=utf-8 and standalone=no
*
*/
DOM_XMLDecl();
/**
* Copy constructor. Creates a new <code>DOM_XMLDecl</code> that refers to the
* same underlying actual xmlDecl node as the original.
*
* @param other The object to be copied
*/
DOM_XMLDecl(const DOM_XMLDecl &other);
/**
* Assignment operator
*
* @param other The object to be copied
*/
DOM_XMLDecl & operator = (const DOM_XMLDecl &other);
/**
* Assignment operator. This overloaded variant is provided for
* the sole purpose of setting a DOM_Node reference variable to
* zero. Nulling out a reference variable in this way will decrement
* the reference count on the underlying Node object that the variable
* formerly referenced. This effect is normally obtained when reference
* variable goes out of scope, but zeroing them can be useful for
* global instances, or for local instances that will remain in scope
* for an extended time, when the storage belonging to the underlying
* node needs to be reclaimed.
*
* @param val Only a value of 0, or null, is allowed.
*/
DOM_XMLDecl & operator = (const DOM_NullPtr *val);
//@}
/** @name Destructor */
//@{
/**
* Destructor. The object being destroyed is the reference
* object, not the underlying Document itself.
*
* <p>The reference counting memory management will
* delete the underlying document itself if this
* DOM_XMLDecl is the last remaining to refer to the Document,
* and if there are no remaining references to any of the nodes
* within the document tree. If other live references do remain,
* the underlying document itself remains also.
*
*/
~DOM_XMLDecl();
//@}
//@{
/**
* To get the version string of the xmlDeclaration statement
*/
DOMString getVersion() const;
/**
* To get the encoding string of the xmlDeclaration statement
*/
DOMString getEncoding() const;
/**
* To get the standalone string of the xmlDeclaration statement
*/
DOMString getStandalone() const;
//@}
protected:
DOM_XMLDecl( XMLDeclImpl *impl);
friend class DOM_Document;
};
#endif
1.1 xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/dom/DomMemDebug.hpp
Index: DomMemDebug.hpp
===================================================================
#ifndef DomMemDebug_HEADER_GUARD_
#define DomMemDebug_HEADER_GUARD_
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2000 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache\@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation, and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com . For more information
* on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
/*
* $Log: DomMemDebug.hpp,v $
* Revision 1.1 2002/10/23 08:21:41 lilantha
* no message
*
* Revision 1.1.1.1 2002/02/01 22:21:44 peiyongz
* sane_include
*
* Revision 1.4 2000/03/02 19:54:00 roddey
* This checkin includes many changes done while waiting for the
* 1.1.0 code to be finished. I can't list them all here, but a list is
* available elsewhere.
*
* Revision 1.3 2000/02/24 20:11:29 abagchi
* Swat for removing Log from API docs
*
* Revision 1.2 2000/02/06 07:47:32 rahulj
* Year 2K copyright swat.
*
* Revision 1.1.1.1 1999/11/09 01:08:47 twl
* Initial checkin
*
* Revision 1.2 1999/11/08 20:44:25 rahul
* Swat for adding in Product name and CVS comment log variable.
*
*/
#include <xercesc/util/XercesDefs.hpp>
//
// This class aids in debugging memory management problems with the
// reference counted DOM classes - DOMStrings, Nodes (including subclasses),
// and NamedNodeMaps.
//
// Usage Example:
// DomMemDebug initialState; // Captures allocation totals
// ... // Test code performs DOM
// ... // operations here.
//
// DomMemDebug exitState; // Captures post-test state.
// ExitState.printDifference(initialState); // Display leaks.
//
class CDOM_EXPORT DomMemDebug
{
public:
int liveStringHandles;
int totalStringHandles;
int liveStringBuffers;
int totalStringBuffers;
int liveNodeImpls;
int totalNodeImpls;
int liveNamedNodeMaps;
int totalNamedNodeMaps;
public:
DomMemDebug();
~DomMemDebug();
void print();
void printDifference(const DomMemDebug &other);
bool operator == (const DomMemDebug &other);
bool operator != (const DomMemDebug &other);
void operator = (const DomMemDebug &other);
};
#endif
1.1 xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/dom/MemDebug.hpp
Index: MemDebug.hpp
===================================================================
#ifndef MemDebug_HEADER_GUARD_
#define MemDebug_HEADER_GUARD_
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2000 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache\@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation, and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com . For more information
* on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
/*
* $Log: MemDebug.hpp,v $
* Revision 1.1 2002/10/23 08:21:41 lilantha
* no message
*
* Revision 1.1.1.1 2002/02/01 22:21:48 peiyongz
* sane_include
*
* Revision 1.3 2000/02/24 20:11:30 abagchi
* Swat for removing Log from API docs
*
* Revision 1.2 2000/02/06 07:47:33 rahulj
* Year 2K copyright swat.
*
* Revision 1.1.1.1 1999/11/09 01:09:11 twl
* Initial checkin
*
* Revision 1.2 1999/11/08 20:44:28 rahul
* Swat for adding in Product name and CVS comment log variable.
*
*/
class DomMemDebug
{
public:
int liveStringHandles;
int totalStringHandles;
int liveStringBuffers;
int totalStringBuffers;
int liveNodeImpls;
int totalNodeImpls;
int liveNamedNodeMaps;
int totalNamedNodeMaps;
public:
DOMMemDebug();
~DOMMemDebug();
void print();
void printDifference(const DOMMemDebug &other);
bool operator == (const DOMMemDebug &other);
bool operator != (const DOMMemDebug &other);
bool operator = (const DOMMemDebug &other);
};
#endif // MemDebug_HEADER_GUARD_
1.1 xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/dom/NameNodeFilter.hpp
Index: NameNodeFilter.hpp
===================================================================
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2000 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache\@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation, and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com . For more information
* on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
/*
* $Log: NameNodeFilter.hpp,v $
* Revision 1.1 2002/10/23 08:21:41 lilantha
* no message
*
* Revision 1.1.1.1 2002/02/01 22:21:48 peiyongz
* sane_include
*
* Revision 1.4 2000/02/24 20:11:30 abagchi
* Swat for removing Log from API docs
*
* Revision 1.3 2000/02/15 23:17:37 andyh
* Update Doc++ API comments
* NameSpace bugfix and update to track W3C
* Chih Hsiang Chou
*
* Revision 1.2 2000/02/06 07:47:33 rahulj
* Year 2K copyright swat.
*
* Revision 1.1.1.1 1999/11/09 01:09:12 twl
* Initial checkin
*
* Revision 1.2 1999/11/08 20:44:28 rahul
* Swat for adding in Product name and CVS comment log variable.
*
*/
// DOM_NameNodeFilter.h: interface for the DOM_NameNodeFilter class.
//
//////////////////////////////////////////////////////////////////////
#ifndef DOM_NameNodeFilter_HEADER_GUARD_
#define DOM_NameNodeFilter_HEADER_GUARD_
#include "DOM_NodeFilter.hpp"
#include "NodeFilterImpl.hpp"
#include "DOMString.hpp"
#include "DOM_Node.hpp"
class CDOM_EXPORT NameNodeFilter : public NodeFilterImpl
{
public:
NameNodeFilter();
virtual ~NameNodeFilter();
// The name to compare with the node name. If null, all node names
// are successfully matched.
void setName(DOMString name);
// Return the name to compare with node name.
DOMString getName();
// If match is true, the node name is accepted when it matches.
// If match is false, the node name is accepted when does not match.
void setMatch(bool match) ;
// Return match value.
bool getMatch();
virtual DOM_NodeFilter::FilterAction acceptNode(DOM_Node n);
private:
DOMString fName;
bool fMatch;
};
#endif
1.1 xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/dom/NodeIDMap.hpp
Index: NodeIDMap.hpp
===================================================================
#ifndef NodeIDMap_HEADER_GUARD_
#define NodeIDMap_HEADER_GUARD_
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2000 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache\@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation, and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com . For more information
* on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
//
// This file is part of the internal implementation of the C++ XML DOM.
// It should NOT be included or used directly by application programs.
//
// Applications should include the file <dom/DOM.hpp> for the entire
// DOM API, or DOM_*.hpp for individual DOM classes, where the class
// name is substituded for the *.
//
//
// Class NodeIDMap is a hash table that is used in the implementation of
// of DOM_Document::getElementsByID().
//
// Why Yet Another HashTable implementation? Becuase it can be significantly
// smaller when tuned for this exact usage, and the generic RefHashTableOf
// from the xerces utils project is not a paricularly good fit.
//
class AttrImpl;
class DOMString;
class NodeIDMap {
public:
NodeIDMap(int initialSize); // Create a new hash table, sized to hold "initialSize"
// Entries. It will automatically grow if need be.
virtual ~NodeIDMap();
private:
NodeIDMap(const NodeIDMap &other); // No copy, assignement, comparison.
NodeIDMap &operator = (const NodeIDMap &other);
bool operator == (const NodeIDMap &other);
public:
void add(AttrImpl *attr); // Add the specified attribute to the table.
void remove(AttrImpl *other); // Remove the specified attribute.
// Does nothing if the node is not in the table.
AttrImpl *find(const DOMString &ID); // Find the attribute node in the table with this ID
private:
void growTable();
private:
AttrImpl **fTable;
unsigned int fSizeIndex; // Index of the current table size in the
// array of possible table sizes.
unsigned int fSize; // The current size of the table array
// (number of slots, not bytes.)
unsigned int fNumEntries; // The number of entries used.
unsigned int fMaxEntries; // The max number of entries to use before
// growing the table.
};
#endif
1.1 xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/dom/NodeVector.hpp
Index: NodeVector.hpp
===================================================================
#ifndef NodeVector_HEADER_GUARD_
#define NodeVector_HEADER_GUARD_
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2000 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache\@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation, and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com . For more information
* on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
/*
* $Log: NodeVector.hpp,v $
* Revision 1.1 2002/10/23 08:21:41 lilantha
* no message
*
* Revision 1.1.1.1 2002/02/01 22:21:48 peiyongz
* sane_include
*
* Revision 1.5 2000/03/02 19:54:04 roddey
* This checkin includes many changes done while waiting for the
* 1.1.0 code to be finished. I can't list them all here, but a list is
* available elsewhere.
*
* Revision 1.4 2000/02/24 20:11:30 abagchi
* Swat for removing Log from API docs
*
* Revision 1.3 2000/02/06 07:47:34 rahulj
* Year 2K copyright swat.
*
* Revision 1.2 2000/02/04 01:49:25 aruna1
* TreeWalker and NodeIterator changes
*
* Revision 1.1.1.1 1999/11/09 01:09:17 twl
* Initial checkin
*
* Revision 1.2 1999/11/08 20:44:31 rahul
* Swat for adding in Product name and CVS comment log variable.
*
*/
//
// This file is part of the internal implementation of the C++ XML DOM.
// It should NOT be included or used directly by application programs.
//
// Applications should include the file <dom/DOM.hpp> for the entire
// DOM API, or DOM_*.hpp for individual DOM classes, where the class
// name is substituded for the *.
//
#include <xercesc/util/XercesDefs.hpp>
class NodeImpl;
class NodeVector {
private:
NodeImpl **data;
unsigned int allocatedSize;
unsigned int nextFreeSlot;
void init(unsigned int size);
void checkSpace();
public:
NodeVector();
NodeVector(unsigned int size);
~NodeVector();
unsigned int size();
NodeImpl *elementAt(unsigned int index);
NodeImpl *lastElement();
void addElement(NodeImpl *);
void insertElementAt(NodeImpl *, unsigned int index);
void setElementAt(NodeImpl *val, unsigned int index);
void removeElementAt(unsigned int index);
void reset();
};
#endif
1.1 xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/dom/ParentNode.hpp
Index: ParentNode.hpp
===================================================================
#ifndef ParentNode_HEADER_GUARD_
#define ParentNode_HEADER_GUARD_
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 1999-2001 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xerces" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact apache\@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation, and was
* originally based on software copyright (c) 1999, International
* Business Machines, Inc., http://www.ibm.com . For more information
* on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
//
// This file is part of the internal implementation of the C++ XML DOM.
// It should NOT be included or used directly by application programs.
//
// Applications should include the file <dom/DOM.hpp> for the entire
// DOM API, or DOM_*.hpp for individual DOM classes, where the class
// name is substituded for the *.
//
/*
* $Id: ParentNode.hpp,v 1.1 2002/10/23 08:21:41 lilantha Exp $
*/
/**
* ParentNode inherits from ChildImpl and adds the capability of having child
* nodes. Not every node in the DOM can have children, so only nodes that can
* should inherit from this class and pay the price for it.
* <P>
* ParentNode, just like NodeImpl, also implements NodeList, so it can
* return itself in response to the getChildNodes() query. This eliminiates
* the need for a separate ChildNodeList object. Note that this is an
* IMPLEMENTATION DETAIL; applications should _never_ assume that
* this identity exists.
* <P>
* While we have a direct reference to the first child, the last child is
* stored as the previous sibling of the first child. First child nodes are
* marked as being so, and getNextSibling hides this fact.
* <P>Note: Not all parent nodes actually need to also be a child. At some
* point we used to have ParentNode inheriting from NodeImpl and another class
* called ChildAndParentNode that inherited from ChildNode. But due to the lack
* of multiple inheritance a lot of code had to be duplicated which led to a
* maintenance nightmare. At the same time only a few nodes (Document,
* DocumentFragment, Entity, and Attribute) cannot be a child so the gain is
* memory wasn't really worth it. The only type for which this would be the
* case is Attribute, but we deal with there in another special way, so this is
* not applicable.
*
* <p><b>WARNING</b>: Some of the code here is partially duplicated in
* AttrImpl, be careful to keep these two classes in sync!
*
**/
#include <xercesc/util/XercesDefs.hpp>
#include "ChildNode.hpp"
class CDOM_EXPORT ParentNode: public ChildNode {
public:
DocumentImpl *ownerDocument; // Document this node belongs to
ChildNode *firstChild;
public:
ParentNode(DocumentImpl *ownerDocument);
ParentNode(const ParentNode &other);
virtual DocumentImpl * getOwnerDocument();
virtual void setOwnerDocument(DocumentImpl *doc);
virtual NodeListImpl *getChildNodes();
virtual NodeImpl * getFirstChild();
virtual NodeImpl * getLastChild();
virtual unsigned int getLength();
virtual bool hasChildNodes();
virtual NodeImpl *insertBefore(NodeImpl *newChild, NodeImpl *refChild);
virtual NodeImpl *item(unsigned int index);
virtual NodeImpl * removeChild(NodeImpl *oldChild);
virtual NodeImpl *replaceChild(NodeImpl *newChild, NodeImpl *oldChild);
virtual void setReadOnly(bool isReadOnly, bool deep);
//Introduced in DOM Level 2
virtual void normalize();
// NON-DOM
// unlike getOwnerDocument this never returns null, even for Document nodes
virtual DocumentImpl * getDocument();
protected:
void cloneChildren(const NodeImpl &other);
ChildNode * lastChild();
void lastChild(ChildNode *);
/** Cached node list length. */
int fCachedLength;
/** Last requested child. */
ChildNode * fCachedChild;
/** Last requested child index. */
int fCachedChildIndex;
};
#endif