axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lilan...@apache.org
Subject cvs commit: xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/validators/schema/identity FieldActivator.hpp FieldValueMap.hpp IC_Field.hpp IC_Key.hpp IC_KeyRef.hpp IC_Selector.hpp IC_Unique.hpp IdentityConstraint.hpp ValueStore.hpp ValueStoreCache.hpp XPathException.hpp XPathMatcher.hpp XPathMatcherStack.hpp XPathSymbols.hpp XercesXPath.hpp
Date Wed, 23 Oct 2002 08:55:25 GMT
lilantha    2002/10/23 01:55:23

  Added:       contrib/Axis-C++/xerces-c/include/xercesc/framework
                        LocalFileInputSource.hpp MemBufInputSource.hpp
                        StdInInputSource.hpp URLInputSource.hpp
                        XMLAttDef.hpp XMLAttDefList.hpp XMLAttr.hpp
                        XMLBuffer.hpp XMLBufferMgr.hpp XMLContentModel.hpp
                        XMLDocumentHandler.hpp XMLElementDecl.hpp
                        XMLEntityDecl.hpp XMLEntityHandler.hpp
                        XMLErrorCodes.hpp XMLErrorReporter.hpp
                        XMLFormatter.hpp XMLNotationDecl.hpp
                        XMLPScanToken.hpp XMLRecognizer.hpp XMLRefInfo.hpp
                        XMLValidator.hpp XMLValidityCodes.hpp
               contrib/Axis-C++/xerces-c/include/xercesc/idom IDCasts.hpp
                        IDChildNode.hpp IDDOMImplementation.hpp
                        IDDeepNodeListPool.c IDDeepNodeListPool.hpp
                        IDNodeIDMap.hpp IDNodeVector.hpp IDOM.hpp
                        IDOM_Attr.hpp IDOM_CDATASection.hpp
                        IDOM_CharacterData.hpp IDOM_Comment.hpp
                        IDOM_DOMException.hpp IDOM_DOMImplementation.hpp
                        IDOM_Document.hpp IDOM_DocumentFragment.hpp
                        IDOM_DocumentType.hpp IDOM_Element.hpp
                        IDOM_Entity.hpp IDOM_EntityReference.hpp
                        IDOM_NamedNodeMap.hpp IDOM_Node.hpp
                        IDOM_NodeFilter.hpp IDOM_NodeIterator.hpp
                        IDOM_NodeList.hpp IDOM_Notation.hpp
                        IDOM_ProcessingInstruction.hpp IDOM_Range.hpp
                        IDOM_RangeException.hpp IDOM_Text.hpp
                        IDOM_TreeWalker.hpp IDParentNode.hpp
               contrib/Axis-C++/xerces-c/include/xercesc/internal
                        CharTypeTables.hpp ElemStack.hpp
                        EndOfEntityException.hpp ReaderMgr.hpp
                        VecAttrListImpl.hpp VecAttributesImpl.hpp
                        XMLInternalErrorHandler.hpp XMLReader.hpp
                        XMLScanner.hpp
               contrib/Axis-C++/xerces-c/include/xercesc/parsers
                        DOMParser.hpp IDOMParser.hpp SAX2XMLReaderImpl.hpp
                        SAXParser.hpp
               contrib/Axis-C++/xerces-c/include/xercesc/sax
                        AttributeList.hpp DTDHandler.hpp
                        DocumentHandler.hpp EntityResolver.hpp
                        ErrorHandler.hpp HandlerBase.hpp InputSource.hpp
                        Locator.hpp Parser.hpp SAXException.hpp
                        SAXParseException.hpp
               contrib/Axis-C++/xerces-c/include/xercesc/sax2
                        Attributes.hpp ContentHandler.hpp DeclHandler.hpp
                        DefaultHandler.hpp LexicalHandler.hpp
                        SAX2XMLReader.hpp XMLReaderFactory.hpp
               contrib/Axis-C++/xerces-c/include/xercesc/util
                        ArrayIndexOutOfBoundsException.hpp AutoSense.hpp
                        Base64.hpp BinFileInputStream.hpp
                        BinInputStream.hpp BinMemInputStream.hpp BitOps.hpp
                        BitSet.hpp CountedPointer.c CountedPointer.hpp
                        EmptyStackException.hpp FlagJanitor.c
                        FlagJanitor.hpp HashBase.hpp HashCMStateSet.hpp
                        HashPtr.hpp HashXMLCh.hpp HexBin.hpp
                        IOException.hpp IllegalArgumentException.hpp
                        InvalidCastException.hpp Janitor.c Janitor.hpp
                        KVStringPair.hpp KeyValuePair.c KeyValuePair.hpp
                        Mutexes.hpp NameIdPool.c NameIdPool.hpp
                        NoDefTranscoderException.hpp
                        NoSuchElementException.hpp NullPointerException.hpp
                        NumberFormatException.hpp ParseException.hpp
                        PlatformUtils.hpp QName.hpp RefArrayOf.c
                        RefArrayOf.hpp RefHash2KeysTableOf.c
                        RefHash2KeysTableOf.hpp RefHash3KeysIdPool.c
                        RefHash3KeysIdPool.hpp RefHashTableOf.c
                        RefHashTableOf.hpp RefStackOf.c RefStackOf.hpp
                        RefVectorOf.c RefVectorOf.hpp RuntimeException.hpp
                        SchemaDateTimeException.hpp StringPool.hpp
                        TransENameMap.c TransENameMap.hpp TransService.hpp
                        TranscodingException.hpp UTFDataFormatException.hpp
                        UnexpectedEOFException.hpp
                        UnsupportedEncodingException.hpp ValueArrayOf.c
                        ValueArrayOf.hpp ValueStackOf.c ValueStackOf.hpp
                        ValueVectorOf.c ValueVectorOf.hpp
                        XML256TableTranscoder.hpp XML88591Transcoder.hpp
                        XMLASCIITranscoder.hpp XMLAbstractDoubleFloat.hpp
                        XMLBigDecimal.hpp XMLBigInteger.hpp
                        XMLChTranscoder.hpp XMLDateTime.hpp XMLDeleterFor.c
                        XMLDeleterFor.hpp XMLDouble.hpp
                        XMLEBCDICTranscoder.hpp XMLEnumerator.hpp
                        XMLExceptMsgs.hpp XMLException.hpp XMLFloat.hpp
                        XMLIBM1140Transcoder.hpp XMLInteger.hpp
                        XMLMsgLoader.hpp XMLNetAccessor.hpp XMLNumber.hpp
                        XMLRegisterCleanup.hpp XMLString.hpp
                        XMLStringTokenizer.hpp XMLUCS4Transcoder.hpp
                        XMLURL.hpp XMLUTF16Transcoder.hpp
                        XMLUTF8Transcoder.hpp XMLUni.hpp XMLUniDefs.hpp
                        XMLUri.hpp XMLWin1252Transcoder.hpp XercesDefs.hpp
               contrib/Axis-C++/xerces-c/include/xercesc/util/Compilers
                        BorlandCDefs.hpp CSetDefs.hpp CodeWarriorDefs.hpp
                        DECCXXDefs.hpp GCCDefs.hpp HPCCDefs.hpp
                        IBMVAOS2Defs.hpp IBMVAW32Defs.hpp MIPSproDefs.hpp
                        MVSCPPDefs.hpp OS400SetDefs.hpp PTXCCDefs.hpp
                        SCOCCDefs.hpp SunCCDefs.hpp SunKaiDefs.hpp
                        TandemCCDefs.hpp VCPPDefs.hpp
               contrib/Axis-C++/xerces-c/include/xercesc/util/MsgLoaders/ICU
                        ICUMsgLoader.hpp
               contrib/Axis-C++/xerces-c/include/xercesc/util/MsgLoaders/InMemory
                        CppErrMsgs_EN_US.hpp InMemMsgLoader.hpp
               contrib/Axis-C++/xerces-c/include/xercesc/util/MsgLoaders/MsgCatalog
                        MsgCatalogLoader.hpp XMLMsgCat_Ids.hpp
               contrib/Axis-C++/xerces-c/include/xercesc/util/MsgLoaders/Win32
                        Win32MsgLoader.hpp
               contrib/Axis-C++/xerces-c/include/xercesc/util/Platforms/AIX
                        AIXDefs.hpp
               contrib/Axis-C++/xerces-c/include/xercesc/util/Platforms/HPUX
                        HPUXDefs.hpp
               contrib/Axis-C++/xerces-c/include/xercesc/util/Platforms/Linux
                        LinuxDefs.hpp
               contrib/Axis-C++/xerces-c/include/xercesc/util/Platforms/OS2
                        OS2Defs.hpp
               contrib/Axis-C++/xerces-c/include/xercesc/util/Platforms/OS390
                        OS390Defs.hpp
               contrib/Axis-C++/xerces-c/include/xercesc/util/Platforms/PTX
                        PTXDefs.hpp
               contrib/Axis-C++/xerces-c/include/xercesc/util/Platforms/Solaris
                        SolarisDefs.hpp
               contrib/Axis-C++/xerces-c/include/xercesc/util/Platforms/Tandem
                        TandemDefs.hpp
               contrib/Axis-C++/xerces-c/include/xercesc/util/Platforms/Win32
                        Win32Defs.hpp
               contrib/Axis-C++/xerces-c/include/xercesc/util/Transcoders/ICU
                        ICUTransService.hpp
               contrib/Axis-C++/xerces-c/include/xercesc/util/Transcoders/Iconv
                        IconvTransService.hpp
               contrib/Axis-C++/xerces-c/include/xercesc/util/Transcoders/Win32
                        Win32TransService.hpp
               contrib/Axis-C++/xerces-c/include/xercesc/util/regx
                        ASCIIRangeFactory.hpp BMPattern.hpp
                        BlockRangeFactory.hpp CharToken.hpp
                        ClosureToken.hpp ConcatToken.hpp ConditionToken.hpp
                        Match.hpp ModifierToken.hpp Op.hpp OpFactory.hpp
                        ParenToken.hpp ParserForXMLSchema.hpp
                        RangeFactory.hpp RangeToken.hpp RangeTokenMap.hpp
                        RegularExpression.hpp RegxDefs.hpp RegxParser.hpp
                        RegxUtil.hpp StringToken.hpp Token.hpp
                        TokenFactory.hpp TokenInc.hpp UniCharTable.hpp
                        UnicodeRangeFactory.hpp UnionToken.hpp
                        XMLRangeFactory.hpp XMLUniCharacter.hpp
               contrib/Axis-C++/xerces-c/include/xercesc/validators/DTD
                        DTDAttDef.hpp DTDAttDefList.hpp DTDElementDecl.hpp
                        DTDEntityDecl.hpp DTDGrammar.hpp DTDScanner.hpp
                        DTDValidator.hpp DocTypeHandler.hpp
               contrib/Axis-C++/xerces-c/include/xercesc/validators/common
                        AllContentModel.hpp CMAny.hpp CMBinaryOp.hpp
                        CMLeaf.hpp CMNode.hpp CMStateSet.hpp CMUnaryOp.hpp
                        ContentLeafNameTypeVector.hpp ContentSpecNode.hpp
                        DFAContentModel.hpp Grammar.hpp GrammarResolver.hpp
                        MixedContentModel.hpp SimpleContentModel.hpp
               contrib/Axis-C++/xerces-c/include/xercesc/validators/datatype
                        AbstractNumericFacetValidator.hpp
                        AbstractNumericValidator.hpp
                        AbstractStringValidator.hpp
                        AnySimpleTypeDatatypeValidator.hpp
                        AnyURIDatatypeValidator.hpp
                        Base64BinaryDatatypeValidator.hpp
                        BooleanDatatypeValidator.hpp DatatypeValidator.hpp
                        DatatypeValidatorFactory.hpp
                        DateDatatypeValidator.hpp
                        DateTimeDatatypeValidator.hpp DateTimeValidator.hpp
                        DayDatatypeValidator.hpp
                        DecimalDatatypeValidator.hpp
                        DoubleDatatypeValidator.hpp
                        DurationDatatypeValidator.hpp
                        ENTITYDatatypeValidator.hpp
                        FloatDatatypeValidator.hpp
                        HexBinaryDatatypeValidator.hpp
                        IDDatatypeValidator.hpp IDREFDatatypeValidator.hpp
                        InvalidDatatypeFacetException.hpp
                        InvalidDatatypeValueException.hpp
                        ListDatatypeValidator.hpp
                        MonthDatatypeValidator.hpp
                        MonthDayDatatypeValidator.hpp
                        NCNameDatatypeValidator.hpp
                        NOTATIONDatatypeValidator.hpp
                        NameDatatypeValidator.hpp
                        QNameDatatypeValidator.hpp
                        StringDatatypeValidator.hpp
                        TimeDatatypeValidator.hpp
                        UnionDatatypeValidator.hpp
                        YearDatatypeValidator.hpp
                        YearMonthDatatypeValidator.hpp
               contrib/Axis-C++/xerces-c/include/xercesc/validators/schema
                        ComplexTypeInfo.hpp GeneralAttributeCheck.hpp
                        NamespaceScope.hpp SchemaAttDef.hpp
                        SchemaAttDefList.hpp SchemaElementDecl.hpp
                        SchemaGrammar.hpp SchemaInfo.hpp SchemaSymbols.hpp
                        SchemaValidator.hpp SubstitutionGroupComparator.hpp
                        TraverseSchema.hpp XUtil.hpp XercesAttGroupInfo.hpp
                        XercesElementWildcard.hpp XercesGroupInfo.hpp
               contrib/Axis-C++/xerces-c/include/xercesc/validators/schema/identity
                        FieldActivator.hpp FieldValueMap.hpp IC_Field.hpp
                        IC_Key.hpp IC_KeyRef.hpp IC_Selector.hpp
                        IC_Unique.hpp IdentityConstraint.hpp ValueStore.hpp
                        ValueStoreCache.hpp XPathException.hpp
                        XPathMatcher.hpp XPathMatcherStack.hpp
                        XPathSymbols.hpp XercesXPath.hpp
  Log:
  update with new XML parser lib
  
  Revision  Changes    Path
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/framework/LocalFileInputSource.hpp
  
  Index: LocalFileInputSource.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: LocalFileInputSource.hpp,v $
   * Revision 1.1  2002/10/23 08:55:09  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:21:50  peiyongz
   * sane_include
   *
   * Revision 1.7  2001/10/13 04:21:53  jasons
   * This patch resolves bug #2409: undocumented XMLException in LocalFileInputSource::new()
   *
   * Revision 1.6  2000/12/14 18:49:53  tng
   * Fix API document generation warning: "Warning: end of member group without matching begin"
   *
   * Revision 1.5  2000/02/24 20:00:22  abagchi
   * Swat for removing Log from API docs
   *
   * Revision 1.4  2000/02/15 23:59:06  roddey
   * More updated documentation of Framework classes.
   *
   * Revision 1.3  2000/02/15 01:21:30  roddey
   * Some initial documentation improvements. More to come...
   *
   * Revision 1.2  2000/02/06 07:47:46  rahulj
   * Year 2K copyright swat.
   *
   * Revision 1.1  2000/01/12 18:58:06  roddey
   * Putting this back with the correct lower case extension.
   *
   * Revision 1.1  2000/01/12 00:13:26  roddey
   * These were moved from internal/ to framework/, which was something that should have
   * happened long ago. They are really framework type of classes.
   *
   * Revision 1.1.1.1  1999/11/09 01:08:10  twl
   * Initial checkin
   *
   * Revision 1.2  1999/11/08 20:44:43  rahul
   * Swat for adding in Product name and CVS comment log variable.
   *
   */
  
  
  #if !defined(LOCALFILEINPUTSOURCE_HPP)
  #define LOCALFILEINPUTSOURCE_HPP
  
  #include <xercesc/sax/InputSource.hpp>
  
  class BinInputStream;
  
  /**
   *  This class is a derivative of the standard InputSource class. It provides
   *  for the parser access to data which is referenced via a local file path,
   *  as apposed to remote file or URL. This is the most efficacious mechanism
   *  by which local files can be parsed, since the parse knows that it refers
   *  to a local file and will make no other attempts to interpret the passed
   *  path.
   *
   *  The path provided can either be a fully qualified path or a relative path.
   *  If relative, it will be completed either relative to a passed base path
   *  or relative to the current working directory of the process.
   *
   *  As with all InputSource derivatives. The primary objective of an input
   *  source is to create an input stream via which the parser can spool in
   *  data from the referenced source.
   */
  class XMLPARSER_EXPORT LocalFileInputSource : public InputSource
  {
  public :
      // -----------------------------------------------------------------------
      //  Constructors and Destructor
      // -----------------------------------------------------------------------
  
      /** @name Constructors */
      //@{
  
      /**
        * A local file input source requires a path to the file to load. This
        * can be provided either as a fully qualified path, a path relative to
        * the current working directly, or a path relative to a provided base
        * path.
        *
        * The completed path will become the system id of this input source.
        * The constructors don't take any public id for local files, but you
        * still set them via the parent class' setPublicId() method of course.
        *
        * This constructor takes an explicit base path and a possibly relative
        * path. If the relative path is seen to be fully qualified, it is used
        * as is. Otherwise, it is made relative to the passed base path.
        *
        * @param  basePath    The base path from which the passed relative path
        *                     will be based, if the relative part is indeed
        *                     relative.
        *
        * @param  relativePath    The relative part of the path. It can actually
        *                         be fully qualified, in which case it is taken
        *                         as is.
        * @exception XMLException If the path is relative and doesn't properly
        *            resolve to a file.
        */
      LocalFileInputSource
      (
          const   XMLCh* const    basePath
          , const XMLCh* const    relativePath
      );
  
      /**
        * This constructor takes a single parameter which is the fully qualified
        * or relative path. If it is fully qualified, it is taken as is. If it is
        * relative, then it is completed relative to the current working directory
        * (or the equivalent on the local host machine.)
        *
        * The completed path will become the system id of this input source.
        * The constructors don't take any public id for local files, but you
        * still set them via the parent class' setPublicId() method of course.
        *
        * @param  filePath    The relative or fully qualified path.
        *
        * @exception XMLException If the path is relative and doesn't properly
        *            resolve to a file.
        */
      LocalFileInputSource
      (
          const   XMLCh* const    filePath
      );
      //@}
  
      /** @name Destructor */
      //@{
      ~LocalFileInputSource();
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Virtual input source interface
      // -----------------------------------------------------------------------
  
      /** @name Virtual methods */
      //@{
  
      /**
      * This method will return a binary input stream derivative that will
      * parse from the local file indicatedby the system id.
      *
      * @return A dynamically allocated binary input stream derivative that
      *         can parse from the file indicated by the system id.
      */
      virtual BinInputStream* makeStream() const;
  
      //@}
  };
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/framework/MemBufInputSource.hpp
  
  Index: MemBufInputSource.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: MemBufInputSource.hpp,v $
   * Revision 1.1  2002/10/23 08:55:09  lilantha
   * update with new XML parser lib
   *
   * Revision 1.2  2002/02/20 18:17:01  tng
   * [Bug 5977] Warnings on generating apiDocs.
   *
   * Revision 1.1.1.1  2002/02/01 22:21:50  peiyongz
   * sane_include
   *
   * Revision 1.6  2000/12/14 18:49:54  tng
   * Fix API document generation warning: "Warning: end of member group without matching begin"
   *
   * Revision 1.5  2000/02/24 20:00:22  abagchi
   * Swat for removing Log from API docs
   *
   * Revision 1.4  2000/02/15 23:59:06  roddey
   * More updated documentation of Framework classes.
   *
   * Revision 1.3  2000/02/15 01:21:30  roddey
   * Some initial documentation improvements. More to come...
   *
   * Revision 1.2  2000/02/06 07:47:46  rahulj
   * Year 2K copyright swat.
   *
   * Revision 1.1  2000/01/12 00:13:26  roddey
   * These were moved from internal/ to framework/, which was something that should have
   * happened long ago. They are really framework type of classes.
   *
   * Revision 1.1.1.1  1999/11/09 01:08:10  twl
   * Initial checkin
   *
   * Revision 1.2  1999/11/08 20:44:43  rahul
   * Swat for adding in Product name and CVS comment log variable.
   *
   */
  
  
  #if !defined(MEMBUFINPUTSOURCE_HPP)
  #define MEMBUFINPUTSOURCE_HPP
  
  #include <xercesc/sax/InputSource.hpp>
  
  class BinInputStream;
  
  
  /**
   *  This class is a derivative of the standard InputSource class. It provides
   *  for the parser access to data stored in a memory buffer. The type of
   *  buffer and its host specific attributes are of little concern here. The
   *  only real requirement is that the memory be readable by the current
   *  process.
   *
   *  Note that the memory buffer size is expressed in <b>bytes</b>, not in
   *  characters. If you pass it text data, you must account for the bytes
   *  per character when indicating the buffer size.
   *
   *  As with all InputSource derivatives. The primary objective of an input
   *  source is to create an input stream via which the parser can spool in
   *  data from the referenced source. In this case, there are two options
   *  available.
   *
   *  The passed buffer can be adopted or merely referenced. If it is adopted,
   *  then it must be dynamically allocated and will be destroyed when the
   *  input source is destroyed (no reference counting!.) If not adopted, the
   *  caller must insure that it remains valid until the input source object
   *  is destroyed.
   *
   *  The other option indicates whether each stream created for this input
   *  source should get its own copy of the data, or whether it should just
   *  stream the data directly from this object's copy of the data. The same
   *  rules apply here, in that the buffer must either be copied by the
   *  stream or it must remain valid until the stream is destroyed.
   */
  class XMLPARSER_EXPORT MemBufInputSource : public InputSource
  {
  public :
      // -----------------------------------------------------------------------
      //  Constructors and Destructor
      // -----------------------------------------------------------------------
  
      /** @name Constructors */
      //@{
  
      /**
        * A memory buffer input source is constructed from a buffer of byte
        * data, and the count of bytes in that buffer. The parser will parse
        * from this memory buffer until it has eaten the indicated number of
        * bytes.
        *
        * Note that the system id provided serves two purposes. Firstly it is
        * going to be displayed in error messages as the source of the error.
        * And secondly, any entities which are refered to from this entity
        * via relative paths/URLs will be relative to this fake system id.
        *
        * @param  srcDocBytes     The actual data buffer to be parsed from.
        * @param  byteCount       The count of bytes (not characters, bytes!)
        *                         in the buffer.
        * @param  bufId           A fake system id for the buffer.
        * @param  adoptBuffer     Indicates whether this object should adopt
        *                         the buffer (i.e. make a copy of it) or just
        *                         use it in place.
        */
      MemBufInputSource
      (
          const   XMLByte* const  srcDocBytes
          , const unsigned int    byteCount
          , const XMLCh* const    bufId
          , const bool            adoptBuffer = false
      );
  
      /**
        * This constructor is identical to the previous one, except that it takes
        * the fake system id in local code page form and transcodes it internally.
        */
      MemBufInputSource
      (
          const   XMLByte* const  srcDocBytes
          , const unsigned int    byteCount
          , const char* const     bufId
          , const bool            adoptBuffer = false
      );
      //@}
  
      /** @name Destructor */
      //@{
      /**
        * If the buffer was adopted, the copy made during construction is deleted
        * at this point.
        */
      ~MemBufInputSource();
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Virtual input source interface
      // -----------------------------------------------------------------------
  
      /** @name Virtual methods */
      //@{
  
      /**
        * This method will return a binary input stream derivative that will
        * parse from the memory buffer. If setCopyBufToStream() has been set,
        * then the stream will make its own copy. Otherwise, it will use the
        * buffer as is (in which case it must remain valid until the stream
        * is no longer in use, i.e. the parse completes.)
        *
        * @return A dynamically allocated binary input stream derivative that
        *         can parse from the memory buffer.
        */
      BinInputStream* makeStream() const;
  
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Setter methods
      // -----------------------------------------------------------------------
  
      /** @name Setter methods */
  
      //@{
  
      /**
        * By default, for safety's sake, each newly created stream from this
        * input source will make its own copy of the buffer to stream from. This
        * avoids having to deal with aliasing of the buffer for simple work. But,
        * for higher performance applications or for large buffers, this is
        * obviously not optimal.
        *
        * In such cases, you can call this method to turn off that default
        * action. Once turned off, the streams will just get a pointer to the
        * buffer and parse directly from that. In this case, you must insure that
        * the buffer remains valid for as long as any parse events are still
        * using it.
        *
        * @param  newState    The new boolean flag state to set.
        */
      void setCopyBufToStream(const bool newState);
  
      //@}
  
  
  private :
      // -----------------------------------------------------------------------
      //  Private data members
      //
      //  fAdopted
      //      Indicates whether the buffer is adopted or not. If so, then it
      //      is destroyed when the input source is destroyed.
      //
      //  fByteCount
      //      The size of the source document.
      //
      //  fCopyBufToStream
      //      This defaults to true (the safe option), which causes it to
      //      give a copy of the buffer to any streams it creates. If you set
      //      it to false, it will allow the streams to just reference the
      //      buffer (in which case this input source must stay alive as long
      //      as the buffer is in use by the stream.)
      //
      //  fSrcBytes
      //      The source memory buffer that is being spooled from. Whether it
      //      belongs to the this input source or not is controlled by the
      //      fAdopted flag.
      // -----------------------------------------------------------------------
      bool            fAdopted;
      unsigned int    fByteCount;
      bool            fCopyBufToStream;
      const XMLByte*  fSrcBytes;
  };
  
  
  inline void MemBufInputSource::setCopyBufToStream(const bool newState)
  {
      fCopyBufToStream = newState;
  }
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/framework/StdInInputSource.hpp
  
  Index: StdInInputSource.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: StdInInputSource.hpp,v $
   * Revision 1.1  2002/10/23 08:55:09  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:21:50  peiyongz
   * sane_include
   *
   * Revision 1.6  2000/12/14 18:49:55  tng
   * Fix API document generation warning: "Warning: end of member group without matching begin"
   *
   * Revision 1.5  2000/02/24 20:00:22  abagchi
   * Swat for removing Log from API docs
   *
   * Revision 1.4  2000/02/15 23:59:06  roddey
   * More updated documentation of Framework classes.
   *
   * Revision 1.3  2000/02/15 01:21:30  roddey
   * Some initial documentation improvements. More to come...
   *
   * Revision 1.2  2000/02/06 07:47:46  rahulj
   * Year 2K copyright swat.
   *
   * Revision 1.1  2000/01/12 00:13:26  roddey
   * These were moved from internal/ to framework/, which was something that should have
   * happened long ago. They are really framework type of classes.
   *
   * Revision 1.1.1.1  1999/11/09 01:08:17  twl
   * Initial checkin
   *
   * Revision 1.2  1999/11/08 20:44:44  rahul
   * Swat for adding in Product name and CVS comment log variable.
   *
   */
  
  
  #if !defined(STDININPUTSOURCE_HPP)
  #define STDININPUTSOURCE_HPP
  
  #include <xercesc/sax/InputSource.hpp>
  
  class BinInputStream;
  
  
  /**
   *  This class is a derivative of the standard InputSource class. It provides
   *  for the parser access to data via the standard input. This input source
   *  is not commonly used, but can be useful when implementing such things
   *  as pipe based tools which exchange XML data.
   *
   *  As with all InputSource derivatives. The primary objective of an input
   *  source is to create an input stream via which the parser can spool in
   *  data from the referenced source.
   */
  class XMLPARSER_EXPORT StdInInputSource : public InputSource
  {
  public :
      // -----------------------------------------------------------------------
      //  Constructors and Destructor
      // -----------------------------------------------------------------------
  
      /** @name Constructor */
      //@{
  
      /**
        * Since the standard input is a canned source, the constructor is very
        * simple. It just uses local platform services to open up the standard
        * input source as file, a new handleof which it gives to each new stream
        * it creates.
        */
      StdInInputSource();
      //@}
  
      /** @name Destructor */
      //@{
      ~StdInInputSource();
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Virtual input source interface
      // -----------------------------------------------------------------------
  
  
      /** @name Virtual methods */
      //@{
  
      /**
       * This method will return a binary input stream derivative that will
       * parse from the standard input of the local host.
       *
       * @return A dynamically allocated binary input stream derivative that
       *         can parse from the standardinput.
       */
      BinInputStream* makeStream() const;
  
      //@}
  };
  
  inline StdInInputSource::StdInInputSource() :
  
      InputSource("stdin")
  {
  }
  
  inline StdInInputSource::~StdInInputSource()
  {
  }
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/framework/URLInputSource.hpp
  
  Index: URLInputSource.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: URLInputSource.hpp,v $
   * Revision 1.1  2002/10/23 08:55:09  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:21:50  peiyongz
   * sane_include
   *
   * Revision 1.8  2000/12/14 18:49:56  tng
   * Fix API document generation warning: "Warning: end of member group without matching begin"
   *
   * Revision 1.7  2000/02/24 20:00:22  abagchi
   * Swat for removing Log from API docs
   *
   * Revision 1.6  2000/02/15 23:59:07  roddey
   * More updated documentation of Framework classes.
   *
   * Revision 1.5  2000/02/15 01:21:30  roddey
   * Some initial documentation improvements. More to come...
   *
   * Revision 1.4  2000/02/06 07:47:46  rahulj
   * Year 2K copyright swat.
   *
   * Revision 1.3  2000/01/26 18:56:02  roddey
   * Needed to include XMLURL.hpp so that it compiles standalone.
   *
   * Revision 1.2  2000/01/15 01:26:16  rahulj
   * Added support for HTTP to the parser using libWWW 5.2.8.
   * Renamed URL.[ch]pp to XMLURL.[ch]pp and like wise for the class name.
   * Only tested under NT 4.0 SP 5.
   * Removed URL.hpp from files where it was not used.
   *
   * Revision 1.1  2000/01/12 00:13:26  roddey
   * These were moved from internal/ to framework/, which was something that should have
   * happened long ago. They are really framework type of classes.
   *
   * Revision 1.1.1.1  1999/11/09 01:08:18  twl
   * Initial checkin
   *
   * Revision 1.2  1999/11/08 20:44:44  rahul
   * Swat for adding in Product name and CVS comment log variable.
   *
   */
  
  
  
  #if !defined(URLINPUTSOURCE_HPP)
  #define URLINPUTSOURCE_HPP
  
  #include <xercesc/util/XMLURL.hpp>
  #include <xercesc/sax/InputSource.hpp>
  
  class BinInputStream;
  
  /**
   *  This class is a derivative of the standard InputSource class. It provides
   *  for the parser access to data which is referenced via a URL, as apposed to
   *  a local file name. The URL can be provided via an XMLURL class, as a fully
   *  qualified system id, or a base system id and a system id which may be
   *  fully qualified or may be relative to the base.
   *
   *  As with all InputSource derivatives. The primary objective of an input
   *  source is to create an input stream via which the parser can spool in
   *  data from the referenced source.
   *
   *  Note that the parse system does not necessarily support URL based XML
   *  entities out of the box. Support for socket based access is optional and
   *  controlled by the per-platform support.
   */
  class XMLPARSER_EXPORT URLInputSource : public InputSource
  {
  public :
      // -----------------------------------------------------------------------
      //  Constructors and Destructor
      // -----------------------------------------------------------------------
  
      /** @name Constructors */
      //@{
  
      /**
        * This constructor accepts an already built URL. It is assumed that
        * it is correct and it will be used as is. In this case, no public id
        * accepted, but it can still be set via the parent class' setPublicId()
        * method.
        *
        * @param  urlId   The URL which holds the system id of the entity
        *                 to parse.
        */
      URLInputSource(const XMLURL& urlId);
  
  
      /**
       *  This constructor takes a base system id URL and a possibly relative
       *  system id. The relative part is parsed and, if it is indeed relative,
       *  it will be made relative to the passed base id. Otherwise, it will be
       *  taken as is.
       *
       *  @param  baseId      The base system id URL which provides the base
       *                      for any relative id part.
       *
       *  @param  systemId    The possibly relative system id URL. If its relative
       *                      its based on baseId, else its taken as is.
       */
      URLInputSource
      (
          const   XMLCh* const    baseId
          , const XMLCh* const    systemId
      );
  
      /**
       *  This constructor is indentical to the previous one, except that it also
       *  allows you to set a public id if you want to.
       *
       *  @param  baseId      The base system id URL which provides the base
       *                      for any relative id part.
       *
       *  @param  systemId    The possibly relative system id URL. If its relative
       *                      its based on baseId, else its taken as is.
       *
       *  @param  publicId    The optional public id to set. This is just passed
       *                      on to the parent class for storage.
       */
      URLInputSource
      (
          const   XMLCh* const    baseId
          , const XMLCh* const    systemId
          , const XMLCh* const    publicId
      );
  
  
      /**
       *  This constructor is identical to the second constructor above, except that
       *  it accepts the relative system id part as a local code page string and
       *  just transcodes it internally, as a convenience.
       *
       *  @param  baseId      The base system id URL which provides the base
       *                      for any relative id part.
       *
       *  @param  systemId    The possibly relative system id URL. If its relative
       *                      its based on baseId, else its taken as is.
       */
      URLInputSource
      (
          const   XMLCh* const    baseId
          , const char* const     systemId
      );
  
      /**
       *  This constructor is identical to the third constructor above, except that
       *  it accepts the relative and public ids as local code page strings and just
       *  transcodes them internally, as a convenience.
       *
       *  @param  baseId      The base system id URL which provides the base
       *                      for any relative id part.
       *
       *  @param  systemId    The possibly relative system id URL. If its relative
       *                      its based on baseId, else its taken as is.
       *
       *  @param  publicId    The optional public id to set. This is just passed
       *                      on to the parent class for storage.
       *                      on to the parent class for storage.
       */
      URLInputSource
      (
          const   XMLCh* const    baseId
          , const char* const     systemId
          , const char* const     publicId
      );
  
      //@}
  
      /** @name Destructor */
      //@{
      ~URLInputSource();
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Virtual input source interface
      // -----------------------------------------------------------------------
  
      /** @name Virtual methods */
      //@{
  
      /**
       * This method will return a binary input stream derivative that will
       * parse from the source refered to by the URL system id.
       */
      BinInputStream* makeStream() const;
  
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Getter methods
      // -----------------------------------------------------------------------
  
      /** @name Getter methods */
      //@{
  
      /**
        * This method will return a const reference to the URL member which
        * contains the system id in pre-parsed URL form. If you just want the
        * string format, call getSystemId() on the parent class.
        *
        * @return A const reference to a URL object that contains the current
        *         system id set for this input source.
        */
      const XMLURL& urlSrc() const;
  
      //@}
  
  
  private :
      // -----------------------------------------------------------------------
      //  Private data members
      //
      //  fURL
      //      This is the URL created from the passed ids.
      // -----------------------------------------------------------------------
      XMLURL fURL;
  };
  
  
  inline const XMLURL& URLInputSource::urlSrc() const
  {
      return fURL;
  }
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/framework/XMLAttDef.hpp
  
  Index: XMLAttDef.hpp
  ===================================================================
  /*
   * 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/>.
   */
  
  /*
   * $Log: XMLAttDef.hpp,v $
   * Revision 1.1  2002/10/23 08:55:09  lilantha
   * update with new XML parser lib
   *
   * Revision 1.2  2002/02/20 18:17:01  tng
   * [Bug 5977] Warnings on generating apiDocs.
   *
   * Revision 1.1.1.1  2002/02/01 22:21:50  peiyongz
   * sane_include
   *
   * Revision 1.13  2001/11/15 16:36:36  knoaman
   * Re-organize constant values.
   *
   * Revision 1.12  2001/08/09 15:23:37  knoaman
   * add support for <anyAttribute> declaration.
   *
   * Revision 1.11  2001/06/21 14:25:26  knoaman
   * Fix for bug 1946
   *
   * Revision 1.10  2001/05/11 13:25:31  tng
   * Copyright update.
   *
   * Revision 1.9  2001/02/27 18:48:20  tng
   * Schema: Add SchemaAttDef, SchemaElementDecl, SchemaAttDefList.
   *
   * Revision 1.8  2000/12/14 18:49:56  tng
   * Fix API document generation warning: "Warning: end of member group without matching begin"
   *
   * Revision 1.7  2000/11/30 18:22:38  andyh
   * reuseValidator - fix bugs (spurious errors) that occured on reuse due to
   * pools already containing some items.  Fixed by Tinny Ng.
   *
   * Revision 1.6  2000/07/07 22:23:38  jpolast
   * remove useless getKey() functions.
   *
   * Revision 1.5  2000/02/24 20:00:22  abagchi
   * Swat for removing Log from API docs
   *
   * Revision 1.4  2000/02/16 23:03:48  roddey
   * More documentation updates
   *
   * Revision 1.3  2000/02/15 01:21:30  roddey
   * Some initial documentation improvements. More to come...
   *
   * Revision 1.2  2000/02/06 07:47:46  rahulj
   * Year 2K copyright swat.
   *
   * Revision 1.1.1.1  1999/11/09 01:08:27  twl
   * Initial checkin
   *
   * Revision 1.2  1999/11/08 20:44:34  rahul
   * Swat for adding in Product name and CVS comment log variable.
   *
   */
  
  #if !defined(ATTDEF_HPP)
  #define ATTDEF_HPP
  
  #include <xercesc/util/XMLString.hpp>
  
  class XMLAttr;
  
  /** Represents the core information of an atribute definition
   *
   *  This class defines the basic characteristics of an attribute, no matter
   *  what type of validator is used. If a particular schema associates more
   *  information with an attribute it will create a derivative of this class.
   *  So this class provides an abstract way to get basic information on
   *  attributes from any type of validator.
   *
   *  This class supports keyed collection semantics on the fully qualified
   *  attribute name, by providing a getKey() method to extract the key string.
   *  getKey(), in this case, just calls the virtual method getFullName() to
   *  get the fully qualified name, as defined by the derived class.
   *
   *  Note that the 'value' of an attribute type definition is the default or
   *  of fixed value given to it in its definition. If the attribute is of the
   *  enumerated or notation type, it will have an 'enumeration value' as well
   *  which is a space separated list of its possible vlaues.
   */
  class XMLPARSER_EXPORT XMLAttDef
  {
  public:
      // -----------------------------------------------------------------------
      //  Class specific types
      //
      //  AttTypes
      //      The list of possible types that an attribute can have, according
      //      to the XML 1.0 spec and schema.
      //
      //  DefAttTypes
      //      The modifiers that an attribute decl can have, which indicates
      //      whether instances of that attributes are required, implied, etc..
      //
      //  CreateReasons
      //      This type is used to store how an attribute declaration got into
      //      the elementdecl's attribute pool.
      //
      // -----------------------------------------------------------------------
  	enum AttTypes
      {
          CData               = 0
          , ID                = 1
          , IDRef             = 2
          , IDRefs            = 3
          , Entity            = 4
          , Entities          = 5
          , NmToken           = 6
          , NmTokens          = 7
          , Notation          = 8
          , Enumeration       = 9
          , Simple            = 10
          , Any_Any           = 11
          , Any_Other         = 12
          , Any_List          = 13
  
          , AttTypes_Count
          , AttTypes_Min      = 0
          , AttTypes_Max      = 13
          , AttTypes_Unknown  = -1
  	};
  
      enum DefAttTypes
      {
          Default                  = 0
          , Fixed                  = 1
          , Required               = 2
          , Required_And_Fixed     = 3
          , Implied                = 4
          , ProcessContents_Strict = 5
          , ProcessContents_Lax    = 6
          , ProcessContents_Skip   = 7
          , Prohibited             = 8
  
          , DefAttTypes_Count
          , DefAttTypes_Min   = 0
          , DefAttTypes_Max   = 8
          , DefAttTypes_Unknown = -1
  	};
  
      enum CreateReasons
      {
          NoReason
          , JustFaultIn
      };
  
      // -----------------------------------------------------------------------
      //  Public static data members
      // -----------------------------------------------------------------------
      static const unsigned int fgInvalidAttrId;
  
  
      // -----------------------------------------------------------------------
      //  Public, static methods
      // -----------------------------------------------------------------------
  
      /** @name Public, static methods */
      //@{
  
      /** Get a string representation of the passed attribute type enum
        *
        * This method allows you to get a textual representation of an attriubte
        * type, mostly for debug or display.
        *
        * @param attrType The attribute type value to get the string for.
        *
        * @return A const pointer to the static string that holds the text
        *         description of the passed type.
        */
      static const XMLCh* getAttTypeString(const AttTypes attrType);
  
      /** Get a string representation of the passed def attribute type enum
        *
        * This method allows you to get a textual representation of an default
        * attributetype, mostly for debug or display.
        *
        * @param attrType The default attribute type value to get the string for.
        *
        * @return A const pointer to the static string that holds the text
        *         description of the passed default type.
        */
      static const XMLCh* getDefAttTypeString(const DefAttTypes attrType);
  
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Destructor
      // -----------------------------------------------------------------------
  
      /** @name Destructor */
      //@{
  
      /**
        *  Destructor
        */
      virtual ~XMLAttDef();
      //@}
  
  
      // -----------------------------------------------------------------------
      //  The virtual attribute def interface
      // -----------------------------------------------------------------------
  
      /** @name Virtual interface */
      //@{
  
      /** Get the full name of this attribute type
        *
        * The derived class should return a const pointer to the full name of
        * this attribute. This will vary depending on the type of validator in
        * use.
        *
        * @return A const pointer to the full name of this attribute type.
        */
      virtual const XMLCh* getFullName() const = 0;
  
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Getter methods
      // -----------------------------------------------------------------------
  
      /** @name Getter methods */
      //@{
  
      /** Get the default type of this attribute type
        *
        * This method returns the 'default type' of the attribute. Default
        * type in this case refers to the XML concept of a default type for
        * an attribute, i.e. #FIXED, #IMPLIED, etc...
        *
        * @return The default type enum for this attribute type.
        */
      DefAttTypes getDefaultType() const;
  
      /** Get the enumeration value (if any) of this attribute type
        *
        * If the attribute is of an enumeration or notatin type, then this
        * method will return a const reference to a string that contains the
        * space separated values that can the attribute can have.
        *
        * @return A const pointer to a string that contains the space separated
        *         legal values for this attribute.
        */
      const XMLCh* getEnumeration() const;
  
      /** Get the pool id of this attribute type
        *
        * This method will return the id of this attribute in the validator's
        * attribute pool. It was set by the validator when this attribute was
        * created.
        *
        * @return The pool id of this attribute type.
        */
      unsigned int getId() const;
  
      /** Query whether the attribute was explicitly provided.
        *
        * When the scanner scans a start tag, it will ask the element decl
        * object of the element type of that start tag to clear the 'provided'
        * flag on all its attributes. As the scanner sees explicitly provided
        * attributes, its turns on this flag to indicate that this attribute
        * has been provided. In this way, the scanner can catch duplicated
        * attributes and required attributes that aren't provided, and default
        * in fixed/default valued attributes that are not explicitly provided.
        *
        * @return Returns a boolean value that indicates whether this attribute
        *         was explicitly provided.
        */
      bool getProvided() const;
  
      /** Get the type of this attribute
        *
        * Gets the type of this attribute. This type is represented by an enum
        * that convers the types of attributes allowed by XML, e.g. CDATA, NMTOKEN,
        * NOTATION, etc...
        *
        * @return The attribute type enumeration value for this type of
        *         attribute.
        */
      AttTypes getType() const;
  
      /** Get the default/fixed value of this attribute (if any.)
        *
        * If the attribute defined a default/fixed value, then it is stored
        * and this method will retrieve it. If it has non, then a null pointer
        * is returned.
        *
        * @return A const pointer to the default/fixed value for this attribute
        *         type.
        */
      const XMLCh* getValue() const;
  
      /** Get the create reason for this attribute
        *
        * This method returns an enumeration which indicates why this attribute
        * declaration exists.
        *
        * @return An enumerated value that indicates the reason why this attribute
        * was added to the attribute table.
        */
      CreateReasons getCreateReason() const;
  
      /** Indicate whether this attribute has been declared externally
        *
        * This method returns a boolean that indicates whether this attribute
        * has been declared externally.
        *
        * @return true if this attribute has been declared externally, else false.
        */
      bool isExternal() const;
  
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Setter methods
      // -----------------------------------------------------------------------
  
      /** @name Setter methods */
      //@{
  
      /** Set the default attribute type
        *
        * This method sets the default attribute type for this attribute.
        * This setting controls whether the attribute is required, fixed,
        * implied, etc...
        *
        * @param  newValue The new default attribute to set
        */
      void setDefaultType(const XMLAttDef::DefAttTypes newValue);
  
      /** Set the pool id for this attribute type.
        *
        * This method sets the pool id of this attribute type. This is usually
        * called by the validator that creates the actual instance (which is of
        * a derived type known only by the validator.)
        *
        * @param  newId The new pool id to set.
        */
      void setId(const unsigned int newId);
  
      /** Set or clear the 'provided' flag.
        *
        * This method will set or clear the 'provided' flag. This is called
        * by the scanner as it is scanning a start tag and marking off the
        * attributes that have been explicitly provided.
        *
        * @param  newValue The new provided state to set
        */
      void setProvided(const bool newValue);
  
      /** Set the type of this attribute type.
        *
        * This method will set the type of the attribute. The type of an attribute
        * controls how it is normalized and what kinds of characters it can hold.
        *
        * @param  newValue The new attribute type to set
        */
      void setType(const XMLAttDef::AttTypes newValue);
  
      /** Set the default/fixed value of this attribute type.
        *
        * This method set the fixed/default value for the attribute. This value
        * will be used when instances of this attribute type are faulted in. It
        * <b>must</b> be a valid value for the type set by setType(). If the
        * type is enumeration or notation, this must be one of the valid values
        * set in the setEnumeration() call.
        *
        * @param  newValue The new fixed/default value to set.
        */
      void setValue(const XMLCh* const newValue);
  
      /** Set the enumerated value of this attribute type.
        *
        * This method sets the enumerated/notation value list for this attribute
        * type. It is a space separated set of possible values. These values must
        * meet the constrains of the XML spec for such values of this type of
        * attribute. This should only be set if the setType() method is used to
        * set the type to the enumeration or notation types.
        *
        * @param  newValue The new enumerated/notation value list to set.
        */
      void setEnumeration(const XMLCh* const newValue);
  
      /** Update the create reason for this attribute type.
        *
        * This method will update the 'create reason' field for this attribute
        * decl object.
        *
        * @param  newReason The new create reason.
        */
      void setCreateReason(const CreateReasons newReason);
  
      /**
        * Set the attribute decl to indicate external declaration
        *
        * @param  aValue The new value to indicate external declaration.
        */
      void setExternalAttDeclaration(const bool aValue);
  
      //@}
  
  protected :
      // -----------------------------------------------------------------------
      //  Hidden constructors
      // -----------------------------------------------------------------------
      XMLAttDef
      (
          const   AttTypes            type = CData
          , const DefAttTypes         defType = Implied
      );
      XMLAttDef
      (
          const   XMLCh* const        attValue
          , const AttTypes            type
          , const DefAttTypes         defType
          , const XMLCh* const        enumValues = 0
      );
  
  
  private :
      // -----------------------------------------------------------------------
      //  Unimplemented constructors and operators
      // -----------------------------------------------------------------------
      XMLAttDef(const XMLAttDef&);
      void operator=(const XMLAttDef&);
  
  
      // -----------------------------------------------------------------------
      //  Private helper methods
      // -----------------------------------------------------------------------
      void cleanUp();
  
  
      // -----------------------------------------------------------------------
      //  Private data members
      //
      //  fDefaultType
      //      Indicates what, if any, default stuff this attribute has.
      //
      //  fEnumeration
      //      If its an enumeration, this is the list of values as space
      //      separated values.
      //
      //  fId
      //      This is the unique id of this attribute, given to it when its put
      //      into the validator's attribute decl pool. It defaults to the
      //      special value XMLAttrDef::fgInvalidAttrId.
      //
      //  fProvided
      //      This field is really for use by the scanner. It is used to track
      //      which of the attributes of an element were provided. Any marked
      //      as not provided (after scanning the start tag) and having a
      //      default type of Required, is in error.
      //
      //  fType
      //      The type of attribute, which is one of the AttTypes values.
      //
      //  fValue
      //      This is the value of the attribute, which is the default value
      //      given in the attribute declaration.
      //
      //  fCreateReason
      //      This flag tells us how this attribute got created.  Sometimes even
      //      the attribute was not declared for the element, we want to fault
      //      fault it into the pool to avoid lots of redundant errors.
      //
      //  fExternalAttribute
      //      This flag indicates whether or not the attribute was declared externally.
      // -----------------------------------------------------------------------
      DefAttTypes     fDefaultType;
      XMLCh*          fEnumeration;
      unsigned int    fId;
      bool            fProvided;
      AttTypes        fType;
      XMLCh*          fValue;
      CreateReasons   fCreateReason;
      bool            fExternalAttribute;
  };
  
  
  
  // ---------------------------------------------------------------------------
  //  Getter methods
  // ---------------------------------------------------------------------------
  inline XMLAttDef::DefAttTypes XMLAttDef::getDefaultType() const
  {
      return fDefaultType;
  }
  
  inline const XMLCh* XMLAttDef::getEnumeration() const
  {
      return fEnumeration;
  }
  
  inline unsigned int XMLAttDef::getId() const
  {
      return fId;
  }
  
  inline bool XMLAttDef::getProvided() const
  {
      return fProvided;
  }
  
  inline XMLAttDef::AttTypes XMLAttDef::getType() const
  {
      return fType;
  }
  
  inline const XMLCh* XMLAttDef::getValue() const
  {
      return fValue;
  }
  
  inline XMLAttDef::CreateReasons XMLAttDef::getCreateReason() const
  {
      return fCreateReason;
  }
  
  inline bool XMLAttDef::isExternal() const
  {
      return fExternalAttribute;
  }
  
  
  // ---------------------------------------------------------------------------
  //  XMLAttDef: Setter methods
  // ---------------------------------------------------------------------------
  inline void XMLAttDef::setDefaultType(const XMLAttDef::DefAttTypes newValue)
  {
      fDefaultType = newValue;
  }
  
  inline void XMLAttDef::setEnumeration(const XMLCh* const newValue)
  {
      delete [] fEnumeration;
  
      if (newValue) {
          fEnumeration = XMLString::replicate(newValue);
      }
      else {
          fEnumeration = 0;
      }
  }
  
  inline void XMLAttDef::setId(const unsigned int newId)
  {
      fId = newId;
  }
  
  inline void XMLAttDef::setProvided(const bool newValue)
  {
      fProvided = newValue;
  }
  
  inline void XMLAttDef::setType(const XMLAttDef::AttTypes newValue)
  {
      fType = newValue;
  }
  
  inline void XMLAttDef::setValue(const XMLCh* const newValue)
  {
      delete [] fValue;
      fValue = XMLString::replicate(newValue);
  }
  
  inline void
  XMLAttDef::setCreateReason(const XMLAttDef::CreateReasons newReason)
  {
      fCreateReason = newReason;
  }
  
  inline void XMLAttDef::setExternalAttDeclaration(const bool aValue)
  {
      fExternalAttribute = aValue;
  }
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/framework/XMLAttDefList.hpp
  
  Index: XMLAttDefList.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: XMLAttDefList.hpp,v $
   * Revision 1.1  2002/10/23 08:55:09  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:21:50  peiyongz
   * sane_include
   *
   * Revision 1.4  2000/02/24 20:00:22  abagchi
   * Swat for removing Log from API docs
   *
   * Revision 1.3  2000/02/15 01:21:30  roddey
   * Some initial documentation improvements. More to come...
   *
   * Revision 1.2  2000/02/06 07:47:46  rahulj
   * Year 2K copyright swat.
   *
   * Revision 1.1.1.1  1999/11/09 01:08:28  twl
   * Initial checkin
   *
   * Revision 1.2  1999/11/08 20:44:35  rahul
   * Swat for adding in Product name and CVS comment log variable.
   *
   */
  
  #if !defined(XMLATTDEFLIST_HPP)
  #define XMLATTDEFLIST_HPP
  
  #include <xercesc/util/XMLEnumerator.hpp>
  #include <xercesc/util/XMLString.hpp>
  #include <xercesc/framework/XMLAttDef.hpp>
  
  
  /**
   *  This class defines an abstract interface that all validators must support.
   *  When the scanner scans the attributes in a start tag, it must have a list
   *  of the defined attributes for that element. This is used to fault in
   *  defaulted and fixed attributes, to know which ones are required, and to
   *  know the their types in order to do the correct normalization.
   *
   *  Since each validator will have its own derivatives of XMLAttDef and will
   *  have its own specialized storage mechanisms for elements and the att
   *  defs that they own, there must be an abstracted way for the scanner to
   *  deal with this list.
   *
   *  It does not derive from the generic Enumerator template class, because
   *  there are portability issues with deriving from a template class in a
   *  DLL. It does though provide a similar enumerator interface.
   */
  class XMLPARSER_EXPORT XMLAttDefList
  {
  public:
      // -----------------------------------------------------------------------
      //  Constructors and Destructor
      // -----------------------------------------------------------------------
  
      /** @name Destructor */
      //@{
      virtual ~XMLAttDefList();
      //@}
  
  
      // -----------------------------------------------------------------------
      //  The virtual interface
      // -----------------------------------------------------------------------
      virtual bool hasMoreElements() const = 0;
      virtual bool isEmpty() const = 0;
      virtual XMLAttDef* findAttDef
      (
          const   unsigned long       uriID
          , const XMLCh* const        attName
      ) = 0;
      virtual const XMLAttDef* findAttDef
      (
          const   unsigned long       uriID
          , const XMLCh* const        attName
      )   const = 0;
      virtual XMLAttDef* findAttDef
      (
          const   XMLCh* const        attURI
          , const XMLCh* const        attName
      ) = 0;
      virtual const XMLAttDef* findAttDef
      (
          const   XMLCh* const        attURI
          , const XMLCh* const        attName
      )   const = 0;
      virtual XMLAttDef& nextElement() = 0;
      virtual void Reset() = 0;
  
  
  protected :
      // -----------------------------------------------------------------------
      //  Hidden constructors and operators
      // -----------------------------------------------------------------------
      XMLAttDefList();
      XMLAttDefList(const XMLAttDefList&);
      XMLAttDefList& operator=(const XMLAttDefList&);
  };
  
  
  // ---------------------------------------------------------------------------
  //  XMLAttDefList: Constructors and Destructor
  // ---------------------------------------------------------------------------
  inline XMLAttDefList::~XMLAttDefList()
  {
  }
  
  
  // ---------------------------------------------------------------------------
  //  XMLAttDefList: Hidden Constructors and Operators
  // ---------------------------------------------------------------------------
  inline XMLAttDefList::XMLAttDefList()
  {
  }
  
  inline XMLAttDefList::XMLAttDefList(const XMLAttDefList&)
  {
  }
  
  inline XMLAttDefList& XMLAttDefList::operator=(const XMLAttDefList&)
  {
      return *this;
  }
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/framework/XMLAttr.hpp
  
  Index: XMLAttr.hpp
  ===================================================================
  /*
   * 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/>.
   */
  
  /*
   * $Log: XMLAttr.hpp,v $
   * Revision 1.1  2002/10/23 08:55:09  lilantha
   * update with new XML parser lib
   *
   * Revision 1.2  2002/02/20 18:17:01  tng
   * [Bug 5977] Warnings on generating apiDocs.
   *
   * Revision 1.1.1.1  2002/02/01 22:21:50  peiyongz
   * sane_include
   *
   * Revision 1.9  2001/11/02 14:21:18  knoaman
   * Add support for identity constraints.
   *
   * Revision 1.8  2001/05/11 13:25:31  tng
   * Copyright update.
   *
   * Revision 1.7  2001/02/27 18:33:55  tng
   * Schema: Use QName in XMLAttr.
   *
   * Revision 1.6  2000/04/10 22:42:53  roddey
   * Extended the buffer reuse to the QName field, to further increase
   * performance of attribute heavy applications.
   *
   * Revision 1.5  2000/03/02 19:54:24  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:00:22  abagchi
   * Swat for removing Log from API docs
   *
   * Revision 1.3  2000/02/15 01:21:30  roddey
   * Some initial documentation improvements. More to come...
   *
   * Revision 1.2  2000/02/06 07:47:47  rahulj
   * Year 2K copyright swat.
   *
   * Revision 1.1.1.1  1999/11/09 01:08:28  twl
   * Initial checkin
   *
   * Revision 1.2  1999/11/08 20:44:35  rahul
   * Swat for adding in Product name and CVS comment log variable.
   *
   */
  
  #if !defined(XMLATTR_HPP)
  #define XMLATTR_HPP
  
  #include <xercesc/util/XMLString.hpp>
  #include <xercesc/util/QName.hpp>
  #include <xercesc/framework/XMLAttDef.hpp>
  
  
  /**
   *  This class defines the information about an attribute that will come out
   *  of the scanner during parsing. This information does not depend upon the
   *  type of validator because it is not tied to any scheme/DTD type info. Its
   *  just the raw XML 1.0 information that will be reported about an attribute
   *  in the startElement() callback method of the XMLDocumentHandler class.
   *  Hence it is not intended to be extended or derived from. Its designed to
   *  be used as is.
   *
   *  The 'specified' field of this class indicates whether the attribute was
   *  actually present or whether it was faulted in because it had a fixed or
   *  default value.
   *
   *  The code receiving this information can ask its validator for more info
   *  about the attribute, i.e. get its declaration from the DTD/Schema info.
   *
   *  Because of the heavy use (and reuse) of instances of this class, and the
   *  number of string members it has, this class takes pains to not reallocate
   *  string members unless it has to. It keeps up with how long each buffer
   *  is and only reallocates if the new value won't fit.
   */
  class XMLPARSER_EXPORT XMLAttr
  {
  public:
      // -----------------------------------------------------------------------
      //  Constructors and Destructor
      // -----------------------------------------------------------------------
      /** @name Constructors */
      //@{
  
      /**
        * The default constructor just setsup an empty attribute to be filled
        * in the later. Though the initial state is a reasonable one, it is
        * not documented because it should not be depended on.
        */
      XMLAttr();
  
      /**
        * This is the primary constructor which takes all of the information
        * required to construct a complete attribute object.
        *
        * @param  uriId       The id into the validator's URI pool of the URI
        *                     that the prefix mapped to. Only used if namespaces
        *                     are enabled/supported.
        *
        * @param  attrName    The base name of the attribute, i.e. the part
        *                     after any prefix.
        *
        * @param  attrPrefix  The prefix, if any, of this attribute's name. If
        *                     this is empty, then uriID is meaningless as well.
        *
        * @param  attrValue   The value string of the attribute, which should
        *                     be fully normalized by XML rules!
        *
        * @param  type        The type of the attribute. This will indicate
        *                     the type of normalization done and constrains
        *                     the value content. Make sure that the value
        *                     set meets the constraints!
        *
        * @param  specified   Indicates whether the attribute was explicitly
        *                     specified or not. If not, then it was faulted
        *                     in from a FIXED or DEFAULT value.
        */
      XMLAttr
      (
          const   unsigned int        uriId
          , const XMLCh* const        attrName
          , const XMLCh* const        attrPrefix
          , const XMLCh* const        attrValue
          , const XMLAttDef::AttTypes type = XMLAttDef::CData
          , const bool                specified = true
      );
      //@}
  
      /** @name Destructor */
      //@{
      ~XMLAttr();
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Getter methods
      // -----------------------------------------------------------------------
  
      /** @name Getter methods */
      //@{
  
      /**
        * This methode returns the attribute name in a QName format.
        */
      QName* getAttName() const;
  
      /**
        * This method gets a const pointer tot he name of the attribute. The
        * form of this name is defined by the validator in use.
        */
      const XMLCh* getName() const;
  
      /**
        * This method will get a const pointer to the prefix string of this
        * attribute. Since prefixes are optional, it may be zero.
        */
      const XMLCh* getPrefix() const;
  
      /**
        * This method will get the QName of this attribute, which will be the
        * prefix if any, then a colon, then the base name. If there was no
        * prefix, its the same as the getName() method.
        */
      const XMLCh* getQName() const;
  
      /**
        * This method will get the specified flag, which indicates whether
        * the attribute was explicitly specified or just faulted in.
        */
      bool getSpecified() const;
  
      /**
        * This method will get the type of the attribute. The available types
        * are defined by the XML specification.
        */
      XMLAttDef::AttTypes getType() const;
  
      /**
        * This method will get the value of the attribute. The value can be
        * be an empty string, but never null if the object is correctly
        * set up.
        */
      const XMLCh* getValue() const;
  
      /**
        * This method will get the id of the URI that this attribute's prefix
        * mapped to. If namespaces are not on, then its value is meaningless.
        */
      unsigned int getURIId() const;
  
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Setter methods
      // -----------------------------------------------------------------------
  
      /** @name Setter methods */
      //@{
  
      /**
        * This method is called to set up a default constructed object after
        * the fact, or to reuse a previously used object.
        *
        * @param  uriId       The id into the validator's URI pool of the URI
        *                     that the prefix mapped to. Only used if namespaces
        *                     are enabled/supported.
        *
        * @param  attrName    The base name of the attribute, i.e. the part
        *                     after any prefix.
        *
        * @param  attrPrefix  The prefix, if any, of this attribute's name. If
        *                     this is empty, then uriID is meaningless as well.
        *
        * @param  attrValue   The value string of the attribute, which should
        *                     be fully normalized by XML rules according to the
        *                     attribute type.
        *
        * @param  type        The type of the attribute. This will indicate
        *                     the type of normalization done and constrains
        *                     the value content. Make sure that the value
        *                     set meets the constraints!
        *
        */
      void set
      (
          const   unsigned int        uriId
          , const XMLCh* const        attrName
          , const XMLCh* const        attrPrefix
          , const XMLCh* const        attrValue
          , const XMLAttDef::AttTypes type = XMLAttDef::CData
      );
  
      /**
        * This method will update just the name related fields of the
        * attribute object. The other fields are left as is.
        *
        * @param  uriId       The id into the validator's URI pool of the URI
        *                     that the prefix mapped to. Only used if namespaces
        *                     are enabled/supported.
        *
        * @param  attrName    The base name of the attribute, i.e. the part
        *                     after any prefix.
        *
        * @param  attrPrefix  The prefix, if any, of this attribute's name. If
        *                     this is empty, then uriID is meaningless as well.
        */
      void setName
      (
          const   unsigned int        uriId
          , const XMLCh* const        attrName
          , const XMLCh* const        attrPrefix
      );
  
      /**
        * This method will update the specified state of the object.
        *
        * @param  newValue    Indicates whether the attribute was explicitly
        *                     specified or not. If not, then it was faulted
        *                     in from a FIXED or DEFAULT value.
        */
      void setSpecified(const bool newValue);
  
      /**
        * This method will update the attribute type of the object.
        *
        * @param  newType     The type of the attribute. This will indicate
        *                     the type of normalization done and constrains
        *                     the value content. Make sure that the value
        *                     set meets the constraints!
        */
      void setType(const XMLAttDef::AttTypes newType);
  
      /**
        * This method will update the value field of the attribute.
        *
        * @param  newValue    The value string of the attribute, which should
        *                     be fully normalized by XML rules according to the
        *                     attribute type.
        */
      void setValue(const XMLCh* const newValue);
  
      /**
        * This method will set the URI id field of this attribute. This is
        * generally only ever called internally by the parser itself during
        * the parsing process.
        *
        * @param  uriId       The uriId of the attribute.
        */
      void setURIId(const unsigned int uriId);
  
      //@}
  
  
  
  private :
      // -----------------------------------------------------------------------
      //  Unimplemented constructors and operators
      // -----------------------------------------------------------------------
      XMLAttr(const XMLAttr&);
      XMLAttr& operator=(const XMLAttr&);
  
  
      // -----------------------------------------------------------------------
      //  Private, helper methods
      // -----------------------------------------------------------------------
      void cleanUp();
  
  
      // -----------------------------------------------------------------------
      //  Private instance variables
      //
      //  fAttName
      //      The Attribute Name;
      //
      //  fSpecified
      //      True if this attribute appeared in the element; else, false if
      //      it was defaulted from an AttDef.
      //
      //  fType
      //      The attribute type enum value for this attribute. Indicates what
      //      type of attribute it was.
      //
      //  fValue
      //  fValueBufSz
      //      The attribute value that was given in the attribute instance, and
      //      its current buffer size (minus one, where the null is.)
      //
      // -----------------------------------------------------------------------
      bool                fSpecified;
      XMLAttDef::AttTypes fType;
      XMLCh*              fValue;
      unsigned int        fValueBufSz;
      QName*              fAttName;
  };
  
  // ---------------------------------------------------------------------------
  //  XMLAttr: Constructors and Destructor
  // ---------------------------------------------------------------------------
  inline XMLAttr::~XMLAttr()
  {
      cleanUp();
  }
  
  
  // ---------------------------------------------------------------------------
  //  XMLAttr: Getter methods
  // ---------------------------------------------------------------------------
  inline QName* XMLAttr::getAttName() const
  {
      return fAttName;
  }
  
  inline const XMLCh* XMLAttr::getName() const
  {
      return fAttName->getLocalPart();
  }
  
  inline const XMLCh* XMLAttr::getPrefix() const
  {
      return fAttName->getPrefix();
  }
  
  inline bool XMLAttr::getSpecified() const
  {
      return fSpecified;
  }
  
  inline XMLAttDef::AttTypes XMLAttr::getType() const
  {
      return fType;
  }
  
  inline const XMLCh* XMLAttr::getValue() const
  {
      return fValue;
  }
  
  inline unsigned int XMLAttr::getURIId() const
  {
      return fAttName->getURI();
  }
  
  
  // ---------------------------------------------------------------------------
  //  XMLAttr: Setter methods
  // ---------------------------------------------------------------------------
  inline void XMLAttr::set(const  unsigned int        uriId
                          , const XMLCh* const        attrName
                          , const XMLCh* const        attrPrefix
                          , const XMLCh* const        attrValue
                          , const XMLAttDef::AttTypes type)
  {
      // Set the name info and the value via their respective calls
      fAttName->setName(attrPrefix, attrName, uriId);
      setValue(attrValue);
  
      // And store the type
      fType = type;
  }
  
  inline void XMLAttr::setType(const XMLAttDef::AttTypes newValue)
  {
      fType = newValue;
  }
  
  inline void XMLAttr::setSpecified(const bool newValue)
  {
      fSpecified = newValue;
  }
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/framework/XMLBuffer.hpp
  
  Index: XMLBuffer.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: XMLBuffer.hpp,v $
   * Revision 1.1  2002/10/23 08:55:09  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:21:51  peiyongz
   * sane_include
   *
   * Revision 1.6  2001/06/27 20:29:09  tng
   * [Bug 2365] Huge performance problem with the parser in XMLScanner::sendCharData() .  By David Bertoni.
   *
   * Revision 1.5  2000/03/02 19:54:24  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:00:22  abagchi
   * Swat for removing Log from API docs
   *
   * Revision 1.3  2000/02/15 01:21:30  roddey
   * Some initial documentation improvements. More to come...
   *
   * Revision 1.2  2000/02/06 07:47:47  rahulj
   * Year 2K copyright swat.
   *
   * Revision 1.1.1.1  1999/11/09 01:08:29  twl
   * Initial checkin
   *
   * Revision 1.2  1999/11/08 20:44:36  rahul
   * Swat for adding in Product name and CVS comment log variable.
   *
   */
  
  
  #if !defined(XMLBUFFER_HPP)
  #define XMLBUFFER_HPP
  
  #include <xercesc/util/XercesDefs.hpp>
  
  /**
   *  XMLBuffer is a lightweight, expandable Unicode text buffer. Since XML is
   *  inherently theoretically unbounded in terms of the sizes of things, we
   *  very often need to have expandable buffers. The primary concern here is
   *  that appends of characters and other buffers or strings be very fast, so
   *  it always maintains the current buffer size.
   *
   *  The buffer is not nul terminated until some asks to see the raw buffer
   *  contents. This also avoids overhead during append operations.
   */
  class XMLPARSER_EXPORT XMLBuffer
  {
  public :
      // -----------------------------------------------------------------------
      //  Constructors and Destructor
      // -----------------------------------------------------------------------
  
      /** @name Constructor */
      //@{
      XMLBuffer(int capacity = 1023) :
  
          fBuffer(0)
          , fIndex(0)
          , fCapacity(capacity)
          , fUsed(false)
      {
          // Buffer is one larger than capacity, to allow for zero term
          fBuffer = new XMLCh[fCapacity+1];
  
          // Keep it null terminated
          fBuffer[0] = XMLCh(0);
      }
      //@}
  
      /** @name Destructor */
      //@{
      ~XMLBuffer()
      {
          delete [] fBuffer;
      }
      //@}
  
      // -----------------------------------------------------------------------
      //  Buffer Management
      // -----------------------------------------------------------------------
      void append(const XMLCh toAppend)
      {
          if (fIndex == fCapacity)
              expand();
  
          // Put in char and bump the index
          fBuffer[fIndex++] = toAppend;
      }
  
      void append
      (
          const   XMLCh* const    chars
          , const unsigned int    count = 0
      );
  
      const XMLCh* getRawBuffer() const
      {
          fBuffer[fIndex] = 0;
          return fBuffer;
      }
  
      XMLCh* getRawBuffer()
      {
          fBuffer[fIndex] = 0;
          return fBuffer;
      }
  
      void reset()
      {
          fIndex = 0;
          fBuffer[0] = 0;
      }
  
      void set
      (
          const   XMLCh* const    chars
          , const unsigned int    count = 0
      );
  
  
      // -----------------------------------------------------------------------
      //  Getters
      // -----------------------------------------------------------------------
      bool getInUse()
      {
          return fUsed;
      }
  
      unsigned int getLen() const
      {
          return fIndex;
      }
  
      bool isEmpty()
      {
          return (fIndex == 0);
      }
  
  
      // -----------------------------------------------------------------------
      //  Setters
      // -----------------------------------------------------------------------
      void setInUse(const bool newValue)
      {
          fUsed = newValue;
      }
  
  
  private :
      // -----------------------------------------------------------------------
      //  Declare our friends
      // -----------------------------------------------------------------------
      friend class XMLBufBid;
  
  
      // -----------------------------------------------------------------------
      //  Private helpers
      // -----------------------------------------------------------------------
      void expand();
      void insureCapacity(const unsigned int extraNeeded);
  
  
      // -----------------------------------------------------------------------
      //  Private data members
      //
      //  fBuffer
      //      The pointer to the buffer data. Its grown as needed. Its always
      //      one larger than fCapacity, to leave room for the null terminator.
      //
      //  fIndex
      //      The current index into the buffer, as characters are appended
      //      to it. If its zero, then the buffer is empty.
      //
      //  fCapacity
      //      The current capacity of the buffer. Its actually always one
      //      larger, to leave room for the null terminator.
      //
      //  fUsed
      //      Indicates whether this buffer is in use or not.
      // -----------------------------------------------------------------------
      XMLCh*          fBuffer;
      unsigned int    fIndex;
      unsigned int    fCapacity;
      bool            fUsed;
  };
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/framework/XMLBufferMgr.hpp
  
  Index: XMLBufferMgr.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: XMLBufferMgr.hpp,v $
   * Revision 1.1  2002/10/23 08:55:09  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:21:51  peiyongz
   * sane_include
   *
   * Revision 1.5  2000/03/02 19:54:24  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:00:23  abagchi
   * Swat for removing Log from API docs
   *
   * Revision 1.3  2000/02/15 01:21:30  roddey
   * Some initial documentation improvements. More to come...
   *
   * Revision 1.2  2000/02/06 07:47:47  rahulj
   * Year 2K copyright swat.
   *
   * Revision 1.1.1.1  1999/11/09 01:08:30  twl
   * Initial checkin
   *
   * Revision 1.2  1999/11/08 20:44:36  rahul
   * Swat for adding in Product name and CVS comment log variable.
   *
   */
  
  
  #if !defined(XMLBUFFERMGR_HPP)
  #define XMLBUFFERMGR_HPP
  
  #include <xercesc/util/XercesDefs.hpp>
  #include <xercesc/framework/XMLBuffer.hpp>
  
  class XMLBufBid;
  
  /**
   *  There are many places where XMLBuffer objects are needed. In order to
   *  avoid either constantly creating and destroying them or maintaining a
   *  fixed set and worrying about accidental reuse, a buffer manager can
   *  provide a pool of buffers which can be temporarily used and then put
   *  back into the pool. This provides a good compromise between performance
   *  and easier maintenance.
   */
  class XMLPARSER_EXPORT XMLBufferMgr
  {
  public :
      // -----------------------------------------------------------------------
      //  Constructors and Destructor
      // -----------------------------------------------------------------------
  
      /** @name Constructor */
      //@{
      XMLBufferMgr();
      //@}
  
      /** @name Destructor */
      //@{
      ~XMLBufferMgr();
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Buffer management
      // -----------------------------------------------------------------------
      XMLBuffer& bidOnBuffer();
      void releaseBuffer(XMLBuffer& toRelease);
  
  
  private :
      // -----------------------------------------------------------------------
      //  Private data members
      //
      //  fBufCount
      //      The count of buffers that have been allocated so far.
      //
      //  fBufList;
      //      The list of pointers to buffers that are loaned out. There will
      //      never be a lot of them, so a flat list is good enough.
      // -----------------------------------------------------------------------
      unsigned int    fBufCount;
      XMLBuffer**     fBufList;
  };
  
  
  /**
   *  XMLBufBid is a scoped based janitor that allows the scanner code to ask
   *  for a buffer on a scoped basis and then insure that it gets freed back
   *  into the pool no matter how the scope is exited (exception or normal exit.)
   */
  class XMLBufBid
  {
  public :
      // -----------------------------------------------------------------------
      //  Constructors and Destructor
      // -----------------------------------------------------------------------
      XMLBufBid(XMLBufferMgr* const srcMgr) :
  
          fBuffer(srcMgr->bidOnBuffer())
          , fMgr(srcMgr)
      {
      }
  
      ~XMLBufBid()
      {
          fMgr->releaseBuffer(fBuffer);
      }
  
  
  
      // -----------------------------------------------------------------------
      //  Buffer access
      // -----------------------------------------------------------------------
      void append(const XMLCh toAppend)
      {
          fBuffer.append(toAppend);
      }
  
      void append(const XMLCh* const toAppend, const unsigned int count = 0)
      {
          fBuffer.append(toAppend, count);
      }
  
      const XMLBuffer& getBuffer() const
      {
          return fBuffer;
      }
  
      XMLBuffer& getBuffer()
      {
          return fBuffer;
      }
  
      const XMLCh* getRawBuffer() const
      {
          fBuffer.fBuffer[fBuffer.fIndex] = 0;
          return fBuffer.fBuffer;
      }
  
      XMLCh* getRawBuffer()
      {
          fBuffer.fBuffer[fBuffer.fIndex] = 0;
          return fBuffer.fBuffer;
      }
  
      unsigned int getLen() const
      {
          return fBuffer.fIndex;
      }
  
      bool isEmpty()
      {
          return (fBuffer.fIndex == 0);
      }
  
      void reset()
      {
          fBuffer.reset();
      }
  
      void set(const XMLCh* const chars, const unsigned int count = 0)
      {
          fBuffer.set(chars, count);
      }
  
  
  private :
      // -----------------------------------------------------------------------
      //  Private data members
      //
      //  fBuffer
      //      This is the buffer we got, and which we will release.
      //
      //  fMgr
      //      This is the buffer manager we got the buffer from. This is needed
      //      to release the buffer later.
      // -----------------------------------------------------------------------
      XMLBuffer&          fBuffer;
      XMLBufferMgr* const fMgr;
  };
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/framework/XMLContentModel.hpp
  
  Index: XMLContentModel.hpp
  ===================================================================
  /*
   * 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/>.
   */
  
  /*
   * $Log: XMLContentModel.hpp,v $
   * Revision 1.1  2002/10/23 08:55:09  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:21:51  peiyongz
   * sane_include
   *
   * Revision 1.14  2001/11/21 14:30:13  knoaman
   * Fix for UPA checking.
   *
   * Revision 1.13  2001/08/21 16:06:10  tng
   * Schema: Unique Particle Attribution Constraint Checking.
   *
   * Revision 1.12  2001/08/13 15:06:38  knoaman
   * update <any> validation.
   *
   * Revision 1.11  2001/05/28 20:53:35  tng
   * Schema: move static data gInvalidTrans, gEOCFakeId, gEpsilonFakeId to XMLContentModel for others to access
   *
   * Revision 1.10  2001/05/11 13:25:31  tng
   * Copyright update.
   *
   * Revision 1.9  2001/05/03 21:02:23  tng
   * Schema: Add SubstitutionGroupComparator and update exception messages.  By Pei Yong Zhang.
   *
   * Revision 1.8  2001/04/19 18:16:50  tng
   * Schema: SchemaValidator update, and use QName in Content Model
   *
   * Revision 1.7  2001/03/21 21:56:01  tng
   * Schema: Add Schema Grammar, Schema Validator, and split the DTDValidator into DTDValidator, DTDScanner, and DTDGrammar.
   *
   * Revision 1.6  2001/02/27 14:48:30  tng
   * Schema: Add CMAny and ContentLeafNameTypeVector, by Pei Yong Zhang
   *
   * Revision 1.5  2000/03/02 19:54:24  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:00:23  abagchi
   * Swat for removing Log from API docs
   *
   * Revision 1.3  2000/02/15 01:21:30  roddey
   * Some initial documentation improvements. More to come...
   *
   * Revision 1.2  2000/02/06 07:47:48  rahulj
   * Year 2K copyright swat.
   *
   * Revision 1.1.1.1  1999/11/09 01:08:30  twl
   * Initial checkin
   *
   * Revision 1.2  1999/11/08 20:44:37  rahul
   * Swat for adding in Product name and CVS comment log variable.
   *
   */
  
  
  #if !defined(CONTENTMODEL_HPP)
  #define CONTENTMODEL_HPP
  
  #include <xercesc/util/XercesDefs.hpp>
  #include <xercesc/util/RefVectorOf.hpp>
  #include <xercesc/util/QName.hpp>
  
  class ContentLeafNameTypeVector;
  class GrammarResolver;
  class XMLStringPool;
  class XMLValidator;
  class SchemaGrammar;
  
  /**
   *  This class defines the abstract interface for all content models. All
   *  elements have a content model against which (if validating) its content
   *  is checked. Each type of validator (DTD, Schema, etc...) can have
   *  different types of content models, and even with each type of validator
   *  there can be specialized content models. So this simple class provides
   *  the abstract API via which all the types of contents models are dealt
   *  with generically. Its pretty simple.
   */
  class XMLPARSER_EXPORT XMLContentModel
  {
  public:
      // ---------------------------------------------------------------------------
      //  Public static data
      //
      //  gInvalidTrans
      //      This value represents an invalid transition in each line of the
      //      transition table.
      //
      //  gEOCFakeId
      //  gEpsilonFakeId
      //      We have to put in a couple of special CMLeaf nodes to represent
      //      special values, using fake element ids that we know won't conflict
      //      with real element ids.
      //
      //
      // ---------------------------------------------------------------------------
      static const unsigned int   gInvalidTrans;
      static const unsigned int   gEOCFakeId;
      static const unsigned int   gEpsilonFakeId;
  
      // -----------------------------------------------------------------------
      //  Constructors are hidden, only the virtual Destructor is exposed
      // -----------------------------------------------------------------------
      /** @name Destructor */
      //@{
      virtual ~XMLContentModel()
      {
      }
      //@}
  
  
      // -----------------------------------------------------------------------
      //  The virtual content model interface provided by derived classes
      // -----------------------------------------------------------------------
  	virtual int validateContent
      (
          QName** const         children
        , const unsigned int    childCount
        , const unsigned int    emptyNamespaceId
      ) const = 0;
  
  	virtual int validateContentSpecial
      (
          QName** const           children
        , const unsigned int      childCount
        , const unsigned int      emptyNamespaceId
        , GrammarResolver*  const pGrammarResolver
        , XMLStringPool*    const pStringPool
      ) const =0;
  
  	virtual void checkUniqueParticleAttribution
      (
          SchemaGrammar*    const pGrammar
        , GrammarResolver*  const pGrammarResolver
        , XMLStringPool*    const pStringPool
        , XMLValidator*     const pValidator
        , unsigned int*     const pContentSpecOrgURI
      ) =0;
  
      virtual ContentLeafNameTypeVector* getContentLeafNameTypeVector()
  	  const = 0;
  
      virtual unsigned int getNextState(const unsigned int currentState,
                                        const unsigned int elementIndex) const = 0;
  
  protected :
      // -----------------------------------------------------------------------
      //  Hidden Constructors
      // -----------------------------------------------------------------------
      XMLContentModel()
      {
      }
  
  
  private :
      // -----------------------------------------------------------------------
      //  Unimplemented constructors and operators
      // -----------------------------------------------------------------------
      XMLContentModel(const XMLContentModel&);
      void operator=(const XMLContentModel&);
  };
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/framework/XMLDocumentHandler.hpp
  
  Index: XMLDocumentHandler.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: XMLDocumentHandler.hpp,v $
    * Revision 1.1  2002/10/23 08:55:09  lilantha
    * update with new XML parser lib
    *
    * Revision 1.2  2002/02/20 18:17:01  tng
    * [Bug 5977] Warnings on generating apiDocs.
    *
    * Revision 1.1.1.1  2002/02/01 22:21:51  peiyongz
    * sane_include
    *
    * Revision 1.8  2000/03/02 19:54:24  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:00:23  abagchi
    * Swat for removing Log from API docs
    *
    * Revision 1.6  2000/02/16 20:29:20  aruna1
    * API Doc++ summary changes in
    *
    * Revision 1.5  2000/02/16 19:48:56  roddey
    * More documentation updates
    *
    * Revision 1.4  2000/02/15 01:21:30  roddey
    * Some initial documentation improvements. More to come...
    *
    * Revision 1.3  2000/02/09 19:47:27  abagchi
    * Added docs for startElement
    *
    * Revision 1.2  2000/02/06 07:47:48  rahulj
    * Year 2K copyright swat.
    *
    * Revision 1.1.1.1  1999/11/09 01:08:31  twl
    * Initial checkin
    *
    * Revision 1.3  1999/11/08 20:44:37  rahul
    * Swat for adding in Product name and CVS comment log variable.
    *
    */
  
  
  #if !defined(XMLDOCUMENTHANDLER_HPP)
  #define XMLDOCUMENTHANDLER_HPP
  
  #include <xercesc/util/XercesDefs.hpp>
  #include <xercesc/util/RefVectorOf.hpp>
  #include <xercesc/framework/XMLAttr.hpp>
  
  class XMLElementDecl;
  class XMLEntityDecl;
  
  /**
    * This abstract class provides the interface for the scanner to return
    * XML document information up to the parser as it scans through the
    * document.
    *
    * The interface is very similar to org.sax.DocumentHandler, but
    * has some extra methods required to get all the data out.
    */
  class XMLPARSER_EXPORT XMLDocumentHandler
  {
  public:
      // -----------------------------------------------------------------------
      //  Constructors are hidden, just the virtual destructor is exposed
      // -----------------------------------------------------------------------
      /** @name Destructor */
      //@{
      virtual ~XMLDocumentHandler()
      {
      }
      //@}
  
      /** @name The document handler interface */
      //@{
      /** Receive notification of character data.
        *
        * <p>The scanner will call this method to report each chunk of
        * character data. The scanner may return all contiguous character
        * data in a single chunk, or they may split it into several
        * chunks; however, all of the characters in any single event
        * will come from the same external entity, so that the Locator
        * provides useful information.</p>
        *
        * <p>The parser must not attempt to read from the array
        * outside of the specified range.</p>
        *
        * @param  chars           The content (characters) between markup from the XML
        *                         document.
        * @param  length          The number of characters to read from the array.
        * @param  cdataSection    Indicates that this data is inside a CDATA
        *                         section.
        * @see #ignorableWhitespace
        * @see Locator
        */
      virtual void docCharacters
      (
          const   XMLCh* const    chars
          , const unsigned int    length
          , const bool            cdataSection
      ) = 0;
  
      /** Receive notification of comments in the XML content being parsed.
        *
        * This scanner will call this method for any comments found in the
        * content of the document.
        *
        * @param comment The text of the comment.
        */
      virtual void docComment
      (
          const   XMLCh* const    comment
      ) = 0;
  
      /** Receive notification of PI's parsed in the XML content.
        *
        * The scanner will call this method for any PIs it finds within the
        * content of the document.
        *
        * @param  target  The name of the PI.
        * @param  data    The body of the PI. This may be an empty string since
        *                 the body is optional.
        */
      virtual void docPI
      (
          const   XMLCh* const    target
          , const XMLCh* const    data
      ) = 0;
  
      /** Receive notification after the scanner has parsed the end of the
        * document.
        *
        * The scanner will call this method when the current document has been
        * fully parsed. The handler may use this opportunity to do something with
        * the data, clean up temporary data, etc...
        */
      virtual void endDocument() = 0;
  
      /** Receive notification of the end of an element.
        *
        * This method is called when scanner encounters the end of element tag.
        * There will be a corresponding startElement() event for every
        * endElement() event, but not necessarily the other way around. For
        * empty tags, there is only a startElement() call.
        *
        * @param  elemDecl The name of the element whose end tag was just
        *                     parsed.
        * @param  uriId       The ID of the URI in the URI pool (only valid if
        *                     name spaces is enabled)
        * @param  isRoot      Indicates if this is the root element.
        */
      virtual void endElement
      (
          const   XMLElementDecl& elemDecl
          , const unsigned int    uriId
          , const bool            isRoot
      ) = 0;
  
      /** Receive notification when a referenced entity's content ends
        *
        * This method is called when scanner encounters the end of an entity
        * reference.
        *
        * @param  entDecl  The name of the entity reference just scanned.
        */
      virtual void endEntityReference
      (
          const   XMLEntityDecl&  entDecl
      ) = 0;
  
      /** Receive notification of ignorable whitespace in element content.
        *
        * <p>Validating Parsers must use this method to report each chunk
        * of ignorable whitespace (see the W3C XML 1.0 recommendation,
        * section 2.10): non-validating parsers may also use this method
        * if they are capable of parsing and using content models.</p>
        *
        * <p>The scanner may return all contiguous whitespace in a single
        * chunk, or it may split it into several chunks; however, all of
        * the characters in any single event will come from the same
        * external entity, so that the Locator provides useful
        * information.</p>
        *
        * <p>The parser must not attempt to read from the array
        * outside of the specified range.</p>
        *
        * @param  chars       The whitespace characters from the XML document.
        * @param  length      The number of characters to read from the array.
        * @param  cdataSection Indicates that this data is inside a CDATA
        *                     section.
        * @see #characters
        */
      virtual void ignorableWhitespace
      (
          const   XMLCh* const    chars
          , const unsigned int    length
          , const bool            cdataSection
      ) = 0;
  
      /** Reset the document handler's state, if required
        *
        * This method is used to give the registered document handler a
        * chance to reset itself. Its called by the scanner at the start of
        * every parse.
        */
      virtual void resetDocument() = 0;
  
      /** Receive notification of the start of a new document
        *
        * This method is the first callback called the scanner at the
        * start of every parse. This is before any content is parsed.
        */
      virtual void startDocument() = 0;
  
      /** Receive notification of a new start tag
        *
        * This method is called when scanner encounters the start of an element tag.
        * All elements must always have a startElement() tag. Empty tags will
        * only have the startElement() tag and no endElement() tag.
        *
        * @param  elemDecl The name of the element whose start tag was just
        *                     parsed.
        * @param  uriId       The ID of the URI in the URI pool (only valid if
        *                     name spaces is enabled)
        * @param  prefixName  The string representing the prefix name
        * @param  attrList    List of attributes in the element
        * @param  attrCount   Count of the attributes in the element
        * @param  isEmpty     Indicates if the element is empty, in which case
        *                     you should not expect an endElement() event.
        * @param  isRoot      Indicates if this is the root element.
        */
      virtual void startElement
      (
          const   XMLElementDecl&         elemDecl
          , const unsigned int            uriId
          , const XMLCh* const            prefixName
          , const RefVectorOf<XMLAttr>&   attrList
          , const unsigned int            attrCount
          , const bool                    isEmpty
          , const bool                    isRoot
      ) = 0;
  
      /** Receive notification when the scanner hits an entity reference.
        *
        * This is currently useful only to DOM parser configurations as SAX
        * does not provide any api to return this information.
        *
        * @param  entDecl  The name of the entity that was referenced.
        */
      virtual void startEntityReference(const XMLEntityDecl& entDecl) = 0;
  
      /** Receive notification of an XML declaration
        *
        * Currently neither DOM nor SAX provide API's to return back this
        * information.
        *
        * @param  versionStr      The value of the <code>version</code> attribute
        *                         of the XML decl.
        * @param  encodingStr     The value of the <code>encoding</code> attribute
        *                         of the XML decl.
        * @param  standaloneStr   The value of the <code>standalone</code>
        *                         attribute of the XML decl.
        * @param  autoEncodingStr The encoding string auto-detected by the
        *                         scanner. In absence of any 'encoding' attribute in the
        *                         XML decl, the XML standard specifies how a parser can
        *                         auto-detect. If there is no <code>encodingStr</code>
        *                         this is what will be used to try to decode the file.
        */
      virtual void XMLDecl
      (
          const   XMLCh* const    versionStr
          , const XMLCh* const    encodingStr
          , const XMLCh* const    standaloneStr
          , const XMLCh* const    autoEncodingStr
      ) = 0;
      //@}
  
  
  
  protected :
      // -----------------------------------------------------------------------
      //  Hidden Constructors
      // -----------------------------------------------------------------------
      XMLDocumentHandler()
      {
      }
  
  
  private:
      // -----------------------------------------------------------------------
      //  Unimplemented constructors and operators
      // -----------------------------------------------------------------------
      XMLDocumentHandler(const XMLDocumentHandler&);
      void operator=(const XMLDocumentHandler&);
  };
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/framework/XMLElementDecl.hpp
  
  Index: XMLElementDecl.hpp
  ===================================================================
  /*
   * 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/>.
   */
  
  /*
   * $Log: XMLElementDecl.hpp,v $
   * Revision 1.1  2002/10/23 08:55:09  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:21:51  peiyongz
   * sane_include
   *
   * Revision 1.18  2001/08/21 16:06:10  tng
   * Schema: Unique Particle Attribution Constraint Checking.
   *
   * Revision 1.17  2001/07/24 18:30:47  knoaman
   * Added support for <group> + extra constraint checking for complexType
   *
   * Revision 1.16  2001/06/21 14:25:28  knoaman
   * Fix for bug 1946
   *
   * Revision 1.15  2001/05/11 13:25:32  tng
   * Copyright update.
   *
   * Revision 1.14  2001/05/03 20:34:22  tng
   * Schema: SchemaValidator update
   *
   * Revision 1.13  2001/04/19 18:16:52  tng
   * Schema: SchemaValidator update, and use QName in Content Model
   *
   * Revision 1.12  2001/03/21 21:56:02  tng
   * Schema: Add Schema Grammar, Schema Validator, and split the DTDValidator into DTDValidator, DTDScanner, and DTDGrammar.
   *
   * Revision 1.11  2001/03/21 19:29:29  tng
   * Schema: Content Model Updates, by Pei Yong Zhang.
   *
   * Revision 1.10  2001/02/26 19:29:13  tng
   * Schema: add virtual method getURI(), getContentSpec and setContenSpec in XMLElementDecl, and DTDElementDecl.
   *
   * Revision 1.9  2001/02/26 19:21:30  tng
   * Schema: add parameter prefix in findElem and findAttr.
   *
   * Revision 1.8  2000/12/14 18:49:57  tng
   * Fix API document generation warning: "Warning: end of member group without matching begin"
   *
   * Revision 1.7  2000/11/30 18:22:38  andyh
   * reuseValidator - fix bugs (spurious errors) that occured on reuse due to
   * pools already containing some items.  Fixed by Tinny Ng.
   *
   * Revision 1.6  2000/05/11 23:11:32  andyh
   * Add missing validity checks for stand-alone documents, character range
   * and Well-formed parsed entities.  Changes contributed by Sean MacRoibeaird
   * <sean.Macroibeaird@ireland.sun.com>
   *
   * Revision 1.5  2000/02/24 20:00:23  abagchi
   * Swat for removing Log from API docs
   *
   * Revision 1.4  2000/02/16 19:48:56  roddey
   * More documentation updates
   *
   * Revision 1.3  2000/02/15 01:21:30  roddey
   * Some initial documentation improvements. More to come...
   *
   * Revision 1.2  2000/02/06 07:47:48  rahulj
   * Year 2K copyright swat.
   *
   * Revision 1.1.1.1  1999/11/09 01:08:32  twl
   * Initial checkin
   *
   * Revision 1.2  1999/11/08 20:44:38  rahul
   * Swat for adding in Product name and CVS comment log variable.
   *
   */
  
  #if !defined(XMLELEMENTDECL_HPP)
  #define XMLELEMENTDECL_HPP
  
  #include <xercesc/util/XMLString.hpp>
  #include <xercesc/framework/XMLAttr.hpp>
  #include <xercesc/framework/XMLAttDefList.hpp>
  
  class ContentSpecNode;
  class XMLContentModel;
  
  /**
   *  This class defines the core information of an element declaration. Each
   *  validator (DTD, Schema, etc...) will have its own information that it
   *  associations with the declaration of an element, but they must all share
   *  at least this core information, i.e. they must all derive from this
   *  class. The set of info enforced at this level is driven by the needs of
   *  XML 1.0 spec validation and well formedness checks.
   *
   *  This class defines some special element id values for invalid elements
   *  and PCDATA elements, as well as a string for the special PCDATA element
   *  name. All validators must honor these special values in order to allow
   *  content models to work generically (i.e. to let code know when its dealing
   *  with invalid or PCDATA element ids without having to know what type of
   *  validator its messing with.)
   */
  class XMLPARSER_EXPORT XMLElementDecl
  {
   public:
      // -----------------------------------------------------------------------
      //  Class specific types
      //
      //  CreateReasons
      //      This type is used to store how an element declaration got into
      //      the grammar's element pool. They are faulted in for various
      //      reasons.
      //
      //  LookupOpts
      //      These are the values used by the attribute lookup methods.
      //
      //  CharDataOpts
      //      This is used to indicate how this type of element reacts to
      //      character data as content.
      // -----------------------------------------------------------------------
      enum CreateReasons
      {
          NoReason
          , Declared
          , AttList
          , InContentModel
          , AsRootElem
          , JustFaultIn
      };
  
      enum LookupOpts
      {
          AddIfNotFound
          , FailIfNotFound
      };
  
      enum CharDataOpts
      {
          NoCharData
          , SpacesOk
          , AllCharData
      };
  
  
      // -----------------------------------------------------------------------
      //  Public static data
      //
      //  fgInvalidElemId
      //      A value to represent an invalid element node id.
      //
      //  fgPCDataElemId
      //      This is the value to use to represent a PCDATA node when an
      //      element id is required.
      //
      //  fgPCDataElemName
      //      This is the value to use to represent a PCDATA node when an
      //      element name is required.
      // -----------------------------------------------------------------------
      static const unsigned int   fgInvalidElemId;
      static const unsigned int   fgPCDataElemId;
      static const XMLCh          fgPCDataElemName[];
  
  
  
      // -----------------------------------------------------------------------
      //  Destructor
      // -----------------------------------------------------------------------
      /** @name Destructor */
      //@{
      virtual ~XMLElementDecl();
      //@}
  
  
      // -----------------------------------------------------------------------
      //  The virtual element decl interface
      // -----------------------------------------------------------------------
  
      /** @name Virual ElementDecl interface */
      //@{
  
      /** Find an attribute by name or optionally fault it in.
        *
        * The derived class should look up the passed attribute in the list of
        * of attributes for this element. If namespaces are enabled, then it
        * should use the uriId/baseName pair, else it should use the qName. The
        * options allow the caller to indicate whether the attribute should be
        * defaulted in if not found. If it is defaulted in, then wasAdded should
        * be set, else it should be cleared. If its not found and the caller does
        * not want defaulting, then return a null pointer.
        *
        * @param  qName       This is the qName of the attribute, i.e. the actual
        *                     lexical name found.
        *
        * @param  uriId       This is the id of the URI of the namespace to which
        *                     this attribute mapped. Only valid if namespaces are
        *                     enabled.
        *
        * @param  baseName    This is the base part of the name, i.e. after any
        *                     prefix.
        *
        * @param  prefix      The prefix, if any, of this attribute's name. If
        *                     this is empty, then uriID is meaningless as well.
        *
        * @param  options     Indicates the lookup options.
        *
        * @param  wasAdded    Should be set if the attribute is faulted in, else
        *                     cleared.
        */
      virtual XMLAttDef* findAttr
      (
          const   XMLCh* const    qName
          , const unsigned int    uriId
          , const XMLCh* const    baseName
          , const XMLCh* const    prefix
          , const LookupOpts      options
          ,       bool&           wasAdded
      )   const = 0;
  
      /** Get a list of attributes defined for this element.
        *
        * The derived class should return a reference to some member object which
        * implements the XMLAttDefList interface. This object gives the scanner the
        * ability to look through the attributes defined for this element.
        *
        * It is done this way for efficiency, though of course this is not thread
        * safe. The scanner guarantees that it won't ever call this method in any
        * nested way, but the outside world must be careful about when it calls
        * this method, and optimally never would.
        */
      virtual XMLAttDefList& getAttDefList() const = 0;
  
      /** The character data options for this element type
        *
        * The derived class should return an appropriate character data opts value
        * which correctly represents its tolerance towards whitespace or character
        * data inside of its instances. This allows the scanner to do all of the
        * validation of character data.
        */
      virtual CharDataOpts getCharDataOpts() const = 0;
  
      /** Indicate whether this element type defined any attributes
        *
        * The derived class should return a boolean that indicates whether this
        * element has any attributes defined for it or not. This is an optimization
        * that allows the scanner to skip some work if no attributes exist.
        */
      virtual bool hasAttDefs() const = 0;
  
      /** Reset the flags on the attribute definitions.
        *
        * This method is called by the scanner at the beginning of each scan
        * of a start tag, asking this element decl to reset the 'declared' flag
        * of each of its attribute defs. This allows the scanner to mark each
        * one as declared yet or not.
        */
      virtual bool resetDefs() = 0;
  
      /** Get a pointer to the content spec node
        *
        * This method will return a const pointer to the content spec node object
        * of this element.
        *
        * @return A const pointer to the element's content spec node
        */
      virtual const ContentSpecNode* getContentSpec() const = 0;
  
      /** Get a pointer to the content spec node
        *
        * This method is identical to the previous one, except that it is non
        * const.
        */
      virtual ContentSpecNode* getContentSpec() = 0;
  
      /** Set the content spec node object for this element type
        *
        * This method will adopt the based content spec node object. This is called
        * by the actual validator which is parsing its DTD or Schema or whatever
        * and store it on the element decl object via this method.
        *
        * @param  toAdopt This method will adopt the passed content node spec
        *         object. Any previous object is destroyed.
        */
      virtual void setContentSpec(ContentSpecNode* toAdopt) = 0;
      
      /** Get a pointer to the abstract content model
        *
        * This method will return a const pointer to the content model object
        * of this element. This class is a simple abstraction that allows an
        * element to define and use multiple, specialized content model types
        * internally but still allow the outside world to do simple stuff with
        * them.
        *
        * @return A pointer to the element's content model, via the basic
        * abstract content model type.
        */
      virtual XMLContentModel* getContentModel() = 0;    
      
      /** Set the content model object for this element type
        *
        * This method will adopt the based content model object. This is called
        * by the actual validator which is parsing its DTD or Schema or whatever
        * a creating an element decl. It will build what it feels is the correct
        * content model type object and store it on the element decl object via
        * this method.
        *
        * @param  newModelToAdopt This method will adopt the passed content model
        *         object. Any previous object is destroyed.
        */
      virtual void setContentModel(XMLContentModel* const newModelToAdopt) = 0;    
      
      /** Geta formatted string of the content model
        *
        * This method is a convenience method which will create a formatted
        * representation of the content model of the element. It will not always
        * exactly recreate the original model, since some normalization or
        * or reformatting may occur. But, it will be a technically accurate
        * representation of the original content model.
        *
        * @return A pointer to an internal buffer which contains the formatted
        *         content model. The caller does not own this buffer and should
        *         copy it if it needs to be kept around.
        */
      virtual const XMLCh* getFormattedContentModel ()   const = 0;    
  
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Getter methods
      // -----------------------------------------------------------------------
  
      /** @name Getter methods */
      //@{
  
      /** Get the base name of this element type.
        *
        * Return the base name part of the element's name. This is the
        * same regardless of whether namespaces are enabled or not.
        *
        * @return A const pointer to the base name of the element decl.
        */
      const XMLCh* getBaseName() const;
      XMLCh* getBaseName();
  
      /** Get the URI id of this element type.
        *
        * Return the URI Id of this element.
        *
        * @return The URI Id of the element decl, or the emptyNamespaceId if not applicable.
        */
      const unsigned int getURI() const;
  
      /** Get the QName of this element type.
        *
        * Return the QName part of the element's name.  This is the
        * same regardless of whether namespaces are enabled or not.
        *
        * @return A const pointer to the QName of the element decl.
        */
      const QName* getElementName() const;
      QName* getElementName();
  
      /** Get the full name of this element type.
        *
        * Return the full name of the element. If namespaces
        * are not enabled, then this is the qName. Else it is the {uri}baseName
        * form. For those validators that always require namespace processing, it
        * will always be in the latter form because namespace processing will always
        * be on.
        */
      const XMLCh* getFullName() const;
  
      /** Get the create reason for this element type
        *
        * This method returns an enumeration which indicates why this element
        * declaration exists. Elements can be used before they are actually
        * declared, so they will often be faulted into the pool and marked as
        * to why they are there.
        *
        * @return An enumerated value that indicates the reason why this element
        * was added to the element decl pool.
        */
  
      CreateReasons getCreateReason() const;
  
      /** Get the element decl pool id for this element type
        *
        * This method will return the element decl pool id of this element
        * declaration. This uniquely identifies this element type within the
        * parse event that it is declared within. This value is assigned by the
        * grammar whose decl pool this object belongs to.
        *
        * @return The element decl id of this element declaration.
        */
      unsigned int getId() const;
  
      /** Indicate whether this element type has been declared yet
        *
        * This method returns a boolean that indicates whether this element
        * has been declared yet. There are a number of reasons why an element
        * declaration can be faulted in, but eventually it must be declared or
        * its an error. See the CreateReasons enumeration.
        *
        * @return true if this element has been declared, else false.
        */
      bool isDeclared() const;
  
      /** Indicate whether this element type has been declared externally
        *
        * This method returns a boolean that indicates whether this element
        * has been declared externally.
        *
        * @return true if this element has been declared externally, else false.
        */
  
      bool isExternal() const;
  
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Setter methods
      // -----------------------------------------------------------------------
  
      /** @name Setter methods */
      //@{
  
      /** Set the element name object for this element type
        *
        * This method will adopt the based content spec node object. This is called
        * by the actual validator which is parsing its DTD or Schema or whatever
        * and store it on the element decl object via this method.
        *
        * @param  prefix       Prefix of the element
        * @param  localPart    Base Name of the element
        * @param  uriId        The uriId of the element
        */
        void setElementName(const XMLCh* const       prefix
                          , const XMLCh* const       localPart
                          , const int                uriId );
  
      /** Set the element name object for this element type
        *
        * This method will adopt the based content spec node object. This is called
        * by the actual validator which is parsing its DTD or Schema or whatever
        * and store it on the element decl object via this method.
        *
        * @param  rawName      Full Name of the element
        * @param  uriId        The uriId of the element
        */
        void setElementName(const XMLCh* const    rawName
                          , const int             uriId );
  
      /** Set the element name object for this element type
        *
        * This method will adopt the based content spec node object. This is called
        * by the actual validator which is parsing its DTD or Schema or whatever
        * and store it on the element decl object via this method.
        *
        * @param  elementName  QName of the element
        */
        void setElementName(const QName* const    elementName);
  
      /** Update the create reason for this element type.
        *
        * This method will update the 'create reason' field for this element
        * decl object. As the validator parses its DTD, Schema, etc... it will
        * encounter various references to an element declaration, which will
        * cause the element declaration to either be declared or to be faulted
        * into the pool in preperation for some future declaration. As it does
        * so,it will update this field to indicate the current satus of the
        * decl object.
        */
      void setCreateReason(const CreateReasons newReason);
  
      /** Set the element decl pool id for this element type
        *
        * This method will set the pool id of this element decl. This is called
        * by the grammar which created this object, and will provide this
        * decl object with a unique id within the parse event that created it.
        */
      void setId(const unsigned int newId);
  
  
      /** Set the element decl to indicate external declaration
        *
        */
      void setExternalElemDeclaration(const bool aValue);
  
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Miscellaneous methods
      // -----------------------------------------------------------------------
  
      /** @name Miscellenous methods */
      //@{
  
      //@}
  
  
  protected :
      // -----------------------------------------------------------------------
      //  Hidden constructors
      // -----------------------------------------------------------------------
      XMLElementDecl();
  
  private :
      // -----------------------------------------------------------------------
      //  Unimplemented constructors and operators
      // -----------------------------------------------------------------------
      XMLElementDecl(const XMLElementDecl&);
      void operator=(const XMLElementDecl&);
  
  
      // -----------------------------------------------------------------------
      //  Data members
      //
      //  fElementName
      //      This is the name of the element decl.
      //
      //  fCreateReason
      //      We sometimes have to put an element decl object into the elem
      //      decl pool before the element's declaration is seen, such as when
      //      its used in another element's content model or an att list is
      //      seen for it. This flag tells us whether its been declared, and
      //      if not why it had to be created.
      //
      //  fId
      //      The unique id of this element. This is created by the derived
      //      class, or more accurately the grammar that owns the objects
      //      of the derived types. But, since they all have to have them, we
      //      let them all store the id here. It is defaulted to have the
      //      value fgInvalidElem until explicitly set.
      //
      //  fExternalElement
      //      This flag indicates whether or the element was declared externally.
      // -----------------------------------------------------------------------
      QName*              fElementName;
      CreateReasons       fCreateReason;
      unsigned int        fId;
      bool                fExternalElement;
  };
  
  
  // ---------------------------------------------------------------------------
  //  XMLElementDecl: Getter methods
  // ---------------------------------------------------------------------------
  inline const XMLCh* XMLElementDecl::getBaseName() const
  {
      return fElementName->getLocalPart();
  }
  
  inline XMLCh* XMLElementDecl::getBaseName()
  {
      return fElementName->getLocalPart();
  }
  
  inline const unsigned int XMLElementDecl::getURI() const
  {
      return fElementName->getURI();
  }
  
  inline const QName* XMLElementDecl::getElementName() const
  {
      return fElementName;
  }
  
  inline QName* XMLElementDecl::getElementName()
  {
      return fElementName;
  }
  
  inline const XMLCh* XMLElementDecl::getFullName() const
  {
      return fElementName->getRawName();
  }
  
  inline XMLElementDecl::CreateReasons XMLElementDecl::getCreateReason() const
  {
      return fCreateReason;
  }
  
  inline unsigned int XMLElementDecl::getId() const
  {
      return fId;
  }
  
  inline bool XMLElementDecl::isDeclared() const
  {
      return (fCreateReason == Declared);
  }
  
  
  inline bool XMLElementDecl::isExternal() const
  {
      return fExternalElement;
  }
  
  
  // ---------------------------------------------------------------------------
  //  XMLElementDecl: Setter methods
  // ---------------------------------------------------------------------------
  inline void
  XMLElementDecl::setCreateReason(const XMLElementDecl::CreateReasons newReason)
  {
      fCreateReason = newReason;
  }
  
  inline void XMLElementDecl::setId(const unsigned int newId)
  {
      fId = newId;
  }
  
  
  inline void XMLElementDecl::setExternalElemDeclaration(const bool aValue)
  {
      fExternalElement = aValue;
  }
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/framework/XMLEntityDecl.hpp
  
  Index: XMLEntityDecl.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: XMLEntityDecl.hpp,v $
   * Revision 1.1  2002/10/23 08:55:09  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:21:51  peiyongz
   * sane_include
   *
   * Revision 1.6  2000/02/24 20:00:23  abagchi
   * Swat for removing Log from API docs
   *
   * Revision 1.5  2000/02/16 23:03:48  roddey
   * More documentation updates
   *
   * Revision 1.4  2000/02/16 21:42:58  aruna1
   * API Doc++ summary changes in
   *
   * Revision 1.3  2000/02/15 01:21:30  roddey
   * Some initial documentation improvements. More to come...
   *
   * Revision 1.2  2000/02/06 07:47:48  rahulj
   * Year 2K copyright swat.
   *
   * Revision 1.1.1.1  1999/11/09 01:08:32  twl
   * Initial checkin
   *
   * Revision 1.2  1999/11/08 20:44:38  rahul
   * Swat for adding in Product name and CVS comment log variable.
   *
   */
  
  #if !defined(XMLENTITYDECL_HPP)
  #define XMLENTITYDECL_HPP
  
  #include <xercesc/util/XMLString.hpp>
  
  /**
   *  This class defines that core information that defines an XML entity, no
   *  matter what validator is used. Each validator will create a derivative
   *  of this class which adds any extra information it requires.
   *
   *  This class supports keyed collection semantics via the getKey() method
   *  which extracts the key field, the entity name in this case. The name will
   *  have whatever form is deemed appropriate for the type of validator in
   *  use.
   *
   *  When setting the fields of this class, you must make sure that you do
   *  not set conflicting values. For instance, an internal entity cannot have
   *  a notation name. And an external entity cannot have a value string.
   *  These rules are defined by the XML specification. In most cases, these
   *  objects are created by validator objects as they parse a DTD or Schema
   *  or whatever, at which time they confirm the correctness of the data before
   *  creating the entity decl object.
   */
  class XMLPARSER_EXPORT XMLEntityDecl
  {
  public:
      // -----------------------------------------------------------------------
      //  Constructors and Destructor
      // -----------------------------------------------------------------------
  
      /** @name Constructors */
      //@{
      
      /**
        *  Deafult Constructor
        */
      XMLEntityDecl();
  
      /** Constructor with a const entity name
        *
        * @param  entName The new name to give to this entity.
        */
      XMLEntityDecl
      (
          const   XMLCh* const    entName
      );
      
      /**
        * Constructor with a const entity name and value
        *
        * @param  entName The new name to give to this entity.
        * @param  value   The new value to give to this entity name.
        */
      XMLEntityDecl
      (
          const   XMLCh* const    entName
          , const XMLCh* const    value
      );
  
      /**
        * Constructor with a const entity name and single XMLCh value
        *
        * @param  entName The new name to give to this entity.
        * @param  value   The new value to give to this entity name.
        */
      XMLEntityDecl
      (
          const   XMLCh* const    entName
          , const XMLCh           value
      );
      //@}
  
      /** @name Destructor */
      //@{
  
      /**
        *  Default destructor
        */
      virtual ~XMLEntityDecl();
  
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Virtual entity decl interface
      // -----------------------------------------------------------------------
  
      /** @name The pure virtual methods in this interface. */
      //@{
  
      /** Get the 'declared in internal subset' flag
        *
        * Gets the state of the flag which indicates whether the entity was
        * declared in the internal or external subset. Some structural 
        * description languages might not have an internal subset concept, in
        * which case this will always return false.
        */
      virtual bool getDeclaredInIntSubset() const = 0;
  
      /** Get the 'is parameter entity' flag
        *
        * Gets the state of the flag which indicates whether this entity is
        * a parameter entity. If not, then its a general entity.
        */
      virtual bool getIsParameter() const = 0;
  
      /** Get the 'is special char entity' flag
        *
        * Gets the state of the flag that indicates whether this entity is
        * one of the special, intrinsically supported character entities.
        */
      virtual bool getIsSpecialChar() const = 0;
  
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Getter methods
      // -----------------------------------------------------------------------
  
      /** @name Getter methods */
      //@{
  
      /**
        * Gets the pool id of this entity. Validators maintain all decls in 
        * pools, from which they can be quickly extracted via id.
        */
      unsigned int getId() const;
  
      /**
        * Returns a const pointer to the name of this entity decl. This name
        * will be in whatever format is appropriate for the type of validator
        * in use.
        */
      const XMLCh* getName() const;
  
      /**
        * Gets the notation name, if any, declared for this entity. If this
        * entity is not a notation type entity, it will be a null pointer.
        */
      const XMLCh* getNotationName() const;
  
      /**
        * Gets the public id declared for this entity. Public ids are optional
        * so it can be a null pointer.
        */
      const XMLCh* getPublicId() const;
  
      /**
        * Gets the system id declared for this entity. The system id is required
        * so this method should never return a null pointers.
        */
      const XMLCh* getSystemId() const;
  
      /**
        * This method returns the value of an internal entity. If this is not
        * an internal entity (i.e. its external), then this will be a null
        * pointer.
        */
      const XMLCh* getValue() const;
  
      /**
       *  This method returns the number of characters in the value returned
       *  by getValue(). If this entity is external, this will be zero since
       *  an external entity has no internal value.
       */
      unsigned int getValueLen() const;
  
      /**
        * Indicates that this entity is an external entity. If not, then it is
        * assumed to be an internal entity, suprise.
        */
      bool isExternal() const;
  
      /**
        * Indicates whether this entity is unparsed. This is meaningless for
        * internal entities. Some external entities are unparsed in that they
        * refer to something other than XML source.
        */
      bool isUnparsed() const;
  
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Setter methods
      // -----------------------------------------------------------------------
  
      /** @name Setter methods */
      //@{
  
      /**
       *  This method will set the entity name. The format of this name is
       *  defined by the particular validator in use, since it will be the
       *  one who creates entity definitions as it parses the DTD, Schema,
       *  ect...
       *
       *  @param  entName   The new name to give to this entity.
       */
      void setName
      (
          const   XMLCh* const    entName
      );
  
      /**
       *  This method will set the notation name for this entity. By setting
       *  this, you are indicating that this is an unparsed external entity.
       *
       *  @param  newName   The new notation name to give to this entity.
       */
      void setNotationName(const XMLCh* const newName);
  
      /**
       *  This method will set a new public id on this entity. The public id
       *  has no particular form and is purely for client consumption.
       *
       *  @param  newId     The new public id to give to this entity.
       */
      void setPublicId(const XMLCh* const newId);
  
      /**
       *  This method will set a new sysetm id on this entity. This will
       *  then control where the source for this entity lives. If it is
       *  an internal entity, then the system id is only for bookkeeping
       *  purposes, and to allow any external entities referenced from
       *  within the entity to be correctly resolved.
       *
       *  @param  newId     The new system id to give to the entity.
       */
      void setSystemId(const XMLCh* const newId);
  
      /**
       *  This method will set a new value for this entity. This is only
       *  valid if the entity is to be an internal entity. By setting this
       *  field, you are indicating that the entity is internal.
       *
       *  @param  newValue  The new value to give to this entity.
       */
      void setValue(const XMLCh* const newValue);
  
      //@}
  
      /* For internal use only */
      void setId(const unsigned int newId);
  
  
      // -----------------------------------------------------------------------
      //  Support named pool syntax
      // -----------------------------------------------------------------------
  
      /** @name Setter methods */
      //@{
  
      /**
        * This method allows objects of this class to be used within a standard
        * keyed collection used commonly within the parser system. The collection
        * calls this method to get the key (usually to hash it) by which the
        * object is to be stored.
        */
      const XMLCh* getKey() const;
  
      //@}
  
  
  private :
      // -----------------------------------------------------------------------
      //  Unimplemented constructors and operators
      // -----------------------------------------------------------------------
      XMLEntityDecl(const XMLEntityDecl&);
      void operator=(XMLEntityDecl&);
  
  
      // -----------------------------------------------------------------------
      //  XMLEntityDecl: Private helper methods
      // -----------------------------------------------------------------------
      void cleanUp();
  
  
      // -----------------------------------------------------------------------
      //  Private data members
      //
      //  fId
      //      This is the unique id given to this entity decl.
      //
      //  fName
      //      The name of the enitity. Entity names are never namespace based.
      //
      //  fNotationName
      //      The optional notation of the entity. If there was none, then its
      //      empty.
      //
      //  fPublicId
      //      The public id of the entity, which can be empty.
      //
      //  fSystemId
      //      The system id of the entity.
      //
      //  fValue
      //  fValueLen
      //      The entity's value and length, which is only valid if its an
      //      internal style entity.
      // -----------------------------------------------------------------------
      unsigned int    fId;
  	XMLCh*          fName;
      XMLCh*          fNotationName;
      XMLCh*          fPublicId;
      XMLCh*          fSystemId;
      XMLCh*          fValue;
      unsigned int    fValueLen;
  };
  
  
  // ---------------------------------------------------------------------------
  //  XMLEntityDecl: Getter methods
  // ---------------------------------------------------------------------------
  inline unsigned int XMLEntityDecl::getId() const
  {
      return fId;
  }
  
  inline const XMLCh* XMLEntityDecl::getName() const
  {
      return fName;
  }
  
  inline const XMLCh* XMLEntityDecl::getNotationName() const
  {
      return fNotationName;
  }
  
  inline const XMLCh* XMLEntityDecl::getPublicId() const
  {
      return fPublicId;
  }
  
  inline const XMLCh* XMLEntityDecl::getSystemId() const
  {
      return fSystemId;
  }
  
  inline const XMLCh* XMLEntityDecl::getValue() const
  {
      return fValue;
  }
  
  inline unsigned int XMLEntityDecl::getValueLen() const
  {
      return fValueLen;
  }
  
  inline bool XMLEntityDecl::isExternal() const
  {
      // If it has a system or public id, its external
      return ((fPublicId != 0) || (fSystemId != 0));
  }
  
  inline bool XMLEntityDecl::isUnparsed() const
  {
      // If it has a notation, its unparsed
      return (fNotationName != 0);
  }
  
  
  // ---------------------------------------------------------------------------
  //  XMLEntityDecl: Setter methods
  // ---------------------------------------------------------------------------
  inline void XMLEntityDecl::setId(const unsigned int newId)
  {
      fId = newId;
  }
  
  inline void XMLEntityDecl::setNotationName(const XMLCh* const newName)
  {
      delete [] fNotationName;
      fNotationName = XMLString::replicate(newName);
  }
  
  inline void XMLEntityDecl::setPublicId(const XMLCh* const newId)
  {
      delete [] fPublicId;
      fPublicId = XMLString::replicate(newId);
  }
  
  inline void XMLEntityDecl::setSystemId(const XMLCh* const newId)
  {
      delete [] fSystemId;
      fSystemId = XMLString::replicate(newId);
  }
  
  inline void XMLEntityDecl::setValue(const XMLCh* const newValue)
  {
      delete [] fValue;
      fValue = XMLString::replicate(newValue);
      fValueLen = XMLString::stringLen(newValue);
  }
  
  
  // ---------------------------------------------------------------------------
  //  XMLEntityDecl: Support named pool syntax
  // ---------------------------------------------------------------------------
  inline const XMLCh* XMLEntityDecl::getKey() const
  {
      return fName;
  }
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/framework/XMLEntityHandler.hpp
  
  Index: XMLEntityHandler.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: XMLEntityHandler.hpp,v $
    * Revision 1.1  2002/10/23 08:55:09  lilantha
    * update with new XML parser lib
    *
    * Revision 1.1.1.1  2002/02/01 22:21:51  peiyongz
    * sane_include
    *
    * Revision 1.7  2000/03/02 19:54:25  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:00:23  abagchi
    * Swat for removing Log from API docs
    *
    * Revision 1.5  2000/02/16 21:42:58  aruna1
    * API Doc++ summary changes in
    *
    * Revision 1.4  2000/02/15 01:21:31  roddey
    * Some initial documentation improvements. More to come...
    *
    * Revision 1.3  2000/02/06 07:47:48  rahulj
    * Year 2K copyright swat.
    *
    * Revision 1.2  1999/12/15 19:46:28  roddey
    * Got rid of redundant 'const' on bool return value. Some compilers choke on this
    * and its not useful anyway.
    *
    * Revision 1.1.1.1  1999/11/09 01:08:33  twl
    * Initial checkin
    *
    * Revision 1.2  1999/11/08 20:44:38  rahul
    * Swat for adding in Product name and CVS comment log variable.
    *
    */
  
  
  #if !defined(XMLENTITYHANDLER_HPP)
  #define XMLENTITYHANDLER_HPP
  
  #include <xercesc/util/XercesDefs.hpp>
  
  class InputSource;
  class XMLBuffer;
  
  
  /**
   *  This abstract class is a callback mechanism for the scanner. By creating
   *  a derivative of this class and plugging into the scanner, the scanner
   *  will call back on the object's methods to entity events.
   *
   *  This class is primarily for use by those writing their own parser classes.
   *  If you use the standard parser classes, DOMParser and SAXParser, you won't
   *  use this API. You will instead use a similar mechanism defined by the SAX
   *  API, called EntityResolver.
   */
  class XMLPARSER_EXPORT XMLEntityHandler
  {
  public:
      // -----------------------------------------------------------------------
      //  Constructors are hidden, only the virtual destructor is exposed
      // -----------------------------------------------------------------------
  
      /** @name Destructor */
      //@{
      
      /**
        * Default destructor
        */
      virtual ~XMLEntityHandler()
      {
      }
      //@}
  
  
      // -----------------------------------------------------------------------
      //  The virtual entity handler interface
      // -----------------------------------------------------------------------
      /** @name The pure virtual methods in this interface. */
      //@{
  
      /**
        * This method get called after the scanner has finished reading from
        * the given input source while processing external entity references.
        *
        * @param inputSource The input source for the entity
        */
      virtual void endInputSource(const InputSource& inputSource) = 0;
  
      /**
        * This method allows the passes the scanned systemId to the entity
        * handler, thereby giving it a chance to provide any customized
        * handling like resolving relative path names. The scanner first
        * calls this method before calling <code>resolveEntity</code>.
        *
        * @param systemId The system id extracted by the scanner from the
        *                 input source.
        * @param toFill The buffer in which the fully expanded system id needs
        *               to be stored.
        */
      virtual bool expandSystemId
      (
          const   XMLCh* const    systemId
          ,       XMLBuffer&      toFill
      ) = 0;
  
      /**
        * This method allows the entity handler to reset itself, so that
        * it can be used again. It is called prior to a new document parse
        * operation.
        */
      virtual void resetEntities() = 0;
  
      /**
        * This method allows the entity handler to provide customized
        * application specific entity resolution. This method is defined
        * by SAX 1.0 API.
        *
        * @param systemId The system id of the external entity reference. 
        * @param publicId The public id of the external entity reference.
        */
      virtual InputSource* resolveEntity
      (
          const   XMLCh* const    publicId
          , const XMLCh* const    systemId
      ) = 0;
  
      /**
        * This method will be called before the scanner starts reading
        * from an input source while processing external entity references.
        *
        * @param inputSource The external input source.
        */
      virtual void startInputSource(const InputSource& inputSource) = 0;
      //@}
  
  
  protected :
      // -----------------------------------------------------------------------
      //  Hidden Constructors
      // -----------------------------------------------------------------------
      /** @name Constructor */
      //@{
      
      /**
        * Protected default constructor
        */
      XMLEntityHandler()
      {
      }
      //@}
  
  
  
  private:
      // -----------------------------------------------------------------------
      //  Unimplemented constructors and destructor
      // -----------------------------------------------------------------------
      XMLEntityHandler(const XMLEntityHandler&);
      void operator=(const XMLEntityHandler&);
  };
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/framework/XMLErrorCodes.hpp
  
  Index: XMLErrorCodes.hpp
  ===================================================================
  // This file is generated, don't edit it!!
  
  #if !defined(ERRHEADER_XMLErrs)
  #define ERRHEADER_XMLErrs
  
  #include <xercesc/framework/XMLErrorReporter.hpp>
  
  class XMLErrs
  {
  public :
      enum Codes
      {
          NoError                            = 0
        , W_LowBounds                        = 1
        , NotationAlreadyExists              = 2
        , AttListAlreadyExists               = 3
        , ContradictoryEncoding              = 4
        , UndeclaredElemInCM                 = 5
        , UndeclaredElemInAttList            = 6
        , XMLException_Warning               = 7
        , W_HighBounds                       = 8
        , E_LowBounds                        = 9
        , FeatureUnsupported                 = 10
        , TopLevelNoNameComplexType          = 11
        , TopLevelNoNameAttribute            = 12
        , NoNameRefAttribute                 = 13
        , GlobalNoNameElement                = 14
        , NoNameRefElement                   = 15
        , NoNameRefGroup                     = 16
        , NoNameRefAttGroup                  = 17
        , AnonComplexTypeWithName            = 18
        , AnonSimpleTypeWithName             = 19
        , InvalidElementContent              = 20
        , UntypedElement                     = 21
        , SimpleTypeContentError             = 22
        , ExpectedSimpleTypeInList           = 23
        , ListUnionRestrictionError          = 24
        , SimpleTypeDerivationByListError    = 25
        , ExpectedSimpleTypeInRestriction    = 26
        , DuplicateFacet                     = 27
        , ExpectedSimpleTypeInUnion          = 28
        , EmptySimpleTypeContent             = 29
        , InvalidSimpleContent               = 30
        , UnspecifiedBase                    = 31
        , InvalidComplexContent              = 32
        , SchemaElementContentError          = 33
        , ContentError                       = 34
        , UnknownSimpleType                  = 35
        , UnknownComplexType                 = 36
        , UnresolvedPrefix                   = 37
        , RefElementNotFound                 = 38
        , TypeNotFound                       = 39
        , TopLevelAttributeNotFound          = 40
        , InvalidChildInComplexType          = 41
        , BaseTypeNotFound                   = 42
        , NoAttributeInSchema                = 43
        , DatatypeValidatorCreationError     = 44
        , InvalidChildFollowingSimpleContent   = 45
        , InvalidChildFollowingConplexContent   = 46
        , InvalidComplexTypeBlockValue       = 47
        , InvalidComplexTypeFinalValue       = 48
        , AttributeDefaultFixedValue         = 49
        , NotOptionalDefaultAttValue         = 50
        , LocalAttributeWithNameRef          = 51
        , GlobalAttributeWithNameRef         = 52
        , DuplicateAttribute                 = 53
        , AttributeWithTypeAndSimpleType     = 54
        , AttributeSimpleTypeNotFound        = 55
        , ElementWithFixedAndDefault         = 56
        , DeclarationWithNameRef             = 57
        , BadAttWithRef                      = 58
        , InvalidDeclarationName             = 59
        , GlobalElementWithRef               = 60
        , ElementWithTypeAndAnonType         = 61
        , NotSimpleOrMixedElement            = 62
        , DisallowedSimpleTypeExtension      = 63
        , InvalidSimpleContentBase           = 64
        , InvalidComplexTypeBase             = 65
        , InvalidChildInSimpleContent        = 66
        , InvalidChildInComplexContent       = 67
        , AnnotationError                    = 68
        , DisallowedBaseDerivation           = 69
        , SubstitutionRepeated               = 70
        , UnionRepeated                      = 71
        , ExtensionRepeated                  = 72
        , ListRepeated                       = 73
        , RestrictionRepeated                = 74
        , InvalidBlockValue                  = 75
        , InvalidFinalValue                  = 76
        , InvalidSubstitutionGroupElement    = 77
        , SubstitutionGroupTypeMismatch      = 78
        , DuplicateElementDeclaration        = 79
        , InvalidElementBlockValue           = 80
        , InvalidElementFinalValue           = 81
        , InvalidAttValue                    = 82
        , AttributeRefContentError           = 83
        , DuplicateRefAttribute              = 84
        , ForbiddenDerivationByRestriction   = 85
        , ForbiddenDerivationByExtension     = 86
        , BaseNotComplexType                 = 87
        , ImportNamespaceDifference          = 88
        , ImportRootError                    = 89
        , DeclarationNoSchemaLocation        = 90
        , IncludeNamespaceDifference         = 91
        , OnlyAnnotationExpected             = 92
        , InvalidAttributeContent            = 93
        , AttributeRequired                  = 94
        , AttributeDisallowed                = 95
        , InvalidMin2MaxOccurs               = 96
        , AnyAttributeContentError           = 97
        , NoNameGlobalElement                = 98
        , NoCircularDefinition               = 99
        , DuplicateGlobalType                = 100
        , DuplicateGlobalDeclaration         = 101
        , WS_CollapseExpected                = 102
        , Import_1_1                         = 103
        , Import_1_2                         = 104
        , ElemIDValueConstraint              = 105
        , NoNotationType                     = 106
        , EmptiableMixedContent              = 107
        , EmptyComplexRestrictionDerivation   = 108
        , MixedOrElementOnly                 = 109
        , InvalidContentRestriction          = 110
        , ForbiddenDerivation                = 111
        , AtomicItemType                     = 112
        , MemberTypeNoUnion                  = 113
        , GroupContentError                  = 114
        , AttGroupContentError               = 115
        , MinMaxOnGroupChild                 = 116
        , DeclarationNotFound                = 117
        , AllContentLimited                  = 118
        , BadMinMaxAllCT                     = 119
        , BadMinMaxAllElem                   = 120
        , NoCircularAttGroup                 = 121
        , DuplicateAttInDerivation           = 122
        , NotExpressibleWildCardIntersection   = 123
        , BadAttDerivation_1                 = 124
        , BadAttDerivation_2                 = 125
        , BadAttDerivation_3                 = 126
        , BadAttDerivation_4                 = 127
        , BadAttDerivation_5                 = 128
        , BadAttDerivation_6                 = 129
        , BadAttDerivation_7                 = 130
        , BadAttDerivation_8                 = 131
        , AllContentError                    = 132
        , RedefineNamespaceDifference        = 133
        , Redefine_InvalidSimpleType         = 134
        , Redefine_InvalidSimpleTypeBase     = 135
        , Redefine_InvalidComplexType        = 136
        , Redefine_InvalidComplexTypeBase    = 137
        , Redefine_InvalidGroupMinMax        = 138
        , Redefine_DeclarationNotFound       = 139
        , Redefine_GroupRefCount             = 140
        , Redefine_AttGroupRefCount          = 141
        , Notation_InvalidDecl               = 142
        , Notation_DeclNotFound              = 143
        , IC_DuplicateDecl                   = 144
        , IC_BadContent                      = 145
        , IC_KeyRefReferNotFound             = 146
        , IC_KeyRefCardinality               = 147
        , IC_XPathExprMissing                = 148
        , PD_EmptyBase                       = 149
        , AttUseCorrect                      = 150
        , AttDeclPropCorrect3                = 151
        , AttDeclPropCorrect5                = 152
        , AttGrpPropCorrect3                 = 153
        , InvalidTargetNSValue               = 154
        , DisplayErrorMessage                = 155
        , XMLException_Error                 = 156
        , InvalidRedefine                    = 157
        , InvalidNSReference                 = 158
        , NotAllContent                      = 159
        , E_HighBounds                       = 160
        , F_LowBounds                        = 161
        , ExpectedCommentOrCDATA             = 162
        , ExpectedAttrName                   = 163
        , ExpectedNotationName               = 164
        , NoRepInMixed                       = 165
        , BadDefAttrDecl                     = 166
        , ExpectedDefAttrDecl                = 167
        , AttListSyntaxError                 = 168
        , ExpectedEqSign                     = 169
        , DupAttrName                        = 170
        , BadIdForXMLLangAttr                = 171
        , ExpectedElementName                = 172
        , MustStartWithXMLDecl               = 173
        , CommentsMustStartWith              = 174
        , InvalidDocumentStructure           = 175
        , ExpectedDeclString                 = 176
        , BadXMLVersion                      = 177
        , UnsupportedXMLVersion              = 178
        , UnterminatedXMLDecl                = 179
        , BadXMLEncoding                     = 180
        , BadStandalone                      = 181
        , UnterminatedComment                = 182
        , PINameExpected                     = 183
        , UnterminatedPI                     = 184
        , InvalidCharacter                   = 185
        , UnexpectedTextBeforeRoot           = 186
        , UnterminatedStartTag               = 187
        , ExpectedAttrValue                  = 188
        , UnterminatedEndTag                 = 189
        , ExpectedAttributeType              = 190
        , ExpectedEndOfTagX                  = 191
        , ExpectedMarkup                     = 192
        , NotValidAfterContent               = 193
        , ExpectedComment                    = 194
        , ExpectedCommentOrPI                = 195
        , ExpectedWhitespace                 = 196
        , NoRootElemInDOCTYPE                = 197
        , ExpectedQuotedString               = 198
        , ExpectedPublicId                   = 199
        , InvalidPublicIdChar                = 200
        , UnterminatedDOCTYPE                = 201
        , InvalidCharacterInIntSubset        = 202
        , ExpectedCDATA                      = 203
        , InvalidInitialNameChar             = 204
        , InvalidNameChar                    = 205
        , UnexpectedWhitespace               = 206
        , InvalidCharacterInAttrValue        = 207
        , ExpectedMarkupDecl                 = 208
        , TextDeclNotLegalHere               = 209
        , ConditionalSectInIntSubset         = 210
        , ExpectedPEName                     = 211
        , UnterminatedEntityDecl             = 212
        , InvalidCharacterRef                = 213
        , UnterminatedCharRef                = 214
        , ExpectedEntityRefName              = 215
        , EntityNotFound                     = 216
        , NoUnparsedEntityRefs               = 217
        , UnterminatedEntityRef              = 218
        , RecursiveEntity                    = 219
        , PartialMarkupInEntity              = 220
        , UnterminatedElementDecl            = 221
        , ExpectedContentSpecExpr            = 222
        , ExpectedAsterisk                   = 223
        , UnterminatedContentModel           = 224
        , ExpectedSystemId                   = 225
        , ExpectedSystemOrPublicId           = 226
        , UnterminatedNotationDecl           = 227
        , ExpectedSeqChoiceLeaf              = 228
        , ExpectedChoiceOrCloseParen         = 229
        , ExpectedSeqOrCloseParen            = 230
        , ExpectedEnumValue                  = 231
        , ExpectedEnumSepOrParen             = 232
        , UnterminatedEntityLiteral          = 233
        , MoreEndThanStartTags               = 234
        , ExpectedOpenParen                  = 235
        , AttrAlreadyUsedInSTag              = 236
        , BracketInAttrValue                 = 237
        , Expected2ndSurrogateChar           = 238
        , ExpectedEndOfConditional           = 239
        , ExpectedIncOrIgn                   = 240
        , ExpectedINCLUDEBracket             = 241
        , ExpectedTextDecl                   = 242
        , ExpectedXMLDecl                    = 243
        , UnexpectedEOE                      = 244
        , PEPropogated                       = 245
        , ExtraCloseSquare                   = 246
        , PERefInMarkupInIntSubset           = 247
        , EntityPropogated                   = 248
        , ExpectedNumericalCharRef           = 249
        , ExpectedOpenSquareBracket          = 250
        , BadSequenceInCharData              = 251
        , IllegalSequenceInComment           = 252
        , UnterminatedCDATASection           = 253
        , ExpectedNDATA                      = 254
        , NDATANotValidForPE                 = 255
        , HexRadixMustBeLowerCase            = 256
        , DeclStringRep                      = 257
        , DeclStringsInWrongOrder            = 258
        , NoExtRefsInAttValue                = 259
        , XMLDeclMustBeLowerCase             = 260
        , ExpectedEntityValue                = 261
        , BadDigitForRadix                   = 262
        , EndedWithTagsOnStack               = 263
        , AmbiguousContentModel              = 264
        , NestedCDATA                        = 265
        , UnknownPrefix                      = 266
        , PartialTagMarkupError              = 267
        , EmptyMainEntity                    = 268
        , CDATAOutsideOfContent              = 269
        , OnlyCharRefsAllowedHere            = 270
        , Unexpected2ndSurrogateChar         = 271
        , NoPIStartsWithXML                  = 272
        , XMLDeclMustBeFirst                 = 273
        , XMLVersionRequired                 = 274
        , StandaloneNotLegal                 = 275
        , EncodingRequired                   = 276
        , TooManyColonsInName                = 277
        , InvalidColonPos                    = 278
        , ColonNotLegalWithNS                = 279
        , SysException                       = 280
        , XMLException_Fatal                 = 281
        , UnexpectedEOF                      = 282
        , UnexpectedError                    = 283
        , BadSchemaLocation                  = 284
        , NoGrammarResolver                  = 285
        , SchemaScanFatalError               = 286
        , F_HighBounds                       = 287
      };
  
      static bool isFatal(const XMLErrs::Codes toCheck)
      {
          return ((toCheck >= F_LowBounds) && (toCheck <= F_HighBounds));
      }
  
      static bool isWarning(const XMLErrs::Codes toCheck)
      {
          return ((toCheck >= W_LowBounds) && (toCheck <= W_HighBounds));
      }
  
      static bool isError(const XMLErrs::Codes toCheck)
      {
          return ((toCheck >= E_LowBounds) && (toCheck <= E_HighBounds));
      }
  
      static XMLErrorReporter::ErrTypes errorType(const XMLErrs::Codes toCheck)
      {
         if ((toCheck >= W_LowBounds) && (toCheck <= W_HighBounds))
             return XMLErrorReporter::ErrType_Warning;
         else if ((toCheck >= F_LowBounds) && (toCheck <= F_HighBounds))
              return XMLErrorReporter::ErrType_Fatal;
         else if ((toCheck >= E_LowBounds) && (toCheck <= E_HighBounds))
              return XMLErrorReporter::ErrType_Error;
         return XMLErrorReporter::ErrTypes_Unknown;
      }
  };
  #endif
  
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/framework/XMLErrorReporter.hpp
  
  Index: XMLErrorReporter.hpp
  ===================================================================
  /*
   * 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/>.
   */
  
   /*
    * $Log: XMLErrorReporter.hpp,v $
    * Revision 1.1  2002/10/23 08:55:09  lilantha
    * update with new XML parser lib
    *
    * Revision 1.2  2002/02/20 18:17:01  tng
    * [Bug 5977] Warnings on generating apiDocs.
    *
    * Revision 1.1.1.1  2002/02/01 22:21:51  peiyongz
    * sane_include
    *
    * Revision 1.11  2001/05/11 13:25:32  tng
    * Copyright update.
    *
    * Revision 1.10  2001/05/03 19:08:56  knoaman
    * Support Warning/Error/FatalError messaging.
    * Validity constraints errors are treated as errors, with the ability by user to set
    * validity constraints as fatal errors.
    *
    * Revision 1.9  2000/12/14 18:49:57  tng
    * Fix API document generation warning: "Warning: end of member group without matching begin"
    *
    * Revision 1.8  2000/03/02 19:54:25  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:00:23  abagchi
    * Swat for removing Log from API docs
    *
    * Revision 1.6  2000/02/16 23:03:48  roddey
    * More documentation updates
    *
    * Revision 1.5  2000/02/16 21:42:58  aruna1
    * API Doc++ summary changes in
    *
    * Revision 1.4  2000/02/15 23:59:07  roddey
    * More updated documentation of Framework classes.
    *
    * Revision 1.3  2000/02/15 01:21:31  roddey
    * Some initial documentation improvements. More to come...
    *
    * Revision 1.2  2000/02/06 07:47:48  rahulj
    * Year 2K copyright swat.
    *
    * Revision 1.1.1.1  1999/11/09 01:08:34  twl
    * Initial checkin
    *
    * Revision 1.2  1999/11/08 20:44:39  rahul
    * Swat for adding in Product name and CVS comment log variable.
    *
    */
  
  
  #if !defined(XMLERRORREPORTER_HPP)
  #define XMLERRORREPORTER_HPP
  
  #include <xercesc/util/XercesDefs.hpp>
  #include <xercesc/util/XMLMsgLoader.hpp>
  
  
  /**
   *  This abstract class defines a callback mechanism for the scanner. By
   *  creating a class that implements this interface and plugging an instance
   *  of that class into the scanner, the scanner will call back on the object's
   *  virtual methods to report error events. This class is also used with the
   *  validator, to allow it to report errors.
   *
   *  This class is primarily for use by those writing their own parser classes.
   *  If you use the standard parser classes, DOMParser and SAXParser, you won't
   *  use this API. You will instead use a similar mechanism defined by the SAX
   *  API, called ErrorHandler.
   */
  class XMLPARSER_EXPORT XMLErrorReporter
  {
  public:
      // -----------------------------------------------------------------------
      //  The types of errors we can issue
      // -----------------------------------------------------------------------
      enum ErrTypes
      {
          ErrType_Warning
          , ErrType_Error
          , ErrType_Fatal
  
          , ErrTypes_Unknown
      };
  
  
      // -----------------------------------------------------------------------
      //  Constructors are hidden, only the virtual destructor is exposed
      // -----------------------------------------------------------------------
  
      /** @name Destructor */
      //@{
  
      /**
        *   Default destructor
        */
      virtual ~XMLErrorReporter()
      {
      }
      //@}
  
  
      // -----------------------------------------------------------------------
      //  The error handler interface
      // -----------------------------------------------------------------------
  
      /** @name Error Handler interface */
      //@{
  
      /** Called to report errors from the scanner or validator
        *
        * This method is called back on by the scanner or validator (or any other
        * internal parser component which might need to report an error in the
        * future.) It contains all the information that the client code might
        * need to report or log the error.
        *
        * @param  errCode     The error code of the error being reported. What
        *                     this means is dependent on the domain it is from.
        *
        * @param  errDomain   The domain from which the error occured. The domain
        *                     is a means of providing a hierarchical layering to
        *                     the error system, so that a single set of error id
        *                     numbers don't have to be split up.
        *
        * @param  type        The error type, which is defined mostly by XML which
        *                     categorizes errors into warning, errors and validity
        *                     constraints.
        *
        * @param  errorText   The actual text of the error. This is translatable,
        *                     so can possibly be in the local language if a
        *                     translation has been provided.
        *
        * @param  systemId    The system id of the entity where the error occured,
        *                     fully qualified.
        *
        * @param  publicId    The optional public id of the entity were the error
        *                     occured. It can be an empty string if non was provided.
        *
        * @param  lineNum     The line number within the source XML of the error.
        *
        * @param  colNum      The column number within the source XML of the error.
        *                     Because of the parsing style, this is usually just
        *                     after the actual offending text.
        */
      virtual void error
      (
          const   unsigned int        errCode
          , const XMLCh* const        errDomain
          , const ErrTypes            type
          , const XMLCh* const        errorText
          , const XMLCh* const        systemId
          , const XMLCh* const        publicId
          , const unsigned int        lineNum
          , const unsigned int        colNum
      ) = 0;
  
      /** Called before a new parse event to allow the handler to reset
        *
        * This method is called by the scanner before a new parse event is
        * about to start. It gives the error handler a chance to reset its
        * internal state.
        */
      virtual void resetErrors() = 0;
  
      //@}
  
  
  protected :
  
      /** @name Constructor */
      //@{
  
      /**
        *   Default constructor
        */
      XMLErrorReporter()
      {
      }
      //@}
  
  private:
      // -----------------------------------------------------------------------
      //  Unimplemented constructors and destructor
      // -----------------------------------------------------------------------
      XMLErrorReporter(const XMLErrorReporter&);
      void operator=(const XMLErrorReporter&);
  };
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/framework/XMLFormatter.hpp
  
  Index: XMLFormatter.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: XMLFormatter.hpp,v $
   * Revision 1.1  2002/10/23 08:55:09  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:21:52  peiyongz
   * sane_include
   *
   * Revision 1.7  2000/10/17 19:25:38  andyh
   * XMLFormatTarget, removed version of writeChars with no length.  Can not be
   * safely used, and obscured other errors.
   *
   * Revision 1.6  2000/10/10 23:54:58  andyh
   * XMLFormatter patch, contributed by Bill Schindler.  Fix problems with
   * output to multi-byte encodings.
   *
   * Revision 1.5  2000/04/07 01:01:56  roddey
   * Fixed an error message so that it indicated the correct radix for the rep
   * token. Get all of the basic output formatting functionality in place for
   * at least ICU and Win32 transcoders.
   *
   * Revision 1.4  2000/04/06 23:50:38  roddey
   * Now the low level formatter handles doing char refs for
   * unrepresentable chars (in addition to the replacement char style
   * already done.)
   *
   * Revision 1.3  2000/04/06 19:09:21  roddey
   * Some more improvements to output formatting. Now it will correctly
   * handle doing the 'replacement char' style of dealing with chars
   * that are unrepresentable.
   *
   * Revision 1.2  2000/04/05 00:20:16  roddey
   * More updates for the low level formatted output support
   *
   * Revision 1.1  2000/03/28 19:43:17  roddey
   * Fixes for signed/unsigned warnings. New work for two way transcoding
   * stuff.
   *
   */
  
  #if !defined(XMLFORMATTER_HPP)
  #define XMLFORMATTER_HPP
  
  #include <xercesc/util/XercesDefs.hpp>
  
  class XMLFormatTarget;
  class XMLTranscoder;
  
  /**
   *  This class provides the basic formatting capabilities that are required
   *  to turn the Unicode based XML data from the parsers into a form that can
   *  be used on non-Unicode based systems, i.e. into local or generic text
   *  encodings.
   *
   *  A number of flags are provided to control whether various optional
   *  formatting operations are performed.
   */
  class XMLPARSER_EXPORT XMLFormatter
  {
  public:
      // -----------------------------------------------------------------------
      //  Class types
      // -----------------------------------------------------------------------
      enum EscapeFlags
      {
          NoEscapes
          , StdEscapes
          , AttrEscapes
          , CharEscapes
  
          // Special values, don't use directly
          , EscapeFlags_Count
          , DefaultEscape     = 999
      };
  
      enum UnRepFlags
      {
          UnRep_Fail
          , UnRep_CharRef
          , UnRep_Replace
  
          , DefaultUnRep      = 999
      };
  
  
      // -----------------------------------------------------------------------
      //  Constructors and Destructor
      // -----------------------------------------------------------------------
      XMLFormatter
      (
          const   XMLCh* const            outEncoding
          ,       XMLFormatTarget* const  target
          , const EscapeFlags             escapeFlags = NoEscapes
          , const UnRepFlags              unrepFlags = UnRep_Fail
      );
  
      XMLFormatter
      (
          const   char* const             outEncoding
          ,       XMLFormatTarget* const  target
          , const EscapeFlags             escapeFlags = NoEscapes
          , const UnRepFlags              unrepFlags = UnRep_Fail
      );
  
      ~XMLFormatter();
  
  
      // -----------------------------------------------------------------------
      //  Formatting methods
      // -----------------------------------------------------------------------
      void formatBuf
      (
          const   XMLCh* const    toFormat
          , const unsigned int    count
          , const EscapeFlags     escapeFlags = DefaultEscape
          , const UnRepFlags      unrepFlags = DefaultUnRep
      );
  
      XMLFormatter& operator<<
      (
          const   XMLCh* const    toFormat
      );
  
      XMLFormatter& operator<<
      (
          const   XMLCh           toFormat
      );
  
  
      // -----------------------------------------------------------------------
      //  Getter methods
      // -----------------------------------------------------------------------
      const XMLCh* getEncodingName() const;
  
  
      // -----------------------------------------------------------------------
      //  Setter methods
      // -----------------------------------------------------------------------
      void setEscapeFlags
      (
          const   EscapeFlags     newFlags
      );
  
      void setUnRepFlags
      (
          const   UnRepFlags      newFlags
      );
  
      XMLFormatter& operator<<
      (
          const   EscapeFlags     newFlags
      );
  
      XMLFormatter& operator<<
      (
          const   UnRepFlags      newFlags
      );
  
  
  private :
      // -----------------------------------------------------------------------
      //  Unimplemented constructors and operators
      // -----------------------------------------------------------------------
      XMLFormatter();
      XMLFormatter(const XMLFormatter&);
      void operator=(const XMLFormatter&);
  
  
      // -----------------------------------------------------------------------
      //  Private class constants
      // -----------------------------------------------------------------------
      enum Constants
      {
          kTmpBufSize     = 16 * 1024
      };
  
  
      // -----------------------------------------------------------------------
      //  Private helper methods
      // -----------------------------------------------------------------------
      const XMLByte* getAposRef(unsigned int & count);
      const XMLByte* getAmpRef(unsigned int & count);
      const XMLByte* getGTRef(unsigned int & count);
      const XMLByte* getLTRef(unsigned int & count);
      const XMLByte* getQuoteRef(unsigned int & count);
  
      void specialFormat
      (
          const   XMLCh* const    toFormat
          , const unsigned int    count
          , const EscapeFlags     escapeFlags
      );
  
  
      // -----------------------------------------------------------------------
      //  Private, non-virtual methods
      //
      //  fEscapeFlags
      //      The escape flags we were told to use in formatting. These are
      //      defaults set in the ctor, which can be overridden on a particular
      //      call.
      //
      //  fOutEncoding
      //      This the name of the output encoding. Saved mainly for meaningful
      //      error messages.
      //
      //  fTarget
      //      This is the target object for the formatting operation.
      //
      //  fUnRepFlags
      //      The unrepresentable flags that indicate how to react when a
      //      character cannot be represented in the target encoding.
      //
      //  fXCoder
      //      This the transcoder that we will use. It is created using the
      //      encoding name we were told to use.
      //
      //  fTmpBuf
      //      An output buffer that we use to transcode chars into before we
      //      send them off to be output.
      //
      //  fAposRef
      //  fAmpRef
      //  fGTRef
      //  fLTRef
      //  fQuoteRef
      //      These are character refs for the standard char refs, in the
      //      output encoding. They are faulted in as required, by transcoding
      //      them from fixed Unicode versions.
      // -----------------------------------------------------------------------
      EscapeFlags                 fEscapeFlags;
      XMLCh*                      fOutEncoding;
      XMLFormatTarget*            fTarget;
      UnRepFlags                  fUnRepFlags;
      XMLTranscoder*              fXCoder;
      XMLByte                     fTmpBuf[kTmpBufSize + 4];
  
      XMLByte*                    fAposRef;
      unsigned int                fAposLen;
      XMLByte*                    fAmpRef;
      unsigned int                fAmpLen;
      XMLByte*                    fGTRef;
      unsigned int                fGTLen;
      XMLByte*                    fLTRef;
      unsigned int                fLTLen;
      XMLByte*                    fQuoteRef;
      unsigned int                fQuoteLen;
  };
  
  
  class XMLPARSER_EXPORT XMLFormatTarget
  {
  public:
      // -----------------------------------------------------------------------
      //  Constructors and Destructor
      // -----------------------------------------------------------------------
      virtual ~XMLFormatTarget() {}
  
  
      // -----------------------------------------------------------------------
      //  Virtual interface
      // -----------------------------------------------------------------------
      virtual void writeChars
      (
          const   XMLByte* const      toWrite
          , const unsigned int        count
          ,       XMLFormatter* const formatter
      ) = 0;
  
  
  protected :
      // -----------------------------------------------------------------------
      //  Hidden constructors and operators
      // -----------------------------------------------------------------------
      XMLFormatTarget() {}
      XMLFormatTarget(const XMLFormatTarget&) {}
      void operator=(const XMLFormatTarget&) {}
  };
  
  
  // ---------------------------------------------------------------------------
  //  XMLFormatter: Getter methods
  // ---------------------------------------------------------------------------
  inline const XMLCh* XMLFormatter::getEncodingName() const
  {
      return fOutEncoding;
  }
  
  
  // ---------------------------------------------------------------------------
  //  XMLFormatter: Setter methods
  // ---------------------------------------------------------------------------
  inline void XMLFormatter::setEscapeFlags(const EscapeFlags newFlags)
  {
      fEscapeFlags = newFlags;
  }
  
  inline void XMLFormatter::setUnRepFlags(const UnRepFlags newFlags)
  {
      fUnRepFlags = newFlags;
  }
  
  
  inline XMLFormatter& XMLFormatter::operator<<(const EscapeFlags newFlags)
  {
      fEscapeFlags = newFlags;
      return *this;
  }
  
  inline XMLFormatter& XMLFormatter::operator<<(const UnRepFlags newFlags)
  {
      fUnRepFlags = newFlags;
      return *this;
  }
  
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/framework/XMLNotationDecl.hpp
  
  Index: XMLNotationDecl.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: XMLNotationDecl.hpp,v $
   * Revision 1.1  2002/10/23 08:55:09  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:21:52  peiyongz
   * sane_include
   *
   * Revision 1.5  2000/03/02 19:54:25  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:00:23  abagchi
   * Swat for removing Log from API docs
   *
   * Revision 1.3  2000/02/15 01:21:31  roddey
   * Some initial documentation improvements. More to come...
   *
   * Revision 1.2  2000/02/06 07:47:48  rahulj
   * Year 2K copyright swat.
   *
   * Revision 1.1.1.1  1999/11/09 01:08:35  twl
   * Initial checkin
   *
   * Revision 1.2  1999/11/08 20:44:39  rahul
   * Swat for adding in Product name and CVS comment log variable.
   *
   */
  
  #if !defined(XMLNOTATIONDECL_HPP)
  #define XMLNOTATIONDECL_HPP
  
  #include <xercesc/util/XercesDefs.hpp>
  #include <xercesc/util/XMLString.hpp>
  
  /**
   *  This class represents the core information about a notation declaration
   *  that all validators must at least support. Each validator will create a
   *  derivative of this class which adds any information it requires for its
   *  own extra needs.
   *
   *  At this common level, the information supported is the notation name
   *  and the public and sysetm ids indicated in the notation declaration.
   */
  class XMLPARSER_EXPORT XMLNotationDecl
  {
  public:
      // -----------------------------------------------------------------------
      //  Constructors and Destructor
      // -----------------------------------------------------------------------
  
      /** @name Constructors */
      //@{
      XMLNotationDecl();
      XMLNotationDecl
      (
          const   XMLCh* const    notName
          , const XMLCh* const    pubId
          , const XMLCh* const    sysId
      );
      //@}
  
      /** @name Destructor */
      //@{
      ~XMLNotationDecl();
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Getter methods
      // -----------------------------------------------------------------------
      unsigned int getId() const;
      const XMLCh* getName() const;
      const XMLCh* getPublicId() const;
      const XMLCh* getSystemId() const;
  
  
      // -----------------------------------------------------------------------
      //  Setter methods
      // -----------------------------------------------------------------------
      void setId(const unsigned int newId);
      void setName
      (
          const   XMLCh* const    notName
      );
      void setPublicId(const XMLCh* const newId);
      void setSystemId(const XMLCh* const newId);
  
  
      // -----------------------------------------------------------------------
      //  Support named collection element semantics
      // -----------------------------------------------------------------------
      const XMLCh* getKey() const;
  
  
  private :
      // -----------------------------------------------------------------------
      //  Unimplemented constructors and operators
      // -----------------------------------------------------------------------
      XMLNotationDecl(const XMLNotationDecl&);
      void operator=(const XMLNotationDecl&);
  
  
      // -----------------------------------------------------------------------
      //  XMLNotationDecl: Private helper methods
      // -----------------------------------------------------------------------
      void cleanUp();
  
  
      // -----------------------------------------------------------------------
      //  Private data members
      //
      //  fId
      //      This is the unique id given to this notation decl.
      //
      //  fName
      //      The notation's name, which identifies the type of notation it
      //      applies to.
      //
      //  fPublicId
      //      The text of the notation's public id, if any.
      //
      //  fSystemId
      //      The text of the notation's system id, if any.
      // -----------------------------------------------------------------------
      unsigned int    fId;
  	XMLCh*          fName;
      XMLCh*          fPublicId;
      XMLCh*          fSystemId;
  };
  
  
  // -----------------------------------------------------------------------
  //  Getter methods
  // -----------------------------------------------------------------------
  inline unsigned int XMLNotationDecl::getId() const
  {
      return fId;
  }
  
  inline const XMLCh* XMLNotationDecl::getName() const
  {
      return fName;
  }
  
  inline const XMLCh* XMLNotationDecl::getPublicId() const
  {
      return fPublicId;
  }
  
  inline const XMLCh* XMLNotationDecl::getSystemId() const
  {
      return fSystemId;
  }
  
  
  // -----------------------------------------------------------------------
  //  Setter methods
  // -----------------------------------------------------------------------
  inline void XMLNotationDecl::setId(const unsigned int newId)
  {
      fId = newId;
  }
  
  inline void XMLNotationDecl::setPublicId(const XMLCh* const newId)
  {
      delete [] fPublicId;
      fPublicId = XMLString::replicate(newId);
  }
  
  inline void XMLNotationDecl::setSystemId(const XMLCh* const newId)
  {
      delete [] fSystemId;
      fSystemId = XMLString::replicate(newId);
  }
  
  
  // ---------------------------------------------------------------------------
  //  XMLNotationDecl: Support named pool element semantics
  // ---------------------------------------------------------------------------
  inline const XMLCh* XMLNotationDecl::getKey() const
  {
      return fName;
  }
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/framework/XMLPScanToken.hpp
  
  Index: XMLPScanToken.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: XMLPScanToken.hpp,v $
   * Revision 1.1  2002/10/23 08:55:09  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:21:52  peiyongz
   * sane_include
   *
   * Revision 1.4  2000/02/24 20:00:23  abagchi
   * Swat for removing Log from API docs
   *
   * Revision 1.3  2000/02/15 01:21:31  roddey
   * Some initial documentation improvements. More to come...
   *
   * Revision 1.2  2000/02/06 07:47:48  rahulj
   * Year 2K copyright swat.
   *
   * Revision 1.1.1.1  1999/11/09 01:08:36  twl
   * Initial checkin
   *
   * Revision 1.2  1999/11/08 20:44:39  rahul
   * Swat for adding in Product name and CVS comment log variable.
   *
   */
  
  
  #if !defined(XMLPSCANTOKEN_HPP)
  #define XMLPSCANTOKEN_HPP
  
  class XMLScanner;
  
  /**
   *  This simple class is used as a sanity check when the scanner is used to
   *  do progressive parsing. It insures that things are not done out of
   *  sequence and that sequences of scan calls are made correctly to the
   *  right scanner instances.
   *
   *  To client code, it is just a magic cookie which is obtained when a
   *  progressive parse is begun, and which is passed back in on each subsequent
   *  call of the progressive parse.
   */
  class XMLPARSER_EXPORT XMLPScanToken
  {
  public :
      // -----------------------------------------------------------------------
      //  Constructors and Destructor
      // -----------------------------------------------------------------------
      /** @name Constructor */
      //@{
      XMLPScanToken();
      XMLPScanToken(const XMLPScanToken& toCopy);
      //@}
  
      /** @name Destructor */
      //@{
      ~XMLPScanToken();
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Public operators
      // -----------------------------------------------------------------------
      XMLPScanToken& operator=(const XMLPScanToken& toCopy);
  
  
  protected :
      // -----------------------------------------------------------------------
      //  XMLScanner is our friend, can you say friend? Sure...
      // -----------------------------------------------------------------------
      friend class XMLScanner;
  
  
      // -----------------------------------------------------------------------
      //  Hidden methods for use by XMLScanner
      // -----------------------------------------------------------------------
      void set
      (
          const   XMLUInt32   scannerId
          , const XMLUInt32   sequenceId
      );
  
  
  private :
      // -----------------------------------------------------------------------
      //  Private data members
      //
      //  fScannerId
      //      This field is set to the id of the scanner, to catch problems
      //      where a token is gotten from one scanner and passed to another.
      //      Each scanner is assigned an incrementing id.
      //
      //  fSequenceId
      //      In order to avoid problems such as calling scanNext() without
      //      a call to scanFirst() and such, this value is set when scanFirst()
      //      is called and matches this token to the current sequence id of
      //      the scanner.
      // -----------------------------------------------------------------------
      XMLUInt32   fScannerId;
      XMLUInt32   fSequenceId;
  };
  
  
  // ---------------------------------------------------------------------------
  //  XMLPScanToken: Constructors and Operators
  // ---------------------------------------------------------------------------
  inline XMLPScanToken::XMLPScanToken() :
  
      fScannerId(0)
      , fSequenceId(0)
  {
  }
  
  inline XMLPScanToken::XMLPScanToken(const XMLPScanToken& toCopy) :
  
      fScannerId(toCopy.fScannerId)
      , fSequenceId(toCopy.fSequenceId)
  {
  }
  
  inline XMLPScanToken::~XMLPScanToken()
  {
  }
  
  
  // ---------------------------------------------------------------------------
  //  XMLPScanToken: Public operators
  // ---------------------------------------------------------------------------
  inline XMLPScanToken& XMLPScanToken::operator=(const XMLPScanToken& toCopy)
  {
      if (this == &toCopy)
          return *this;
  
      fScannerId = toCopy.fScannerId;
      fSequenceId = toCopy.fSequenceId;
  
      return *this;
  }
  
  
  // ---------------------------------------------------------------------------
  //  XMLPScanToken: Hidden methods
  // ---------------------------------------------------------------------------
  inline void XMLPScanToken::set( const   XMLUInt32   scannerId
                                  , const XMLUInt32   sequenceId)
  {
      fScannerId = scannerId;
      fSequenceId = sequenceId;
  }
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/framework/XMLRecognizer.hpp
  
  Index: XMLRecognizer.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: XMLRecognizer.hpp,v 1.1 2002/10/23 08:55:09 lilantha Exp $
   */
  
  #if !defined(XMLRECOGNIZER_HPP)
  #define XMLRECOGNIZER_HPP
  
  /**
   *  This class provides some simple code to recognize the encodings of
   *  XML files. This recognition only does very basic sensing of the encoding
   *  in a broad sense. Basically its just enough to let us get started and
   *  read the XMLDecl line. The scanner, once it reads the XMLDecl, will
   *  tell the reader any actual encoding string it found and the reader can
   *  update itself to be more specific at that point.
   */
  class XMLPARSER_EXPORT XMLRecognizer
  {
  public :
      // -----------------------------------------------------------------------
      //  Class types
      //
      //  This enum represents the various encoding families that we have to
      //  deal with individually at the scanner level. This does not indicate
      //  the exact encoding, just the rough family that would let us scan
      //  the XML/TextDecl to find the encoding string.
      //
      //  The 'L's and 'B's stand for little or big endian. We conditionally
      //  create versions that will automatically map to the local UTF-16 and
      //  UCS-4 endian modes.
      //
      //  OtherEncoding means that its some transcoder based encoding, i.e. not
      //  one of the ones that we do internally. Its a special case and should
      //  never be used directly outside of the reader.
      //
      //  NOTE: Keep this in sync with the name map array in the Cpp file!!
      // -----------------------------------------------------------------------
      enum Encodings
      {
          EBCDIC          = 0
          , UCS_4B        = 1
          , UCS_4L        = 2
          , US_ASCII      = 3
          , UTF_8         = 4
          , UTF_16B       = 5
          , UTF_16L       = 6
  
          , Encodings_Count
          , Encodings_Min = EBCDIC
          , Encodings_Max = UTF_16L
  
          , OtherEncoding = 999
  
          #if defined(ENDIANMODE_BIG)
          , Def_UTF16     = UTF_16B
          , Def_UCS4      = UCS_4B
          #else
          , Def_UTF16     = UTF_16L
          , Def_UCS4      = UCS_4L
          #endif
      };
  
  
      // -----------------------------------------------------------------------
      //  Public, const static data
      //
      //  These are the byte sequences for each of the encodings that we can
      //  auto sense, and their lengths.
      // -----------------------------------------------------------------------
      static const char           fgASCIIPre[];
      static const unsigned int   fgASCIIPreLen;
      static const XMLByte        fgEBCDICPre[];
      static const unsigned int   fgEBCDICPreLen;
      static const XMLByte        fgUTF16BPre[];
      static const XMLByte        fgUTF16LPre[];
      static const unsigned int   fgUTF16PreLen;
      static const XMLByte        fgUCS4BPre[];
      static const XMLByte        fgUCS4LPre[];
      static const unsigned int   fgUCS4PreLen;
      static const char           fgUTF8BOM[];
      static const unsigned int   fgUTF8BOMLen;
  
  
      // -----------------------------------------------------------------------
      //  Encoding recognition methods
      // -----------------------------------------------------------------------
      static Encodings basicEncodingProbe
      (
          const   XMLByte* const      rawBuffer
          , const unsigned int        rawByteCount
      );
  
      static Encodings encodingForName
      (
          const   XMLCh* const    theEncName
      );
  
      static const XMLCh* nameForEncoding(const Encodings theEncoding);
  
  
  protected :
      // -----------------------------------------------------------------------
      //  Unimplemented constructors, operators, and destructor
      //
      //  This class is effectively being used as a namespace for some static
      //  methods.
      //
      //   (these functions are protected rather than private only to get rid of
      //    some annoying compiler warnings.)
      //
      // -----------------------------------------------------------------------
      XMLRecognizer();
      ~XMLRecognizer();
      void operator=(const XMLRecognizer&);
  };
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/framework/XMLRefInfo.hpp
  
  Index: XMLRefInfo.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: XMLRefInfo.hpp,v $
   * Revision 1.1  2002/10/23 08:55:09  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:21:52  peiyongz
   * sane_include
   *
   * Revision 1.5  2000/07/07 22:23:38  jpolast
   * remove useless getKey() functions.
   *
   * Revision 1.4  2000/02/24 20:00:23  abagchi
   * Swat for removing Log from API docs
   *
   * Revision 1.3  2000/02/15 01:21:31  roddey
   * Some initial documentation improvements. More to come...
   *
   * Revision 1.2  2000/02/06 07:47:49  rahulj
   * Year 2K copyright swat.
   *
   * Revision 1.1.1.1  1999/11/09 01:08:37  twl
   * Initial checkin
   *
   * Revision 1.2  1999/11/08 20:44:40  rahul
   * Swat for adding in Product name and CVS comment log variable.
   *
   */
  
  
  #if !defined(XMLIDREFINFO_HPP)
  #define XMLIDREFINFO_HPP
  
  
  /**
   *  This class provides a simple means to track ID Ref usage. Since id/idref
   *  semamatics are part of XML 1.0, any validator will likely to be able to
   *  track them. Instances of this class represent a reference and two markers,
   *  one for its being declared and another for its being used. When the
   *  document is done, one can look at each instance and, if used but not
   *  declared, its an error.
   *
   *  The getKey() method allows it to support keyed collection semantics. It
   *  returns the referenced name, so these objects will be stored via the hash
   *  of the name. This name will either be a standard QName if namespaces are
   *  not enabled/supported by the validator, or it will be in the form
   *  {url}name if namespace processing is enabled.
   */
  class XMLPARSER_EXPORT XMLRefInfo
  {
  public :
      // -----------------------------------------------------------------------
      //  Constructors and Destructor
      // -----------------------------------------------------------------------
  
      /** @name Constructor */
      //@{
      XMLRefInfo
      (
          const   XMLCh* const    refName
          , const bool            fDeclared = false
          , const bool            fUsed = false
      );
      //@}
  
      /** @name Destructor */
      //@{
      ~XMLRefInfo();
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Getter methods
      // -----------------------------------------------------------------------
      bool getDeclared() const;
      const XMLCh* getRefName() const;
      bool getUsed() const;
  
  
      // -----------------------------------------------------------------------
      //  Setter methods
      // -----------------------------------------------------------------------
      void setDeclared(const bool newValue);
      void setUsed(const bool newValue);
  
  private :
      // -----------------------------------------------------------------------
      //  Unimplemented constructors and operators
      // -----------------------------------------------------------------------
      XMLRefInfo();
      XMLRefInfo(const XMLRefInfo&);
      void operator=(XMLRefInfo&);
  
  
      // -----------------------------------------------------------------------
      //  Private data members
      //
      //  fDeclared
      //      The name was declared somewhere as an ID attribute.
      //
      //  fRefName
      //      The name of the ref that this object represents. This is not a
      //      name of the attribute, but of the value of an ID or IDREF attr
      //      in content.
      //
      //  fUsed
      //      The name was used somewhere in an IDREF/IDREFS attribute. If this
      //      is true, but fDeclared is false, then the ref does not refer to
      //      a declared ID.
      // -----------------------------------------------------------------------
      bool        fDeclared;
      XMLCh*      fRefName;
      bool        fUsed;
  };
  
  
  // ---------------------------------------------------------------------------
  //  XMLRefInfo: Constructors and Destructor
  // ---------------------------------------------------------------------------
  inline XMLRefInfo::XMLRefInfo(  const   XMLCh* const    refName
                                  , const bool            declared
                                  , const bool            used) :
      fDeclared(declared)
      , fRefName(XMLString::replicate(refName))
      , fUsed(used)
  {
  }
  
  inline XMLRefInfo::~XMLRefInfo()
  {
      delete [] fRefName;
  }
  
  
  // ---------------------------------------------------------------------------
  //  XMLRefInfo: Getter methods
  // ---------------------------------------------------------------------------
  inline bool XMLRefInfo::getDeclared() const
  {
      return fDeclared;
  }
  
  inline const XMLCh* XMLRefInfo::getRefName() const
  {
      return fRefName;
  }
  
  inline bool XMLRefInfo::getUsed() const
  {
      return fUsed;
  }
  
  
  // ---------------------------------------------------------------------------
  //  XMLRefInfo: Setter methods
  // ---------------------------------------------------------------------------
  inline void XMLRefInfo::setDeclared(const bool newValue)
  {
      fDeclared = newValue;
  }
  
  inline void XMLRefInfo::setUsed(const bool newValue)
  {
      fUsed = newValue;
  }
  
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/framework/XMLValidator.hpp
  
  Index: XMLValidator.hpp
  ===================================================================
  /*
   * 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/>.
   */
  
   /*
    * $Log: XMLValidator.hpp,v $
    * Revision 1.1  2002/10/23 08:55:09  lilantha
    * update with new XML parser lib
    *
    * Revision 1.2  2002/02/20 18:17:01  tng
    * [Bug 5977] Warnings on generating apiDocs.
    *
    * Revision 1.1.1.1  2002/02/01 22:21:52  peiyongz
    * sane_include
    *
    * Revision 1.17  2001/11/30 22:18:18  peiyongz
    * cleanUp function made member function
    * cleanUp object moved to file scope
    * double mutex lock removed
    *
    * Revision 1.16  2001/11/13 13:24:46  tng
    * Deprecate function XMLValidator::checkRootElement.
    *
    * Revision 1.15  2001/10/24 23:46:52  peiyongz
    * [Bug 4342] fix the leak.
    *
    * Revision 1.14  2001/06/05 16:51:17  knoaman
    * Add 'const' to getGrammar - submitted by Peter A. Volchek.
    *
    * Revision 1.13  2001/05/11 13:25:33  tng
    * Copyright update.
    *
    * Revision 1.12  2001/05/03 20:34:22  tng
    * Schema: SchemaValidator update
    *
    * Revision 1.11  2001/04/19 18:16:53  tng
    * Schema: SchemaValidator update, and use QName in Content Model
    *
    * Revision 1.10  2001/03/21 21:56:03  tng
    * Schema: Add Schema Grammar, Schema Validator, and split the DTDValidator into DTDValidator, DTDScanner, and DTDGrammar.
    *
    * Revision 1.9  2001/02/26 19:21:33  tng
    * Schema: add parameter prefix in findElem and findAttr.
    *
    * Revision 1.8  2000/12/14 18:49:58  tng
    * Fix API document generation warning: "Warning: end of member group without matching begin"
    *
    * Revision 1.7  2000/08/09 22:09:09  jpolast
    * added const XMLCh* getURIText()
    * allows parsers to use const URIs instead of appending
    * to a XMLBuffer.
    *
    * Revision 1.6  2000/03/02 19:54:25  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:00:24  abagchi
    * Swat for removing Log from API docs
    *
    * Revision 1.4  2000/02/15 23:59:07  roddey
    * More updated documentation of Framework classes.
    *
    * Revision 1.3  2000/02/15 01:21:31  roddey
    * Some initial documentation improvements. More to come...
    *
    * Revision 1.2  2000/02/06 07:47:49  rahulj
    * Year 2K copyright swat.
    *
    * Revision 1.1.1.1  1999/11/09 01:08:38  twl
    * Initial checkin
    *
    * Revision 1.4  1999/11/08 20:44:41  rahul
    * Swat for adding in Product name and CVS comment log variable.
    *
    */
  
  
  #if !defined(XMLVALIDATOR_HPP)
  #define XMLVALIDATOR_HPP
  
  #include <xercesc/util/XercesDefs.hpp>
  #include <xercesc/framework/XMLAttr.hpp>
  #include <xercesc/framework/XMLValidityCodes.hpp>
  #include <xercesc/framework/XMLRefInfo.hpp>
  
  class ReaderMgr;
  class XMLBuffer;
  class XMLBufferMgr;
  class XMLElementDecl;
  class XMLEntityHandler;
  class XMLErrorReporter;
  class XMLMsgLoader;
  class XMLScanner;
  class Grammar;
  
  
  /**
   *  This abstract class provides the interface for all validators. This is
   *  the simple amount of API that all validators must honor, in order for
   *  the scanner to use them to do validation. All validators will actually
   *  contain much more functionality than is accessible via this common API,
   *  but that functionality requires that you know what type of validator you
   *  are dealing with.
   *
   *  Basically, at this level, the primary concern is to be able to query
   *  core information about elements and attributes. Adding decls to the
   *  validator requires that you go through the derived interface because they
   *  all have their own decl types. At this level, we can return information
   *  via the base decl classes, from which each validator derives its own
   *  decl classes.
   */
  class XMLPARSER_EXPORT XMLValidator
  {
  public:
      // -----------------------------------------------------------------------
      //  Constructors are hidden, just the virtual destructor is exposed
      // -----------------------------------------------------------------------
  
      /** @name Destructor */
      //@{
  
      /**
       *  The derived class should clean up its allocated data, then this class
       *  will do the same for data allocated at this level.
       */
      virtual ~XMLValidator()
      {
      }
      //@}
  
  
      // -----------------------------------------------------------------------
      //  The virtual validator interface
      // -----------------------------------------------------------------------
  
      /** @name Virtual validator interface */
      //@{
  
      /**
        * The derived class should look up its declaration of the passed element
        * from its element pool. It should then use the content model description
        * contained in that element declaration to validate that the passed list
        * of child elements are valid for that content model. The count can be
        * zero, indicating no child elements.
        *
        * Note that whitespace and text content are not validated here. Those are
        * handled by the scanner. So only element ids are provided here.
        *
        * @param  elemDecl    The element whose content is to be checked.
        *
        * @param  children    An array of element QName which represent the elements
        *                     found within the parent element, i.e. the content
        *                     to be validated.
        *
        * @param  childCount  The number of elements in the childIds array. It can
        *                     be zero if the element had none.
        */
      virtual int checkContent
      (
          XMLElementDecl* const   elemDecl
          , QName** const         children
          , const unsigned int    childCount
      ) = 0;
  
      /**
        * The derived class should fault in the passed XMLAttr value. It should
        * use the passeed attribute definition (which is passed via the base
        * type so it must often be downcast to the appropriate type for the
        * derived validator class), to fill in the passed attribute. This is done
        * as a performance enhancement since the derived class has more direct
        * access to the information.
        */
      virtual void faultInAttr
      (
                  XMLAttr&    toFill
          , const XMLAttDef&  attDef
      )   const = 0;
  
      /**
        * This method is called by the scanner after a Grammar is scanned.
        */
      virtual void preContentValidation(bool reuseGrammar) = 0;
  
      /**
        * This method is called by the scanner after the parse has completed. It
        * gives the validator a chance to check certain things that can only be
        * checked after the whole document has been parsed, such as referential
        * integrity of ID/IDREF pairs and so forth. The validator should just
        * issue errors for any problems it finds.
        */
      virtual void postParseValidation() = 0;
  
      /**
        * This method is called by the scanner before a new document is about
        * to start. It gives the validator a change to reset itself in preperation
        * for another validation pass.
        */
      virtual void reset() = 0;
  
      /**
        * The derived class should return a boolean that indicates whether it
        * requires namespace processing or not. Some do and some allow it to be
        * optional. This flag is used to control whether the client code's
        * requests to disable namespace processing can be honored or not.
        */
      virtual bool requiresNamespaces() const = 0;
  
      /**
        * The derived class should apply any rules to the passed attribute value
        * that are above and beyond those defined by XML 1.0. The scanner itself
        * will impose XML 1.0 rules, based on the type of the attribute. This
        * will generally be used to check things such as range checks and other
        * datatype related validation.
        *
        * If the value breaks any rules as defined by the derived class, it
        * should just issue errors as usual.
        */
      virtual void validateAttrValue
      (
          const   XMLAttDef*                  attDef
          , const XMLCh* const                attrValue
      ) = 0;
  
      /**
        * The derived class should apply any rules to the passed element decl
        * that are above and beyond those defined by XML 1.0.
        *
        * If the value breaks any rules as defined by the derived class, it
        * should just issue errors as usual.
        */
      virtual void validateElement
      (
          const   XMLElementDecl*             elemDef
      ) = 0;
  
      /**
        * Retrieve the Grammar used
        */
      virtual Grammar* getGrammar() const =0;
  
      /**
        * Set the Grammar
        */
      virtual void setGrammar(Grammar* aGrammar) =0;
  
  
      //@}
  
      // -----------------------------------------------------------------------
      //  Virtual DTD handler interface.
      // -----------------------------------------------------------------------
  
      /** @name Virtual DTD handler interface */
      //@{
  
      /**
        * This method allows the scanner to ask the validator if it handles
        * DTDs or not.
        */
      virtual bool handlesDTD() const = 0;
  
      // -----------------------------------------------------------------------
      //  Virtual Schema handler interface.
      // -----------------------------------------------------------------------
  
      /** @name Virtual Schema handler interface */
  
      /**
        * This method allows the scanner to ask the validator if it handles
        * Schema or not.
        */
      virtual bool handlesSchema() const = 0;
  
      //@}
  
      // -----------------------------------------------------------------------
      //  Setter methods
      //
      //  setScannerInfo() is called by the scanner to tell the validator
      //  about the stuff it needs to have access to.
      // -----------------------------------------------------------------------
  
      /** @name Setter methods */
      //@{
  
      /**
        * @param  owningScanner   This is a pointer to the scanner to which the
        *                         validator belongs. The validator will often
        *                         need to query state data from the scanner.
        *
        * @param  readerMgr       This is a pointer to the reader manager that is
        *                         being used by the scanner.
        *
        * @param  bufMgr          This is the buffer manager of the scanner. This
        *                         is provided as a convenience so that the validator
        *                         doesn't have to create its own buffer manager
        *                         during the parse process.
        */
      void setScannerInfo
      (
          XMLScanner* const           owningScanner
          , ReaderMgr* const          readerMgr
          , XMLBufferMgr* const       bufMgr
      );
  
      /**
        * This method is called to set an error reporter on the validator via
        * which it will report any errors it sees during parsing or validation.
        * This is generally called by the owning scanner.
        *
        * @param  errorReporter   A pointer to the error reporter to use. This
        *                         is not adopted, just referenced so the caller
        *                         remains responsible for its cleanup, if any.
        */
      void setErrorReporter
      (
          XMLErrorReporter* const errorReporter
      );
  
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Error emitter methods
      // -----------------------------------------------------------------------
  
      /** @name Error emittor methods */
      //@{
  
      /**
       *  This call is a convenience by which validators can emit errors. Most
       *  of the grunt work of loading the text, getting the current source
       *  location, ect... is handled here.
       *
       *  If the loaded text has replacement parameters, then text strings can be
       *  passed. These will be used to replace the tokens {0}, {1}, {2}, and {3}
       *  in the order passed. So text1 will replace {0}, text2 will replace {1},
       *  and so forth.
       *
       *  textX   Up to four replacement parameters. They can be provided
       *          as either XMLCh strings, or local code page strings which
       *          will be transcoded internally.
       *
       *  @param toEmit   The error code to emit. it must be one of the defined
       *                  validator error codes.
       *
       */
      void emitError(const XMLValid::Codes toEmit);
      void emitError
      (
          const   XMLValid::Codes toEmit
          , const XMLCh* const    text1
          , const XMLCh* const    text2 = 0
          , const XMLCh* const    text3 = 0
          , const XMLCh* const    text4 = 0
      );
      void emitError
      (
          const   XMLValid::Codes toEmit
          , const char* const     text1
          , const char* const     text2 = 0
          , const char* const     text3 = 0
          , const char* const     text4 = 0
      );
  
      //@}
  
      // -----------------------------------------------------------------------
      //  Deprecated XMLValidator interface
      // -----------------------------------------------------------------------
      /**
        *
        * DEPRECATED.
        * For those validators that contrain the possible root elements of a
        * document to only particular elements, they should use this call to
        * validate that the passed root element id is a legal root element.
        */
      bool checkRootElement
      (
          const   unsigned int    elemId
      ) { return true;};
  
      // -----------------------------------------------------------------------
      //  Notification that lazy data has been deleted
      // -----------------------------------------------------------------------
  	static void reinitMsgMutex();
  
  	static void reinitMsgLoader();
  
  protected :
      // -----------------------------------------------------------------------
      //  Hidden constructors
      // -----------------------------------------------------------------------
      XMLValidator
      (
          XMLErrorReporter* const errReporter = 0
      );
  
  
      // -----------------------------------------------------------------------
      //  Protected getters
      // -----------------------------------------------------------------------
      const XMLBufferMgr* getBufMgr() const;
      XMLBufferMgr* getBufMgr();
      const ReaderMgr* getReaderMgr() const;
      ReaderMgr* getReaderMgr();
      const XMLScanner* getScanner() const;
      XMLScanner* getScanner();
  
  
  private :
      // -----------------------------------------------------------------------
      //  Unimplemented Constructors and Operators
      // -----------------------------------------------------------------------
      XMLValidator(const XMLValidator&);
      void operator=(const XMLValidator&);
  
  
      // -----------------------------------------------------------------------
      //  Private data members
      //
      //  fErrorReporter
      //      The error reporter we are to use, if any.
      //
      // -----------------------------------------------------------------------
      XMLBufferMgr*       fBufMgr;
      XMLErrorReporter*   fErrorReporter;
      ReaderMgr*          fReaderMgr;
      XMLScanner*         fScanner;
  
  };
  
  
  // -----------------------------------------------------------------------
  //  Setter methods
  // -----------------------------------------------------------------------
  inline void
  XMLValidator::setScannerInfo(XMLScanner* const      owningScanner
                              , ReaderMgr* const      readerMgr
                              , XMLBufferMgr* const   bufMgr)
  {
      // We don't own any of these, we just reference them
      fScanner = owningScanner;
      fReaderMgr = readerMgr;
      fBufMgr = bufMgr;
  }
  
  inline void
  XMLValidator::setErrorReporter(XMLErrorReporter* const errorReporter)
  {
      fErrorReporter = errorReporter;
  }
  
  
  // ---------------------------------------------------------------------------
  //  XMLValidator: Protected getter
  // ---------------------------------------------------------------------------
  inline const XMLBufferMgr* XMLValidator::getBufMgr() const
  {
      return fBufMgr;
  }
  
  inline XMLBufferMgr* XMLValidator::getBufMgr()
  {
      return fBufMgr;
  }
  
  inline const ReaderMgr* XMLValidator::getReaderMgr() const
  {
      return fReaderMgr;
  }
  
  inline ReaderMgr* XMLValidator::getReaderMgr()
  {
      return fReaderMgr;
  }
  
  inline const XMLScanner* XMLValidator::getScanner() const
  {
      return fScanner;
  }
  
  inline XMLScanner* XMLValidator::getScanner()
  {
      return fScanner;
  }
  
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/framework/XMLValidityCodes.hpp
  
  Index: XMLValidityCodes.hpp
  ===================================================================
  // This file is generated, don't edit it!!
  
  #if !defined(ERRHEADER_XMLValid)
  #define ERRHEADER_XMLValid
  
  #include <xercesc/framework/XMLErrorReporter.hpp>
  
  class XMLValid
  {
  public :
      enum Codes
      {
          NoError                            = 0
        , E_LowBounds                        = 1
        , ElementNotDefined                  = 2
        , AttNotDefined                      = 3
        , NotationNotDeclared                = 4
        , RootElemNotLikeDocType             = 5
        , RequiredAttrNotProvided            = 6
        , ElementNotValidForContent          = 7
        , BadIDAttrDefType                   = 8
        , InvalidEmptyAttValue               = 9
        , ElementAlreadyExists               = 10
        , MultipleIdAttrs                    = 11
        , ReusedIDValue                      = 12
        , IDNotDeclared                      = 13
        , UnknownNotRefAttr                  = 14
        , UndeclaredElemInDocType            = 15
        , EmptyNotValidForContent            = 16
        , AttNotDefinedForElement            = 17
        , BadEntityRefAttr                   = 18
        , UnknownEntityRefAttr               = 19
        , NotEnoughElemsForCM                = 20
        , NoCharDataInCM                     = 21
        , DoesNotMatchEnumList               = 22
        , AttrValNotName                     = 23
        , NoMultipleValues                   = 24
        , NotSameAsFixedValue                = 25
        , RepElemInMixed                     = 26
        , NoValidatorFor                     = 27
        , IncorrectDatatype                  = 28
        , NotADatatype                       = 29
        , TextOnlyContentWithType            = 30
        , FeatureUnsupported                 = 31
        , NestedOnlyInElemOnly               = 32
        , EltRefOnlyInMixedElemOnly          = 33
        , OnlyInEltContent                   = 34
        , OrderIsAll                         = 35
        , DatatypeWithType                   = 36
        , DatatypeQualUnsupported            = 37
        , GroupContentRestricted             = 38
        , UnknownBaseDatatype                = 39
        , OneOfTypeRefArchRef                = 40
        , NoContentForRef                    = 41
        , IncorrectDefaultType               = 42
        , IllegalAttContent                  = 43
        , ValueNotInteger                    = 44
        , DatatypeError                      = 45
        , SchemaError                        = 46
        , TypeAlreadySet                     = 47
        , ProhibitedAttributePresent         = 48
        , IllegalXMLSpace                    = 49
        , NotBoolean                         = 50
        , NotDecimal                         = 51
        , FacetsInconsistent                 = 52
        , IllegalFacetValue                  = 53
        , IllegalDecimalFacet                = 54
        , UnknownFacet                       = 55
        , InvalidEnumValue                   = 56
        , OutOfBounds                        = 57
        , NotAnEnumValue                     = 58
        , NotInteger                         = 59
        , IllegalIntegerFacet                = 60
        , NotReal                            = 61
        , IllegalRealFacet                   = 62
        , ScaleLargerThanPrecision           = 63
        , PrecisionExceeded                  = 64
        , ScaleExceeded                      = 65
        , NotFloat                           = 66
        , SchemaRootError                    = 67
        , WrongTargetNamespace               = 68
        , SimpleTypeHasChild                 = 69
        , NoDatatypeValidatorForSimpleType   = 70
        , GrammarNotFound                    = 71
        , DisplayErrorMessage                = 72
        , NillNotAllowed                     = 73
        , NilAttrNotEmpty                    = 74
        , FixedDifferentFromActual           = 75
        , NoDatatypeValidatorForAttribute    = 76
        , GenericError                       = 77
        , ElementNotQualified                = 78
        , ElementNotUnQualified              = 79
        , IllegalRefInStandalone             = 80
        , NoDefAttForStandalone              = 81
        , NoAttNormForStandalone             = 82
        , NoWSForStandalone                  = 83
        , VC_EntityNotFound                  = 84
        , PartialMarkupInPE                  = 85
        , DatatypeValidationFailure          = 86
        , UniqueParticleAttributionFail      = 87
        , NoAbstractInXsiType                = 88
        , NoDirectUseAbstractElement         = 89
        , NoUseAbstractType                  = 90
        , BadXsiType                         = 91
        , NonDerivedXsiType                  = 92
        , NoSubforBlock                      = 93
        , AttributeNotQualified              = 94
        , AttributeNotUnQualified            = 95
        , IC_FieldMultipleMatch              = 96
        , IC_UnknownField                    = 97
        , IC_AbsentKeyValue                  = 98
        , IC_UniqueNotEnoughValues           = 99
        , IC_KeyNotEnoughValues              = 100
        , IC_KeyRefNotEnoughValues           = 101
        , IC_KeyMatchesNillable              = 102
        , IC_DuplicateUnique                 = 103
        , IC_DuplicateKey                    = 104
        , IC_KeyRefOutOfScope                = 105
        , IC_KeyNotFound                     = 106
        , E_HighBounds                       = 107
        , W_LowBounds                        = 108
        , W_HighBounds                       = 109
        , F_LowBounds                        = 110
        , F_HighBounds                       = 111
      };
  
      static bool isFatal(const XMLValid::Codes toCheck)
      {
          return ((toCheck >= F_LowBounds) && (toCheck <= F_HighBounds));
      }
  
      static bool isWarning(const XMLValid::Codes toCheck)
      {
          return ((toCheck >= W_LowBounds) && (toCheck <= W_HighBounds));
      }
  
      static bool isError(const XMLValid::Codes toCheck)
      {
          return ((toCheck >= E_LowBounds) && (toCheck <= E_HighBounds));
      }
  
      static XMLErrorReporter::ErrTypes errorType(const XMLValid::Codes toCheck)
      {
         if ((toCheck >= W_LowBounds) && (toCheck <= W_HighBounds))
             return XMLErrorReporter::ErrType_Warning;
         else if ((toCheck >= F_LowBounds) && (toCheck <= F_HighBounds))
              return XMLErrorReporter::ErrType_Fatal;
         else if ((toCheck >= E_LowBounds) && (toCheck <= E_HighBounds))
              return XMLErrorReporter::ErrType_Error;
         return XMLErrorReporter::ErrTypes_Unknown;
      }
  };
  #endif
  
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/idom/IDCasts.hpp
  
  Index: IDCasts.hpp
  ===================================================================
  #ifndef IDCasts_HEADER_GUARD_
  #define IDCasts_HEADER_GUARD_
  
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 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) 2001, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Id: IDCasts.hpp,v 1.1 2002/10/23 08:55:10 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 *.
  //
  
  
  //
  //  Define inline casting functions to convert from
  //    (IDOM_Node *) to IDParentNode or IDChildNode *.
  //
  //  This requires knowledge of the structure of the fields of
  //   for all node types.  There are three categories -
  //
  //  Nodetypes that can have children and can be a child themselves.
  //    e.g.  Elements
  //
  //       Object
  //           IDNodeImpl     fNode;
  //           IDParentNode   fParent;
  //           IDChildNode    fChild;
  //             ...            // other fields, depending on node type.
  //
  //  Nodetypes that can not have children, e.g. TEXT
  //
  //       Object
  //           IDNodeImpl     fNode;
  //           IDChildNode    fChild;
  //              ...            // other fields, depending on node type
  //
  //  Nodetypes that can not be a child of other nodes, but that can
  //  have children (are a parent)  e.g. ATTR
  //       Object
  //           IDNodeImpl     fNode;
  //           IDParentNode   fParent
  //               ...           // other fields, depending on node type
  //
  //   The casting functions make these assumptions:
  //      1.  The cast is possible.  Using code will not attempt to
  //          cast to something that does not exist, such as the child
  //          part of an ATTR
  //
  //      2.  The nodes belong to this implementation.
  //
  //    Some of the casts use the LEAFNODE flag in the common fNode part to
  //    determine whether an fParent field exists, and thus the
  //    position of the fChild part within the node.
  //
  //  These functions also cast off const.  It was either do that, or make
  //  a second overloaded set that took and returned const arguements.
  //
  
  #include "IDElementImpl.hpp"
  #include "IDTextImpl.hpp"
  
  static inline IDNodeImpl *castToNodeImpl(const IDOM_Node *p)
  {
      IDElementImpl *pE = (IDElementImpl *)p;
      return &(pE->fNode);
  }
  
  
  static inline IDParentNode *castToParentImpl(const IDOM_Node *p) {
      IDElementImpl *pE = (IDElementImpl *)p;
      return &(pE->fParent);
  }
  
  
  static inline IDChildNode *castToChildImpl(const IDOM_Node *p) {
      IDElementImpl *pE = (IDElementImpl *)p;
      if (pE->fNode.isLeafNode())  {
          IDTextImpl *pT = (IDTextImpl *)p;
          return &(pT->fChild);
      }
      return &(pE->fChild);
  }
  
  
  static inline IDOM_Node *castToNode(const IDParentNode *p ) {
      int parentOffset = (char *)&(((IDElementImpl *)0)->fParent) - (char *)0;
      char *retPtr = (char *)p - parentOffset;
      return (IDOM_Node *)retPtr;
  }
  
  static inline IDOM_Node *castToNode(const IDNodeImpl *p) {
      int nodeImplOffset = (char *)&(((IDElementImpl *)0)->fNode) - (char *)0;
      char *retPtr = (char *)p - nodeImplOffset;
      return (IDOM_Node *)retPtr;
  }
  
  
  static inline IDNodeImpl *castToNodeImpl(const IDParentNode *p)
  {
      int nodeImplOffset = (char *)&(((IDElementImpl *)0)->fNode) - (char *)0;
      int parentOffset = (char *)&(((IDElementImpl *)0)->fParent) - (char *)0;
      char *retPtr = (char *)p - parentOffset + nodeImplOffset;
      return (IDNodeImpl *)retPtr;
  }
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/idom/IDChildNode.hpp
  
  Index: IDChildNode.hpp
  ===================================================================
  #ifndef IDChildNode_HEADER_GUARD_
  #define IDChildNode_HEADER_GUARD_
  
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 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) 2001, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Id: IDChildNode.hpp,v 1.1 2002/10/23 08:55:10 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 <xercesc/util/XercesDefs.hpp>
  
  
  class IDOM_Document;
  class IDOM_Node;
  
  
  class CDOM_EXPORT IDChildNode {
  
  public:
      IDOM_Node                *previousSibling;
      IDOM_Node                *nextSibling;
  
      IDChildNode();
      IDChildNode(const IDChildNode &other);
      ~IDChildNode();
  
      IDOM_Node * getNextSibling() const;
      IDOM_Node * getParentNode(const IDOM_Node *thisNode) const;
      IDOM_Node * getPreviousSibling(const IDOM_Node *thisNode) const;
  };
  
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/idom/IDDOMImplementation.hpp
  
  Index: IDDOMImplementation.hpp
  ===================================================================
  #ifndef IDDOMImplementation_HEADER_GUARD_
  #define IDDOMImplementation_HEADER_GUARD_
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 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) 2001, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Log: IDDOMImplementation.hpp,v $
   * Revision 1.1  2002/10/23 08:55:10  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:21:54  peiyongz
   * sane_include
   *
   * Revision 1.3  2001/05/18 12:37:13  tng
   * IDOM: fix typo to bypass HP aCC error message
   *
   * Revision 1.2  2001/05/11 13:25:40  tng
   * Copyright update.
   *
   * Revision 1.1.1.1  2001/04/03 00:14:21  andyh
   * IDOM
   *
   */
  
  #include <xercesc/util/XercesDefs.hpp>
  #include "IDOM_DOMImplementation.hpp"
  
  class IDDOMImplementation: public IDOM_DOMImplementation {
  private:
      IDDOMImplementation();
      IDDOMImplementation(const IDDOMImplementation & other);
      IDDOMImplementation & operator = (const IDDOMImplementation & other);
  public:
      virtual ~IDDOMImplementation();
      static IDOM_DOMImplementation   *getImplementation();
      virtual bool                         hasFeature(const  XMLCh * feature,  const  XMLCh * version);
      virtual IDOM_DocumentType           *createDocumentType(const XMLCh *qualifiedName,
                                              const XMLCh * publicId, const XMLCh *systemId);
      virtual IDOM_Document               *createDocument(const XMLCh *namespaceURI,
                                              const XMLCh *qualifiedName, IDOM_DocumentType *doctype);
      virtual IDOM_Document               *createDocument();
  };
  
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/idom/IDDeepNodeListPool.c
  
  Index: IDDeepNodeListPool.c
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001-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) 2001, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /**
   * $Log: IDDeepNodeListPool.c,v $
   * Revision 1.1  2002/10/23 08:55:10  lilantha
   * update with new XML parser lib
   *
   * Revision 1.3  2002/02/05 16:50:04  tng
   * Terminate the file IDDeepNodeListPool.c with a newline, otherwise Solaris compiler CC will give compilation error.
   *
   * Revision 1.2  2002/02/04 21:50:38  tng
   * [Bug 6114] Memory leaks on iDOM getElementsByTagName().
   *
   * Revision 1.1.1.1  2002/02/01 22:21:53  peiyongz
   * sane_include
   *
   * Revision 1.1  2001/06/04 14:55:32  tng
   * IDOM: Add IRange and IDeepNodeList Support.
   *
   */
  
  
  // ---------------------------------------------------------------------------
  //  Include
  // ---------------------------------------------------------------------------
  #if defined(XERCES_TMPLSINC)
  #include <xercesc/idom/IDDeepNodeListPool.hpp>
  #endif
  
  
  // ---------------------------------------------------------------------------
  //  IDDeepNodeListPool: Constructors and Destructor
  // ---------------------------------------------------------------------------
  template <class TVal> IDDeepNodeListPool<TVal>::IDDeepNodeListPool(
                const unsigned int modulus
              , const bool adoptElems
              , const unsigned int    initSize) :
  	 fAdoptedElems(adoptElems)
      , fBucketList(0)
      , fHashModulus(modulus)
      , fIdPtrs(0)
      , fIdPtrsCount(initSize)
      , fIdCounter(0)
  {
      initialize(modulus);
  
      // create default hasher
      fHash = new HashPtr();
  
      //
      //  Allocate the initial id pointers array. We don't have to zero them
      //  out since the fIdCounter value tells us which ones are valid. The
      //  zeroth element is never used (and represents an invalid pool id.)
      //
      if (!fIdPtrsCount)
          fIdPtrsCount = 256;
      fIdPtrs = new TVal*[fIdPtrsCount];
      fIdPtrs[0] = 0;
  }
  
  template <class TVal> IDDeepNodeListPool<TVal>::IDDeepNodeListPool(
                const unsigned int modulus
              , const bool adoptElems
              , HashBase* hash
              , const unsigned int    initSize) :
  	 fAdoptedElems(adoptElems)
      , fBucketList(0)
      , fHashModulus(modulus)
      , fIdPtrs(0)
      , fIdPtrsCount(initSize)
      , fIdCounter(0)
  {
      initialize(modulus);
      // set hasher
      fHash = hash;
  
      //
      //  Allocate the initial id pointers array. We don't have to zero them
      //  out since the fIdCounter value tells us which ones are valid. The
      //  zeroth element is never used (and represents an invalid pool id.)
      //
      if (!fIdPtrsCount)
          fIdPtrsCount = 256;
      fIdPtrs = new TVal*[fIdPtrsCount];
      fIdPtrs[0] = 0;
  }
  
  template <class TVal> IDDeepNodeListPool<TVal>::IDDeepNodeListPool(const unsigned int modulus
              , const unsigned int    initSize) :
  	 fAdoptedElems(true)
      , fBucketList(0)
      , fHashModulus(modulus)
      , fIdPtrs(0)
      , fIdPtrsCount(initSize)
      , fIdCounter(0)
  {
      initialize(modulus);
  
      // create default hasher
      fHash = new HashPtr();
  
      //
      //  Allocate the initial id pointers array. We don't have to zero them
      //  out since the fIdCounter value tells us which ones are valid. The
      //  zeroth element is never used (and represents an invalid pool id.)
      //
      if (!fIdPtrsCount)
          fIdPtrsCount = 256;
      fIdPtrs = new TVal*[fIdPtrsCount];
      fIdPtrs[0] = 0;
  }
  
  template <class TVal> void IDDeepNodeListPool<TVal>::initialize(const unsigned int modulus)
  {
  	if (modulus == 0)
          ThrowXML(IllegalArgumentException, XMLExcepts::HshTbl_ZeroModulus);
  
      // Allocate the bucket list and zero them
      fBucketList = new IDDeepNodeListPoolTableBucketElem<TVal>*[fHashModulus];
      for (unsigned int index = 0; index < fHashModulus; index++)
          fBucketList[index] = 0;
  }
  
  template <class TVal> IDDeepNodeListPool<TVal>::~IDDeepNodeListPool()
  {
      removeAll();
  
      // Then delete the bucket list & hasher & id pointers list
      delete [] fIdPtrs;
      delete [] fBucketList;
      delete fHash;
  }
  
  
  // ---------------------------------------------------------------------------
  //  IDDeepNodeListPool: Element management
  // ---------------------------------------------------------------------------
  template <class TVal> bool IDDeepNodeListPool<TVal>::isEmpty() const
  {
      // Just check the bucket list for non-empty elements
      for (unsigned int buckInd = 0; buckInd < fHashModulus; buckInd++)
      {
          if (fBucketList[buckInd] != 0)
              return false;
      }
      return true;
  }
  
  template <class TVal> bool IDDeepNodeListPool<TVal>::
  containsKey(const void* const key1, const XMLCh* const key2, const XMLCh* const key3) const
  {
      unsigned int hashVal;
      const IDDeepNodeListPoolTableBucketElem<TVal>* findIt = findBucketElem(key1, key2, key3, hashVal);
      return (findIt != 0);
  }
  
  template <class TVal> void IDDeepNodeListPool<TVal>::removeAll()
  {
      // Clean up the buckets first
      for (unsigned int buckInd = 0; buckInd < fHashModulus; buckInd++)
      {
          // Get the bucket list head for this entry
          IDDeepNodeListPoolTableBucketElem<TVal>* curElem = fBucketList[buckInd];
          IDDeepNodeListPoolTableBucketElem<TVal>* nextElem;
          while (curElem)
          {
              // Save the next element before we hose this one
              nextElem = curElem->fNext;
  
              // If we adopted the data, then delete it too
              //    (Note:  the userdata hash table instance has data type of void *.
              //    This will generate compiler warnings here on some platforms, but they
              //    can be ignored since fAdoptedElements is false.
              if (fAdoptedElems)
                  delete curElem->fData;
  
              // Then delete the current element and move forward
              delete [] curElem->fKey2;
              delete [] curElem->fKey3;
  
              delete curElem;
              curElem = nextElem;
          }
  
          // Clean out this entry
          fBucketList[buckInd] = 0;
      }
  
      // Reset the id counter
      fIdCounter = 0;
  }
  
  template <class TVal> void IDDeepNodeListPool<TVal>::cleanup()
  {
      removeAll();
  
      // Then delete the bucket list & hasher & id pointers list
      delete [] fIdPtrs;
      delete [] fBucketList;
      delete fHash;
  }
  
  
  
  // ---------------------------------------------------------------------------
  //  IDDeepNodeListPool: Getters
  // ---------------------------------------------------------------------------
  template <class TVal> TVal*
  IDDeepNodeListPool<TVal>::getByKey(const void* const key1, const XMLCh* const key2, const XMLCh* const key3)
  {
      unsigned int hashVal;
      IDDeepNodeListPoolTableBucketElem<TVal>* findIt = findBucketElem(key1, key2, key3, hashVal);
      if (!findIt)
          return 0;
      return findIt->fData;
  }
  
  template <class TVal> const TVal*
  IDDeepNodeListPool<TVal>::getByKey(const void* const key1, const XMLCh* const key2, const XMLCh* const key3) const
  {
      unsigned int hashVal;
      const IDDeepNodeListPoolTableBucketElem<TVal>* findIt = findBucketElem(key1, key2, key3, hashVal);
      if (!findIt)
          return 0;
      return findIt->fData;
  }
  
  template <class TVal> TVal*
  IDDeepNodeListPool<TVal>::getById(const unsigned int elemId)
  {
      // If its either zero or beyond our current id, its an error
      if (!elemId || (elemId > fIdCounter))
          ThrowXML(IllegalArgumentException, XMLExcepts::Pool_InvalidId);
  
      return fIdPtrs[elemId];
  }
  
  template <class TVal> const TVal*
  IDDeepNodeListPool<TVal>::getById(const unsigned int elemId) const
  {
      // If its either zero or beyond our current id, its an error
      if (!elemId || (elemId > fIdCounter))
          ThrowXML(IllegalArgumentException, XMLExcepts::Pool_InvalidId);
  
      return fIdPtrs[elemId];
  }
  
  // ---------------------------------------------------------------------------
  //  IDDeepNodeListPool: Putters
  // ---------------------------------------------------------------------------
  template <class TVal> unsigned int
  IDDeepNodeListPool<TVal>::put(void* key1, XMLCh* key2, XMLCh* key3, TVal* const valueToAdopt)
  {
      // First see if the key exists already
      unsigned int hashVal;
      IDDeepNodeListPoolTableBucketElem<TVal>* newBucket = findBucketElem(key1, key2, key3, hashVal);
  
      //
      //  If so,then update its value. If not, then we need to add it to
      //  the right bucket
      //
      if (newBucket)
      {
          if (fAdoptedElems)
              delete newBucket->fData;
  
          delete[] newBucket->fKey2;
          delete[] newBucket->fKey3;
  
          newBucket->fData = valueToAdopt;
          newBucket->fKey1 = key1;
          newBucket->fKey2 = key2;
          newBucket->fKey3 = key3;
      }
       else
      {
          newBucket = new IDDeepNodeListPoolTableBucketElem<TVal>(key1, key2, key3, valueToAdopt, fBucketList[hashVal]);
          fBucketList[hashVal] = newBucket;
      }
  
      //
      //  Give this new one the next available id and add to the pointer list.
      //  Expand the list if that is now required.
      //
      if (fIdCounter + 1 == fIdPtrsCount)
      {
          // Create a new count 1.5 times larger and allocate a new array
          unsigned int newCount = (unsigned int)(fIdPtrsCount * 1.5);
          TVal** newArray = new TVal*[newCount];
  
          // Copy over the old contents to the new array
          memcpy(newArray, fIdPtrs, fIdPtrsCount * sizeof(TVal*));
  
          // Ok, toss the old array and store the new data
          delete [] fIdPtrs;
          fIdPtrs = newArray;
          fIdPtrsCount = newCount;
      }
      const unsigned int retId = ++fIdCounter;
      fIdPtrs[retId] = valueToAdopt;
  
      // Return the id that we gave to this element
      return retId;
  }
  
  // ---------------------------------------------------------------------------
  //  IDDeepNodeListPool: Private methods
  // ---------------------------------------------------------------------------
  template <class TVal> IDDeepNodeListPoolTableBucketElem<TVal>* IDDeepNodeListPool<TVal>::
  findBucketElem(const void* const key1, const XMLCh* const key2, const XMLCh* const key3, unsigned int& hashVal)
  {
      // Hash the key
      hashVal = fHash->getHashVal(key1, fHashModulus);
      if (hashVal > fHashModulus)
          ThrowXML(RuntimeException, XMLExcepts::HshTbl_BadHashFromKey);
  
      // Search that bucket for the key
      IDDeepNodeListPoolTableBucketElem<TVal>* curElem = fBucketList[hashVal];
      while (curElem)
      {
          //key2 and key3 are XMLCh*, compareString takes null pointer vs zero len string the same
          //but we need them to be treated as different keys in this case
          if (fHash->equals(key1, curElem->fKey1) && (!XMLString::compareString(key2, curElem->fKey2)) && (!XMLString::compareString(key3, curElem->fKey3))) {
              if (!key2 || !curElem->fKey2) {
                  if (key2 || curElem->fKey2) {
                      curElem = curElem->fNext;
                      continue;
                  }
              }
              if (!key3 || !curElem->fKey3) {
                  if (key3 || curElem->fKey3) {
                      curElem = curElem->fNext;
                      continue;
                  }
              }
  
              return curElem;
          }
  
          curElem = curElem->fNext;
      }
      return 0;
  }
  
  template <class TVal> const IDDeepNodeListPoolTableBucketElem<TVal>* IDDeepNodeListPool<TVal>::
  findBucketElem(const void* const key1, const XMLCh* const key2, const XMLCh* const key3, unsigned int& hashVal) const
  {
      // Hash the key
      hashVal = fHash->getHashVal(key1, fHashModulus);
      if (hashVal > fHashModulus)
          ThrowXML(RuntimeException, XMLExcepts::HshTbl_BadHashFromKey);
  
      // Search that bucket for the key
      const IDDeepNodeListPoolTableBucketElem<TVal>* curElem = fBucketList[hashVal];
      while (curElem)
      {
          //key2 and key3 are XMLCh*, compareString takes null pointer vs zero len string the same
          //but we need them to be treated as different keys in this case
          if (fHash->equals(key1, curElem->fKey1) && (!XMLString::compareString(key2, curElem->fKey2)) && (!XMLString::compareString(key3, curElem->fKey3))) {
              if (!key2 || !curElem->fKey2) {
                  if (key2 || curElem->fKey2) {
                      curElem = curElem->fNext;
                      continue;
                  }
              }
              if (!key3 || !curElem->fKey3) {
                  if (key3 || curElem->fKey3) {
                      curElem = curElem->fNext;
                      continue;
                  }
              }
              return curElem;
          }
  
          curElem = curElem->fNext;
      }
      return 0;
  }
  
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/idom/IDDeepNodeListPool.hpp
  
  Index: IDDeepNodeListPool.hpp
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001-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) 2001, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Log: IDDeepNodeListPool.hpp,v $
   * Revision 1.1  2002/10/23 08:55:10  lilantha
   * update with new XML parser lib
   *
   * Revision 1.2  2002/02/04 21:50:38  tng
   * [Bug 6114] Memory leaks on iDOM getElementsByTagName().
   *
   * Revision 1.1.1.1  2002/02/01 22:21:53  peiyongz
   * sane_include
   *
   * Revision 1.1  2001/06/04 14:55:32  tng
   * IDOM: Add IRange and IDeepNodeList Support.
   *
   */
  
  
  #if !defined(IDDEEPNODELISTPOOL_HPP)
  #define IDDEEPNODELISTPOOL_HPP
  
  
  #include <xercesc/util/XercesDefs.hpp>
  #include <xercesc/util/KeyValuePair.hpp>
  #include <xercesc/util/HashBase.hpp>
  #include <xercesc/util/IllegalArgumentException.hpp>
  #include <xercesc/util/NoSuchElementException.hpp>
  #include <xercesc/util/RuntimeException.hpp>
  #include <xercesc/util/XMLExceptMsgs.hpp>
  #include <xercesc/util/XMLEnumerator.hpp>
  #include <xercesc/util/XMLString.hpp>
  #include <xercesc/util/HashBase.hpp>
  #include <xercesc/util/HashXMLCh.hpp>
  #include <xercesc/util/HashPtr.hpp>
  
  // This hash table is modified from RefHash3KeysIdPool with first key as object ptr (IDOM_Node),
  // second and third keys are both XMLCh* string
  
  template <class TVal> struct IDDeepNodeListPoolTableBucketElem;
  
  
  //
  //  This should really be a nested class, but some of the compilers we
  //  have to support cannot deal with that!
  //
  template <class TVal> struct IDDeepNodeListPoolTableBucketElem
  {
      IDDeepNodeListPoolTableBucketElem(
                void* key1
                , XMLCh* key2
                , XMLCh* key3
                , TVal* const value
                , IDDeepNodeListPoolTableBucketElem<TVal>* next) :
  		fData(value)
      , fNext(next)
      , fKey1(key1)
      , fKey2(0)
      , fKey3(0)
      {
          if (key2)
              fKey2 = XMLString::replicate(key2);
  
          if (key3)
              fKey3 = XMLString::replicate(key3);
      }
  
      TVal*  fData;
      IDDeepNodeListPoolTableBucketElem<TVal>*   fNext;
      void*  fKey1;
      XMLCh* fKey2;
      XMLCh* fKey3;
  };
  
  
  template <class TVal> class IDDeepNodeListPool
  {
  public:
      // -----------------------------------------------------------------------
      //  Constructors and Destructor
      // -----------------------------------------------------------------------
      // backwards compatability - default hasher is HashXMLCh
      IDDeepNodeListPool
      (
          const unsigned int modulus
        , const unsigned int    initSize = 128
      );
  
      // backwards compatability - default hasher is HashXMLCh
      IDDeepNodeListPool
      (
          const unsigned int modulus
        , const bool adoptElems
        , const unsigned int initSize = 128
      );
  
      // if a hash function is passed in, it will be deleted when the hashtable is deleted.
      // use a new instance of the hasher class for each hashtable, otherwise one hashtable
      // may delete the hasher of a different hashtable if both use the same hasher.
      IDDeepNodeListPool
      (
           const unsigned int modulus
         , const bool adoptElems, HashBase* hash
         , const unsigned int initSize = 128
      );
  
      ~IDDeepNodeListPool();
  
      // -----------------------------------------------------------------------
      //  Element management
      // -----------------------------------------------------------------------
      bool isEmpty() const;
      bool containsKey(const void* const key1, const XMLCh* const key2, const XMLCh* const key3) const;
      void removeAll();
      void cleanup();
  
  
      // -----------------------------------------------------------------------
      //  Getters
      // -----------------------------------------------------------------------
      TVal* getByKey(const void* const key1, const XMLCh* const key2, const XMLCh* const key3);
      const TVal* getByKey(const void* const key1, const XMLCh* const key2, const XMLCh* const key3) const;
  
      TVal* getById(const unsigned elemId);
      const TVal* getById(const unsigned elemId) const;
  
      // -----------------------------------------------------------------------
      //  Putters
      // -----------------------------------------------------------------------
  	unsigned int put(void* key1, XMLCh* key2, XMLCh* key3, TVal* const valueToAdopt);
  
  private:
  
      // -----------------------------------------------------------------------
      //  Private methods
      // -----------------------------------------------------------------------
      IDDeepNodeListPoolTableBucketElem<TVal>* findBucketElem(const void* const key1, const XMLCh* const key2, const XMLCh* const key3, unsigned int& hashVal);
      const IDDeepNodeListPoolTableBucketElem<TVal>* findBucketElem(const void* const key1, const XMLCh* const key2, const XMLCh* const key3, unsigned int& hashVal) const;
      void initialize(const unsigned int modulus);
  
  
      // -----------------------------------------------------------------------
      //  Data members
      //
      //  fAdoptedElems
      //      Indicates whether the values added are adopted or just referenced.
      //      If adopted, then they are deleted when they are removed from the
      //      hash table.
      //
      //  fBucketList
      //      This is the array that contains the heads of all of the list
      //      buckets, one for each possible hash value.
      //
      //  fHashModulus
      //      The modulus used for this hash table, to hash the keys. This is
      //      also the number of elements in the bucket list.
      //
      //  fHash
      //      The hasher for the key1 data type.
      //
      //  fIdPtrs
      //  fIdPtrsCount
      //      This is the array of pointers to the bucket elements in order of
      //      their assigned ids. So taking id N and referencing this array
      //      gives you the element with that id. The count field indicates
      //      the current size of this list. When fIdCounter+1 reaches this
      //      value the list must be expanded.
      //
      //  fIdCounter
      //      This is used to give out unique ids to added elements. It starts
      //      at zero (which means empty), and is bumped up for each newly added
      //      element. So the first element is 1, the next is 2, etc... This
      //      means that this value is set to the top index of the fIdPtrs array.
      // -----------------------------------------------------------------------
      bool                                fAdoptedElems;
      IDDeepNodeListPoolTableBucketElem<TVal>** fBucketList;
      unsigned int                        fHashModulus;
      HashBase*                       fHash;
      TVal**                          fIdPtrs;
      unsigned int                    fIdPtrsCount;
      unsigned int                    fIdCounter;
  };
  #if !defined(XERCES_TMPLSINC)
  #include <xercesc/idom/IDDeepNodeListPool.c>
  #endif
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/idom/IDNodeIDMap.hpp
  
  Index: IDNodeIDMap.hpp
  ===================================================================
  #ifndef IDNodeIDMap_HEADER_GUARD_
  #define IDNodeIDMap_HEADER_GUARD_
  
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 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) 2001, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Id: IDNodeIDMap.hpp,v 1.1 2002/10/23 08:55:10 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 *.
  //
  
  
  
  
  //
  //  Class IDNodeIDMap 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 IDOM_Attr;
  class IDOM_Document;
  
  
  class IDNodeIDMap {
  public:
  
      IDNodeIDMap(int initialSize, IDOM_Document *doc);    // Create a new hash table, sized to hold "initialSize"
                                       //  Entries.  It will automatically grow if need be.
  
      virtual ~IDNodeIDMap();
  
  private:
      IDNodeIDMap(const IDNodeIDMap &other);   // No copy, assignement, comparison.
      IDNodeIDMap &operator = (const IDNodeIDMap &other);
      bool operator == (const IDNodeIDMap &other);
  
  public:
      void  add(IDOM_Attr *attr);       // Add the specified attribute to the table.
      void  remove(IDOM_Attr *other);   // Remove the specified attribute.
                                             //   Does nothing if the node is not in the table.
      IDOM_Attr *find(const XMLCh *ID);   // Find the attribute node in the table with this ID
  
  private:
      void growTable();
  
  private:
      IDOM_Attr      **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.
      IDOM_Document *fDoc;                    // The owning document.
  
  
  };
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/idom/IDNodeVector.hpp
  
  Index: IDNodeVector.hpp
  ===================================================================
  #ifndef IDNodeVector_HEADER_GUARD_
  #define IDNodeVector_HEADER_GUARD_
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 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) 2001, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Log: IDNodeVector.hpp,v $
   * Revision 1.1  2002/10/23 08:55:10  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:21:55  peiyongz
   * sane_include
   *
   * Revision 1.2  2001/05/11 13:25:46  tng
   * Copyright update.
   *
   * Revision 1.1.1.1  2001/04/03 00:14:26  andyh
   * IDOM
   *
   */
  
  //
  //  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 IDOM_Node;
  class IDOM_Document;
  
  
  class  IDNodeVector {
  private:
      IDOM_Node        **data;
      unsigned int    allocatedSize;
      unsigned int    nextFreeSlot;
      void            init(IDOM_Document *doc, unsigned int size);
      void            checkSpace();
  
  public:
      IDNodeVector(IDOM_Document *doc);
      IDNodeVector(IDOM_Document *doc, unsigned int size);
      ~IDNodeVector();
  
      unsigned int    size();
      IDOM_Node        *elementAt(unsigned int index);
      IDOM_Node        *lastElement();
      void            addElement(IDOM_Node *);
      void            insertElementAt(IDOM_Node *, unsigned int index);
      void            setElementAt(IDOM_Node *val, unsigned int index);
      void            removeElementAt(unsigned int index);
      void            reset();
  };
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/idom/IDOM.hpp
  
  Index: IDOM.hpp
  ===================================================================
  #ifndef IDOM_HEADER_GUARD_HPP
  #define IDOM_HEADER_GUARD_HPP
  
  
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 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) 2001, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Log: IDOM.hpp,v $
   * Revision 1.1  2002/10/23 08:55:10  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:21:55  peiyongz
   * sane_include
   *
   * Revision 1.4  2001/06/08 21:23:02  tng
   * IDOM: Remove the non-standard extension where XML Decl as a node
   *
   * Revision 1.3  2001/06/04 20:11:53  tng
   * IDOM: Complete IDNodeIterator, IDTreeWalker, IDNodeFilter.
   *
   * Revision 1.2  2001/05/11 13:25:48  tng
   * Copyright update.
   *
   * Revision 1.1.1.1  2001/04/03 00:14:26  andyh
   * IDOM
   *
   */
  
  //
  //  This is the primary header file for inclusion in application
  //  programs using the C++ XML Document Object Model API.
  //
  
  #include <xercesc/idom/IDOM_Attr.hpp>
  #include <xercesc/idom/IDOM_CDATASection.hpp>
  #include <xercesc/idom/IDOM_CharacterData.hpp>
  #include <xercesc/idom/IDOM_Comment.hpp>
  #include <xercesc/idom/IDOM_Document.hpp>
  #include <xercesc/idom/IDOM_DocumentFragment.hpp>
  #include <xercesc/idom/IDOM_DocumentType.hpp>
  #include <xercesc/idom/IDOM_DOMException.hpp>
  #include <xercesc/idom/IDOM_DOMImplementation.hpp>
  #include <xercesc/idom/IDOM_Element.hpp>
  #include <xercesc/idom/IDOM_Entity.hpp>
  #include <xercesc/idom/IDOM_EntityReference.hpp>
  #include <xercesc/idom/IDOM_NamedNodeMap.hpp>
  #include <xercesc/idom/IDOM_Node.hpp>
  #include <xercesc/idom/IDOM_NodeFilter.hpp>
  #include <xercesc/idom/IDOM_NodeIterator.hpp>
  #include <xercesc/idom/IDOM_NodeList.hpp>
  #include <xercesc/idom/IDOM_Notation.hpp>
  #include <xercesc/idom/IDOM_ProcessingInstruction.hpp>
  #include <xercesc/idom/IDOM_Range.hpp>
  #include <xercesc/idom/IDOM_RangeException.hpp>
  #include <xercesc/idom/IDOM_Text.hpp>
  #include <xercesc/idom/IDOM_TreeWalker.hpp>
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/idom/IDOM_Attr.hpp
  
  Index: IDOM_Attr.hpp
  ===================================================================
  #ifndef IDOM_Attr_HEADER_GUARD_
  #define IDOM_Attr_HEADER_GUARD_
  
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001-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) 2001, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Log: IDOM_Attr.hpp,v $
   * Revision 1.1  2002/10/23 08:55:10  lilantha
   * update with new XML parser lib
   *
   * Revision 1.2  2002/02/04 21:11:55  tng
   * Remove the phrase "Experimental".
   *
   * Revision 1.1.1.1  2002/02/01 22:21:55  peiyongz
   * sane_include
   *
   * Revision 1.2  2001/05/11 13:25:48  tng
   * Copyright update.
   *
   * Revision 1.1.1.1  2001/04/03 00:14:27  andyh
   * IDOM
   *
   */
  
  
  #include <xercesc/util/XercesDefs.hpp>
  #include "IDOM_Node.hpp"
  
  class IDOM_Element;
  
  
  /**
  * The <code>IDOM_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>IDOM_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>IDOM_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 IDOM_Attr: public IDOM_Node {
  
  protected:
      IDOM_Attr() {};
      IDOM_Attr(const IDOM_Attr &other) {};
      IDOM_Attr & operator = (const IDOM_Attr &other) {return *this;};
  
  
  public:
    /** @name Destructor */
    //@{
  	
    /**
      * Destructor.  The object being destroyed is a reference to the Attribute
      * "node", not the underlying attribute itself.
      *
      */
      virtual ~IDOM_Attr() {};
  	//@}
  
    /** @name Getter functions */
    //@{
      /**
      * Returns the name of this attribute.
      */
      virtual const XMLCh *       getName() const = 0;
  
      /**
      *
      * 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.
      */
      virtual bool            getSpecified() const = 0;
  
      /**
  	* 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.
      */
      virtual const XMLCh *       getValue() const = 0;
  
  	//@}
    /** @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
      */
      virtual void            setValue(const XMLCh *value) = 0;
  	//@}
  
      /** @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.
       *
       */
      virtual IDOM_Element     *getOwnerElement() const = 0;
      //@}
  
  };
  
  #endif
  
  
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/idom/IDOM_CDATASection.hpp
  
  Index: IDOM_CDATASection.hpp
  ===================================================================
  #ifndef IDOM_CDataSection_HEADER_GUARD_
  #define IDOM_CDataSection_HEADER_GUARD_
  
  
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 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) 2001, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Log: IDOM_CDATASection.hpp,v $
   * Revision 1.1  2002/10/23 08:55:10  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:21:55  peiyongz
   * sane_include
   *
   * Revision 1.2  2001/05/11 13:25:49  tng
   * Copyright update.
   *
   * Revision 1.1.1.1  2001/04/03 00:14:27  andyh
   * IDOM
   *
   */
  
  #include <xercesc/util/XercesDefs.hpp>
  #include "IDOM_Text.hpp"
  
  
  /**
   * <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>IDOM_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 IDOM_CDATASection: public IDOM_Text {
  protected:
      IDOM_CDATASection() {};
      IDOM_CDATASection(const IDOM_CDATASection &other) {};
      IDOM_CDATASection & operator = (const IDOM_CDATASection &other) {return *this;};
  
  
  public:
  
      virtual ~IDOM_CDATASection() {};
  
  };
  #endif
  
  
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/idom/IDOM_CharacterData.hpp
  
  Index: IDOM_CharacterData.hpp
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 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) 2001, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Log: IDOM_CharacterData.hpp,v $
   * Revision 1.1  2002/10/23 08:55:10  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:21:55  peiyongz
   * sane_include
   *
   * Revision 1.3  2001/06/04 20:44:14  tng
   * IDOM: Comment should say XMLCh instead of DOMString
   *
   * Revision 1.2  2001/05/11 13:25:49  tng
   * Copyright update.
   *
   * Revision 1.1.1.1  2001/04/03 00:14:27  andyh
   * IDOM
   *
   */
  
  #ifndef IDOM_CharacterData_HEADER_GUARD_
  #define IDOM_CharacterData_HEADER_GUARD_
  
  #include <xercesc/util/XercesDefs.hpp>
  #include <xercesc/idom/IDOM_Node.hpp>
  
  
  /**
   * The <code>IDOM_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 IDOM_CharacterData: public IDOM_Node {
  
  protected:
      IDOM_CharacterData() {};
      IDOM_CharacterData(const IDOM_CharacterData &other) {};
      IDOM_CharacterData & operator = (const IDOM_CharacterData &other) {return *this;};
  
  public:
      /** @name Destructor. */
      //@{
  	 /**
  	  * Destructor for IDOM_CharacterData.  The object being destroyed
        * is the reference to the Character Data node, not the character
        * data itself.
  	  */
      virtual ~IDOM_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>XMLCh* String</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.
     */
    virtual const XMLCh *     getData() const = 0;
    /**
     * 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.
     */
    virtual unsigned int       getLength() const = 0;
    /**
     * 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.
     */
    virtual const XMLCh *     substringData(unsigned int offset,
                                     unsigned int count) const = 0;
      //@}
      /** @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>XMLCh* String</code> specified.
     * @param arg The <code>XMLCh* String</code> to append.
     * @exception DOMException
     *   NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
     */
    virtual void               appendData(const XMLCh *arg) = 0;
    /**
     * Insert a string at the specified character offset.
     *
     * @param offset The character offset at which to insert.
     * @param arg The <code>XMLCh* String</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.
     */
    virtual void               insertData(unsigned int offset, const  XMLCh *arg) = 0;
    /**
     * 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.
     */
    virtual void               deleteData(unsigned int offset,
                                  unsigned int count) = 0;
    /**
     * 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>XMLCh* String</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.
     */
    virtual void               replaceData(unsigned int offset,
                                   unsigned int count,
                                   const XMLCh *arg) = 0;
  
    /**
     * Sets the character data of the node that implements this interface.
     *
     * @param data The <code>XMLCh* String</code> to set.
     */
    virtual void               setData(const XMLCh *data) = 0;
    //@}
  
  };
  
  #endif
  
  
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/idom/IDOM_Comment.hpp
  
  Index: IDOM_Comment.hpp
  ===================================================================
  #ifndef IDOM_Comment_HEADER_GUARD_
  #define IDOM_Comment_HEADER_GUARD_
  
  
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 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) 2001, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Log: IDOM_Comment.hpp,v $
   * Revision 1.1  2002/10/23 08:55:10  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:21:55  peiyongz
   * sane_include
   *
   * Revision 1.2  2001/05/11 13:25:49  tng
   * Copyright update.
   *
   * Revision 1.1.1.1  2001/04/03 00:14:27  andyh
   * IDOM
   *
   */
  
  #include <xercesc/util/XercesDefs.hpp>
  #include "IDOM_CharacterData.hpp"
  
  
  /**
   * Class to refer to XML comment nodes in the DOM.
   *
   * <P>The string value contains all of the characters between
   * the starting '<code>&lt;!--</code>' and ending '<code>--&gt;</code>'.
   */
  class CDOM_EXPORT IDOM_Comment: public IDOM_CharacterData {
  
  protected:
      IDOM_Comment() {};
      IDOM_Comment(const IDOM_Comment &other) {};
      IDOM_Comment & operator = (const IDOM_Comment &other) {return *this;};
  
  public:
      virtual ~IDOM_Comment() {};
  
  };
  
  #endif
  
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/idom/IDOM_DOMException.hpp
  
  Index: IDOM_DOMException.hpp
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 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) 2001, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Log: IDOM_DOMException.hpp,v $
   * Revision 1.1  2002/10/23 08:55:10  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:21:55  peiyongz
   * sane_include
   *
   * Revision 1.2  2001/05/11 13:25:50  tng
   * Copyright update.
   *
   * Revision 1.1.1.1  2001/04/03 00:14:29  andyh
   * IDOM
   *
   */
  
  #ifndef IDOMException_HEADER_GUARD_
  #define IDOMException_HEADER_GUARD_
  
  #include <xercesc/util/XercesDefs.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 IDOM_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 IDOM_DOMException.
        *
        */
      IDOM_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
        */
      IDOM_DOMException(short code, const XMLCh *message);
  
      /**
        * Copy constructor.
        *
        * @param other The object to be copied.
        */
      IDOM_DOMException(const IDOM_DOMException &other);
  
      //@}
      /** @name Destructor. */
      //@{
  	 /**
  	  * Destructor for IDOM_DOMException.  Applications are responsible
        * for deleting DOM_Exception objects that they catch after they
        * have completed their exception processing.
  	  *
  	  */
      virtual ~IDOM_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.
  	  */
      const XMLCh *msg;
      //@}
  
  };
  
  #endif
  
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/idom/IDOM_DOMImplementation.hpp
  
  Index: IDOM_DOMImplementation.hpp
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 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) 2001, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Log: IDOM_DOMImplementation.hpp,v $
   * Revision 1.1  2002/10/23 08:55:10  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:21:55  peiyongz
   * sane_include
   *
   * Revision 1.2  2001/05/11 13:25:50  tng
   * Copyright update.
   *
   * Revision 1.1.1.1  2001/04/03 00:14:29  andyh
   * IDOM
   *
   */
  
  #ifndef IDOM_DOMImplementation_HEADER_GUARD_
  #define IDOM_DOMImplementation_HEADER_GUARD_
  
  #include <xercesc/util/XercesDefs.hpp>
  
  class IDOM_Document;
  class IDOM_DocumentType;
  
  /**
   *   This class provides a way to query the capabilities of an implementation
   *   of the DOM
   */
  
  
  class CDOM_EXPORT IDOM_DOMImplementation {
   protected:
       IDOM_DOMImplementation() {};                                      // no plain constructor
       IDOM_DOMImplementation(const IDOM_DOMImplementation &other) {};   // no copy construtor.
       IDOM_DOMImplementation & operator = (const IDOM_DOMImplementation &other) {return *this;};  // No Assignment
  
  
   public:
  
       //  Factory method for getting a DOMImplementation object.
       //     The DOM implementation retains ownership of the returned object.
       //     Application code should NOT delete it.
       //
   static IDOM_DOMImplementation *getImplementation();
  
  
  
   virtual ~IDOM_DOMImplementation() {};
  
  virtual bool  hasFeature(const XMLCh *feature,  const XMLCh *version) = 0;
  
  
  
  //  Create a new DocumentType.
  //     Initially the application owns the returned DocumentType object and is responsible
  //        for deleting it.  If the DocumentType is subsequently associated with a Document,
  //        that document becomes the owner of the storage and will delete the document type
  //        when the document is deleted.
  virtual  IDOM_DocumentType *createDocumentType(const XMLCh *qualifiedName,
                                                 const XMLCh *publicId, const XMLCh *systemId) = 0;
  
  
  virtual IDOM_Document *createDocument(const XMLCh *namespaceURI,
                                const XMLCh *qualifiedName, IDOM_DocumentType *doctype) = 0;
  
  // Non-standard extension.  Create a completely empty document that has neither a root
  //          element or a doctype node.
  //
  virtual IDOM_Document *createDocument() = 0;
  };
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/idom/IDOM_Document.hpp
  
  Index: IDOM_Document.hpp
  ===================================================================
  #ifndef IDOM_Document_HEADER_GUARD_
  #define IDOM_Document_HEADER_GUARD_
  
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001-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) 2001, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Id: IDOM_Document.hpp,v 1.1 2002/10/23 08:55:10 lilantha Exp $
  */
  
  #include <xercesc/util/XercesDefs.hpp>
  #include "IDOM_Node.hpp"
  
  class IDNodeIteratorImpl;
  
  class IDOM_DocumentType;
  class IDOM_Element;
  class IDOM_DocumentFragment;
  class IDOM_Comment;
  class IDOM_CDATASection;
  class IDOM_ProcessingInstruction;
  class IDOM_Attr;
  class IDOM_Entity;
  class IDOM_EntityReference;
  class IDOM_DOMImplementation;
  class IDOM_NodeFilter;
  class IDOM_NodeList;
  class IDOM_Notation;
  class IDOM_Text;
  class IDOM_Node;
  class IDOM_NodeIterator;
  class IDOM_TreeWalker;
  class IDOM_Range;
  
  
  /**
  * Class to refer to XML Document nodes in the IDOM.
  *
  * Conceptually, a IDOM 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 IDOM_Document: public IDOM_Node {
  
  protected:
      /** @name Constructors and assignment operators */
      //@{
      /**
       * The default constructor for IDOM_Document creates a null
       * IDOM_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 DOMImplementation
       *   <code> IDOM_DOMImplementation::createDocument(). </code>
       *
       */
      IDOM_Document() {};
  
      /**
        * Copy constructor.  Creates a new <code>IDOM_Document</code> that refers to the
        * same underlying actual document as the original.
        *
        * @param other The object to be copied
        */
      IDOM_Document(const IDOM_Document &other) {};
      /**
        * Assignment operator
        *
        * @param other The object to be copied
        */
      IDOM_Document & operator = (const IDOM_Document &other) {return *this;};
  
  
  	//@}
  
  public:
    /** @name Destructor */
    //@{
  	
      virtual ~IDOM_Document() {};
  
    //@}
    /** @name Factory methods to create new nodes for the Document */
    //@{
  
      /**
      *  Create a new entity.
      *
      *  Non-standard extension.
      * @param name The name of the entity to instantiate
      *
      */
      virtual IDOM_Entity     *createEntity(const XMLCh *name) = 0;
  
      /**
      * 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>IDOM_Element</code> that reference the new element.
      * @exception IDOMException
      *   INVALID_CHARACTER_ERR: Raised if the specified name contains an
      *   illegal character.
      */
      virtual IDOM_Element     *createElement(const XMLCh *tagName) = 0;
  
  
  
      /**
      * Creates an empty DocumentFragment object.
      *
      * @return A <code>IDOM_DocumentFragment</code> that references the newly
      * created document fragment.
      */
      virtual IDOM_DocumentFragment   *createDocumentFragment() = 0;
  
      /**
      * Creates a Text node given the specified string.
      *
      * @param data The data for the node.
      * @return A <code>IDOM_Text</code> object that references the newly
      *  created text node.
      */
      virtual IDOM_Text         *createTextNode(const XMLCh *data) = 0;
  
      /**
      * Creates a Comment node given the specified string.
      *
      * @param data The data for the comment.
      * @return A <code>IDOM_Comment</code> that references the newly
      *  created comment node.
      */
      virtual IDOM_Comment      *createComment(const XMLCh *data) = 0;
  
      /**
      * Creates a CDATASection node whose value  is the specified
      * string.
      *
      * @param data The data for the <code>IDOM_CDATASection</code> contents.
      * @return A <code>IDOM_CDATASection</code> object.
      * @exception IDOMException
      *   NOT_SUPPORTED_ERR: Raised if this document is an HTML document.
      */
      virtual IDOM_CDATASection   *createCDATASection(const XMLCh *data) = 0;
  
      /**
      *  Create a DocumentType node.  Non-standard extension.
      *
      * @return A <code>IDOM_DocumentType</code> that references the newly
      *  created DocumentType node.
      *
      */
      virtual IDOM_DocumentType *createDocumentType(const XMLCh *name) = 0;
  
  
      /**
      *  Create a Notation.
      *
      *  Non-standard extension.
      *
      *  @param name The name of the notation to instantiate
      * @return A <code>IDOM_Notation</code> that references the newly
      *  created Notation node.
      */
      virtual IDOM_Notation *createNotation(const XMLCh *name) = 0;
  
  
      /**
      * 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>IDOM_ProcessingInstruction</code> that references the newly
      *  created PI node.
      * @exception IDOMException
      *   INVALID_CHARACTER_ERR: Raised if an illegal character is specified.
      */
      virtual IDOM_ProcessingInstruction *createProcessingInstruction(const XMLCh *target,
          const XMLCh *data) = 0;
  
  
      /**
       * Creates an Attr of the given name.
       *
       * Note that the
       * <code>Attr</code> instance can then be attached to an Element
       * using the <code>IDOMElement::setAttribute()</code> method.
       * @param name The name of the attribute.
       * @return A new <CODE>IDOM_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 IDOMException
       *   INVALID_CHARACTER_ERR: Raised if the specified name contains an
       *   illegal character.
       */
      virtual IDOM_Attr     *createAttribute(const XMLCh *name) = 0;
  
  
      /**
       * Creates an EntityReference object.
       *
       * @param name The name of the entity to reference.
       * @return A <code>IDOM_EntityReference</code> that references the newly
       *  created EntityReference node.
       * @exception IDOMException
       *   INVALID_CHARACTER_ERR: Raised if the specified name contains an
       *   illegal character.
       */
      virtual IDOM_EntityReference    *createEntityReference(const XMLCh *name) = 0;
  
  
      /**
       * Creates a NodeIterator object.   (IDOM2)
       *
       * 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. IDOM 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 IDOM 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.
       */
  
      virtual IDOM_NodeIterator *createNodeIterator(IDOM_Node         *root,
                                                     unsigned long    whatToShow,
                                                     IDOM_NodeFilter* filter,
                                                     bool             entityReferenceExpansion) = 0;
       /**
       * Creates a TreeWalker object.   (IDOM2)
       *
       * 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 IDOM 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.
       */
  
      virtual IDOM_TreeWalker  *createTreeWalker(IDOM_Node        *root,
                                                 unsigned long     whatToShow,
                                                 IDOM_NodeFilter  *filter,
                                                 bool              entityReferenceExpansion) = 0;
  
      /**
  	  * 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 IDOM_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
  	  */
      virtual IDOM_Range    *createRange() = 0;
  
      //@}
      /** @name Getter functions */
      //@{
      /**
       * Get Document Type Declaration (see <code>IDOM_DocumentType</code>) associated
       * with  this document.
       *
       * For documents without
       * a document type declaration this returns <code>null</code> reference object. The IDOM Level
       *  1 does not support editing the Document Type Declaration, therefore
       * <code>docType</code> cannot be altered in any way.
       */
      virtual IDOM_DocumentType       *getDoctype() const = 0;
  
  
  
      /**
       * Return the <code>IDOMImplementation</code> object that handles this document.
       */
      virtual IDOM_DOMImplementation  *getImplementation() const = 0;
  
  
      /**
       * Return a reference to the root element of the document.
       */
      virtual IDOM_Element     *getDocumentElement() const = 0;
  
      /**
       * Returns a <code>IDOM_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.
       */
      virtual IDOM_NodeList      *getElementsByTagName(const XMLCh *tagname) const = 0;
  
      //@}
      /** @name Functions introduced in IDOM 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>IDOM_Attr</CODE>,
       *      <CODE>IDOM_EntityReference</CODE>, and <CODE>IDOM_Notation</CODE> nodes.
       * @return The imported node that belongs to this <CODE>IDOM_Document</CODE>.
       * @exception IDOMException
       *   NOT_SUPPORTED_ERR: Raised if the type of node being imported is
       *                      not supported.
       */
      virtual IDOM_Node        *importNode(IDOM_Node *importedNode, bool deep) = 0;
  
      /**
       * 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>IDOM_Element</code> object.
       * @exception IDOMException
       *   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".
       */
      virtual IDOM_Element         *createElementNS(const XMLCh *namespaceURI,
  	                                              const XMLCh *qualifiedName) = 0;
  
      /**
       * 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>IDOM_Attr</code> object.
       * @exception IDOMException
       *   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/".
       */
      virtual IDOM_Attr        *createAttributeNS(const XMLCh *namespaceURI,
  	                                            const XMLCh *qualifiedName) = 0;
  
      /**
       * Returns a <code>IDOM_NodeList</code> of all the <code>IDOM_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>IDOM_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>IDOM_NodeList</code> object containing all the matched
       *  <code>IDOM_Element</code>s.
       */
      virtual IDOM_NodeList        *getElementsByTagNameNS(const XMLCh *namespaceURI,
  	                                                     const XMLCh *localName) const = 0;
  
      /**
       * Returns the <code>IDOM_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 IDOM 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.
       */
      virtual  IDOM_Element        * getElementById(const XMLCh *elementId) const = 0;
  
      //@}
  
  protected:
      friend class IDOM_Node;
      friend class DocumentImpl;
      friend class NodeIteratorImpl;
      friend class IDOM_IDOMImplementation;
  
  };
  
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/idom/IDOM_DocumentFragment.hpp
  
  Index: IDOM_DocumentFragment.hpp
  ===================================================================
  #ifndef IDOM_DocumentFragment_HEADER_GUARD_
  #define IDOM_DocumentFragment_HEADER_GUARD_
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 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) 2001, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Id: IDOM_DocumentFragment.hpp,v 1.1 2002/10/23 08:55:10 lilantha Exp $
   */
  
  
  #include <xercesc/util/XercesDefs.hpp>
  #include "IDOM_Node.hpp"
  
  
  /**
   * <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 IDOM_DocumentFragment: public IDOM_Node {
  
  protected:
      IDOM_DocumentFragment() {};
      IDOM_DocumentFragment(const IDOM_DocumentFragment &other) {};
      IDOM_DocumentFragment & operator = (const IDOM_DocumentFragment &other) {return *this;};
      /** @name Destructor */
      //@{
  	
  public:
      virtual ~IDOM_DocumentFragment() {};
  
  	//@}
  
  };
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/idom/IDOM_DocumentType.hpp
  
  Index: IDOM_DocumentType.hpp
  ===================================================================
  #ifndef IDOM_DocumentType_HEADER_GUARD_
  #define IDOM_DocumentType_HEADER_GUARD_
  
  
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001-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) 2001, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Log: IDOM_DocumentType.hpp,v $
   * Revision 1.1  2002/10/23 08:55:10  lilantha
   * update with new XML parser lib
   *
   * Revision 1.2  2002/02/04 21:11:55  tng
   * Remove the phrase "Experimental".
   *
   * Revision 1.1.1.1  2002/02/01 22:21:55  peiyongz
   * sane_include
   *
   * Revision 1.2  2001/05/11 13:25:51  tng
   * Copyright update.
   *
   * Revision 1.1.1.1  2001/04/03 00:14:28  andyh
   * IDOM
   *
   */
  
  #include <xercesc/util/XercesDefs.hpp>
  #include "IDOM_Node.hpp"
  
  class IDOM_NamedNodeMap;
  
  /**
   * Each <code>Document</code> has a <code>doctype</code> whose value
   * is either <code>null</code> or a <code>DocumentType</code> object.
   *
   * The <code>IDOM_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 IDOM_DocumentType: public IDOM_Node {
  protected:
      IDOM_DocumentType() {};
      IDOM_DocumentType(const IDOM_DocumentType &other) {};
      IDOM_DocumentType & operator = (const IDOM_DocumentType &other) {return *this;};
  
  public:
  
      virtual ~IDOM_DocumentType() {};
  
  
  
      /** @name Getter functions. */
      //@{
    /**
     * The name of DTD; i.e., the name immediately following the
     * <code>DOCTYPE</code> keyword in an XML source document.
     */
    virtual const XMLCh *       getName() const = 0;
  
    /**
     * 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.
     */
    virtual IDOM_NamedNodeMap *getEntities() const = 0;
  
  
    /**
     * 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.
     */
    virtual IDOM_NamedNodeMap *getNotations() const = 0;
    //@}
  
      /** @name Functions introduced in DOM Level 2. */
      //@{
      /**
       * Get the public identifier of the external subset.
       *
       * @return The public identifier of the external subset.
       */
      virtual const XMLCh *     getPublicId() const = 0;
  
      /**
       * Get the system identifier of the external subset.
       *
       * @return The system identifier of the external subset.
       */
      virtual const XMLCh *     getSystemId() const = 0;
  
      /**
       * Get the internal subset as a string.
       *
       * @return The internal subset as a string.
       */
      virtual const XMLCh *     getInternalSubset() const = 0;
      //@}
  
  };
  
  #endif
  
  
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/idom/IDOM_Element.hpp
  
  Index: IDOM_Element.hpp
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001-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) 2001, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Log: IDOM_Element.hpp,v $
   * Revision 1.1  2002/10/23 08:55:10  lilantha
   * update with new XML parser lib
   *
   * Revision 1.3  2002/02/20 18:17:01  tng
   * [Bug 5977] Warnings on generating apiDocs.
   *
   * Revision 1.2  2002/02/04 21:20:59  tng
   * Add DOM 2 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:56  peiyongz
   * sane_include
   *
   * Revision 1.2  2001/05/11 13:25:52  tng
   * Copyright update.
   *
   * Revision 1.1.1.1  2001/04/03 00:14:29  andyh
   * IDOM
   *
   */
  
  #ifndef IDOM_Element_HEADER_GUARD_
  #define IDOM_Element_HEADER_GUARD_
  
  #include <xercesc/util/XercesDefs.hpp>
  #include "IDOM_Node.hpp"
  
  class IDOM_Attr;
  class IDOM_NodeList;
  
  
  /**
   * By far the vast majority of objects (apart from text) that authors
   * encounter when traversing a document are <code>IDOM_Element</code> nodes.
   *
   * Assume the following XML document:&lt;elementExample id="demo"&gt;
   * &lt;subelement1/&gt;
   * &lt;subelement2&gt;&lt;subsubelement/&gt;&lt;/subelement2&gt;
   * &lt;/elementExample&gt;
   * <p>When represented using DOM, the top node is an <code>IDOM_Element</code> node
   * for "elementExample", which contains two child <code>IDOM_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>IDOM_Element</code> interface inherits from <code>IDOM_Node</code>, the generic
   *  <code>IDOM_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>IDOM_Element</code> interface to retrieve either an <code>IDOM_Attr</code>
   *  object by name or an attribute value by name. In XML, where an attribute
   * value may contain entity references, an <code>IDOM_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 IDOM_Element: public IDOM_Node {
  protected:
      IDOM_Element() {};
      IDOM_Element(const IDOM_Element &other) {};
      IDOM_Element & operator = (const IDOM_Element &other) {return *this;};
  
  public:
      /** @name Constructors and assignment operator */
      //@{
  
  
  
      //@}
      /** @name Destructor. */
      //@{
  	 /**
        * Destructor.  The object being destroyed is the reference
        * object, not the underlying Element itself.
  	  *
  	  */
      virtual ~IDOM_Element() {};
      //@}
      /** @name Getter functions. */
      //@{
  
    /**
     * The name of the element.
     *
     * For example, in: &lt;elementExample
     * id="demo"&gt;  ... &lt;/elementExample&gt; , <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.
     */
    virtual const XMLCh *         getTagName() const = 0;
  
    /**
     * Retrieves an attribute value by name.
     *
     * @param name The name of the attribute to retrieve.
     * @return The <code>IDOM_Attr</code> value as a string, or the empty  string if
     *   that attribute does not have a specified or default value.
     */
    virtual const XMLCh *         getAttribute(const XMLCh *name) const = 0;
  
    /**
     * Retrieves an <code>IDOM_Attr</code> node by name.
     *
     * @param name The name (<CODE>nodeName</CODE>) of the attribute to retrieve.
     * @return The <code>IDOM_Attr</code> node with the specified name (<CODE>nodeName</CODE>) or
     *   <code>null</code> if there is no such attribute.
     */
    virtual IDOM_Attr       * getAttributeNode(const XMLCh *name) const = 0;
  
    /**
     * 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>IDOM_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>IDOM_Element</code> nodes.
     */
    virtual IDOM_NodeList   * getElementsByTagName(const XMLCh *name) const = 0;
  
    //@}
    /** @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>IDOM_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.
     */
     virtual void             setAttribute(const XMLCh *name,
                                   const XMLCh *value) = 0;
     /**
      * 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>IDOM_Attr</code> node to add to the attribute list.
      * @return If the <code>newAttr</code> attribute replaces an existing
      *   attribute, the replaced
      *   <code>IDOM_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>IDOM_Element</code> object. The DOM user must
      *   explicitly clone <code>IDOM_Attr</code> nodes to re-use them in other
      *   elements.
      */
     virtual IDOM_Attr       * setAttributeNode(IDOM_Attr *newAttr) = 0;
  
     //@}
     /** @name Functions which modify the Element. */
     //@{
    /**
     * Removes the specified attribute node.
     * If the removed <CODE>IDOM_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>IDOM_Attr</code> node to remove from the attribute
     *   list.
     * @return The <code>IDOM_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.
     */
    virtual IDOM_Attr       * removeAttributeNode(IDOM_Attr *oldAttr) = 0;
  
    /**
     * 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.
     */
    virtual void              removeAttribute(const XMLCh *name) = 0;
  
    //@}
    /** @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>IDOM_Attr</code> value as a string, or an <CODE>null</CODE> if
     *    that attribute does not have a specified or default value.
     */
    virtual const XMLCh *         getAttributeNS(const XMLCh *namespaceURI,
  	const XMLCh *localName) const = 0;
  
    /**
     * 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>IDOM_Attr</CODE>
     * node plus any <CODE>IDOM_Text</CODE> and <CODE>IDOM_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/".
     */
     virtual void             setAttributeNS(const XMLCh *namespaceURI,
  	const XMLCh *qualifiedName, const XMLCh *value) = 0;
  
    /**
     * 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.
     */
    virtual void              removeAttributeNS(const XMLCh *namespaceURI,
  	const XMLCh *localName) = 0;
  
    /**
     * Retrieves an <code>IDOM_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>IDOM_Attr</code> node with the specified attribute local
     *    name and namespace URI or <code>null</code> if there is no such attribute.
     */
    virtual IDOM_Attr      *  getAttributeNodeNS(const XMLCh *namespaceURI,
  	const XMLCh *localName) const = 0;
  
     /**
      * 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>IDOM_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>IDOM_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>IDOM_Element</code> object. The DOM user must
      *   explicitly clone <code>IDOM_Attr</code> nodes to re-use them in other
      *   elements.
      */
     virtual IDOM_Attr      *  setAttributeNodeNS(IDOM_Attr *newAttr) = 0;
  
    /**
     * Returns a <code>IDOM_NodeList</code> of all the <code>IDOM_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>IDOM_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>IDOM_NodeList</code> object containing all the matched
     *    <code>IDOM_Element</code>s.
     */
    virtual IDOM_NodeList   * getElementsByTagNameNS(const XMLCh *namespaceURI,
  	const XMLCh *localName) const = 0;
  
      /**
       * 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.
       */
      virtual bool         hasAttribute(const XMLCh *name) const = 0;
  
      /**
       * 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
       */
      virtual bool         hasAttributeNS(const XMLCh *namespaceURI,
                                          const XMLCh *localName) const = 0;
  
    //@}
  
  };
  
  #endif
  
  
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/idom/IDOM_Entity.hpp
  
  Index: IDOM_Entity.hpp
  ===================================================================
  #ifndef IDOM_Entity_HEADER_GUARD_
  #define IDOM_Entity_HEADER_GUARD_
  
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 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) 2001, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Log: IDOM_Entity.hpp,v $
   * Revision 1.1  2002/10/23 08:55:10  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:21:56  peiyongz
   * sane_include
   *
   * Revision 1.2  2001/05/11 13:25:52  tng
   * Copyright update.
   *
   * Revision 1.1.1.1  2001/04/03 00:14:30  andyh
   * IDOM
   *
   */
  
  
  #include <xercesc/util/XercesDefs.hpp>
  #include "IDOM_Node.hpp"
  
  
  /**
   * 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 IDOM_Entity: public IDOM_Node {
  protected:
      IDOM_Entity() {};
      IDOM_Entity(const IDOM_Entity &other) {};
      IDOM_Entity & operator = (const IDOM_Entity &other) {return *this;};
  
  public:
      virtual ~IDOM_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>.
     */
    virtual const XMLCh *        getPublicId() const = 0;
  
    /**
     * The system identifier associated with the entity, if specified.
     *
     * If the system identifier was not specified, this is <code>null</code>.
     */
    virtual const XMLCh *        getSystemId() const = 0;
  
    /**
     * For unparsed entities, the name of the notation for the entity.
     *
     * For parsed entities, this is <code>null</code>.
     */
    virtual const XMLCh *        getNotationName() const = 0;
  
    //@}
  
  };
  
  #endif
  
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/idom/IDOM_EntityReference.hpp
  
  Index: IDOM_EntityReference.hpp
  ===================================================================
  #ifndef IDOM_EntityReference_HEADER_GUARD_
  #define IDOM_EntityReference_HEADER_GUARD_
  
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 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) 2001, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Log: IDOM_EntityReference.hpp,v $
   * Revision 1.1  2002/10/23 08:55:10  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:21:56  peiyongz
   * sane_include
   *
   * Revision 1.2  2001/05/11 13:25:52  tng
   * Copyright update.
   *
   * Revision 1.1.1.1  2001/04/03 00:14:30  andyh
   * IDOM
   *
   */
  
  
  #include <xercesc/util/XercesDefs.hpp>
  #include "IDOM_Node.hpp"
  
  
  /**
   * <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 IDOM_EntityReference: public IDOM_Node {
  protected:
      /** @name Constructors and assignment operator */
      //@{
      IDOM_EntityReference() {};
  
      IDOM_EntityReference(const IDOM_EntityReference &other) {};
  
      IDOM_EntityReference & operator = (const IDOM_EntityReference &other) {return *this;};
  
  public:
      virtual ~IDOM_EntityReference() {};
      //@}
  
  };
  
  #endif
  
  
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/idom/IDOM_NamedNodeMap.hpp
  
  Index: IDOM_NamedNodeMap.hpp
  ===================================================================
  #ifndef IDOM_NamedNodeMap_HEADER_GUARD_
  #define IDOM_NamedNodeMap_HEADER_GUARD_
  
  
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001-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) 2001, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Log: IDOM_NamedNodeMap.hpp,v $
   * Revision 1.1  2002/10/23 08:55:10  lilantha
   * update with new XML parser lib
   *
   * Revision 1.2  2002/02/04 21:11:55  tng
   * Remove the phrase "Experimental".
   *
   * Revision 1.1.1.1  2002/02/01 22:21:56  peiyongz
   * sane_include
   *
   * Revision 1.2  2001/05/11 13:25:53  tng
   * Copyright update.
   *
   * Revision 1.1.1.1  2001/04/03 00:14:30  andyh
   * IDOM
   *
   */
  
  #include <xercesc/util/XercesDefs.hpp>
  
  class IDOM_Node;
  
  /**
  *  <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 IDOM_NamedNodeMap {
  protected:
      IDOM_NamedNodeMap() {};
      IDOM_NamedNodeMap(const IDOM_NamedNodeMap &other) {};
      IDOM_NamedNodeMap & operator = (const IDOM_NamedNodeMap &other) {return *this;};
  
  
  
  public:
      /** @name Destructor. */
      //@{
      virtual ~IDOM_NamedNodeMap() {};
  
      //@}
  
      /** @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.
      */
      virtual IDOM_Node   *setNamedItem(IDOM_Node *arg) = 0;
  
      //@}
      /** @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.
      */
      virtual IDOM_Node     *item(unsigned int index) const = 0;
  
      /**
      * Retrieves a node specified by name.
      *
      * @param name The <code>nodeName</code> of a node to retrieve.
      * @return A <code>IDOM_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.
      */
      virtual IDOM_Node   *getNamedItem(const XMLCh *name) const = 0;
  
      /**
      * The number of nodes in the map.
      *
      * The range of valid child node indices is
      * 0 to <code>length-1</code> inclusive.
      */
      virtual unsigned int   getLength() const = 0;
  
      //@}
      /** @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.
      */
      virtual IDOM_Node    *removeNamedItem(const XMLCh *name) = 0;
  
      //@}
      /** @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>IDOM_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.
       */
      virtual IDOM_Node   *getNamedItemNS(const XMLCh *namespaceURI,
  	                                        const XMLCh *localName) const = 0;
  
      /**
       * 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>IDOM_Node</code> replaces an existing node the
       *   replaced <code>IDOM_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>IDOM_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.
       */
      virtual IDOM_Node   *setNamedItemNS(IDOM_Node *arg) = 0;
  
      /**
       * 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>IDOM_NamedNodeMap</code> contains the
       *    attributes attached to an element, as returned by the attributes
       *    attribute of the <code>IDOM_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>IDOM_NamedNodeMap</code>
       *   is readonly.
       */
      virtual IDOM_Node     *removeNamedItemNS(const XMLCh *namespaceURI,
  	                                          const XMLCh *localName) = 0;
  
      //@}
  
  };
  
  #endif
  
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/idom/IDOM_Node.hpp
  
  Index: IDOM_Node.hpp
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001-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) 2001, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Id: IDOM_Node.hpp,v 1.1 2002/10/23 08:55:10 lilantha Exp $
   */
  
  #ifndef IDOM_Node_HEADER_GUARD_
  #define IDOM_Node_HEADER_GUARD_
  
  #include <xercesc/util/XercesDefs.hpp>
  
  
  class IDOM_Document;
  class IDOM_NamedNodeMap;
  class IDOM_NodeList;
  
  /**
   * 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 IDOM_Node {
  
      protected:
      /** @name Constructors and assignment operators */
      //@{
      /**
        * Default constructor for IDOM_Node.  Protected, because
        * IDOM_Node is an abstract base class.
        *
        */
          IDOM_Node() {};
  
      /**
        * Copy constructor.
        *
        * @param other The object to be copied.
        */
          IDOM_Node(const IDOM_Node &other) {};
  
      /**
        * Assignment operator.
        *
        * @param other The source to be assigned.
        */
          IDOM_Node & operator = (const IDOM_Node &other) {return *this;};
  
      public:
  
     //@}
      /** @name Destructor. */
      //@{
  	 /**
  	  * Destructor for IDOM_Node.
  	  *
  	  */
          virtual ~IDOM_Node() {};
  
      //@}
  
  
      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.
       */
      virtual const XMLCh *   getNodeName() const = 0;
  
      /**
       * Gets the value of this node, depending on its type.
       *
       * @exception DOMException
       *   NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
       */
      virtual const XMLCh *       getNodeValue() const = 0;
  
      /**
       * An enum value representing the type of the underlying object.
       */
      virtual short           getNodeType() const = 0;
  
      /**
       * 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> IDOM_Node
       * is returned.
       */
      virtual IDOM_Node        *getParentNode() const = 0;
  
      /**
       * 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.
       */
      virtual IDOM_NodeList    *getChildNodes() const = 0;
      /**
       * Gets the first child of this node.
       *
       * If there is no such node, this returns <code>null</code>.
       */
      virtual IDOM_Node        *getFirstChild() const = 0;
  
      /**
       * Gets the last child of this node.
       *
       * If there is no such node, this returns <code>null</code>.
       */
      virtual IDOM_Node        *getLastChild() const = 0;
  
      /**
       * Gets the node immediately preceding this node.
       *
       * If there is no such node, this returns <code>null</code>.
       */
      virtual IDOM_Node        *getPreviousSibling() const = 0;
  
      /**
       * Gets the node immediately following this node.
       *
       * If there is no such node, this returns <code>null</code>.
       */
      virtual IDOM_Node        *getNextSibling() const = 0;
  
      /**
       * Gets a <code>NamedNodeMap</code> containing the attributes of this node (if it
       * is an <code>Element</code>) or <code>null</code> otherwise.
       */
      virtual IDOM_NamedNodeMap  *getAttributes() const = 0;
  
      /**
       * Gets the <code>IDOM_Document</code> object associated with this node.
       *
       * This is also
       * the <code>IDOM_Document</code> object used to create new nodes. When this
       * node is a <code>IDOM_Document</code> or a <code>IDOM_DocumentType</code>
       * which is not used with any <code>IDOM_Document</code> yet, this is
       * <code>null</code>.
       *
       */
      virtual IDOM_Document      *getOwnerDocument() const = 0;
  
  
      //@}
      /** @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.
       */
      virtual IDOM_Node        * cloneNode(bool deep) const = 0;
  
      //@}
      /** @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>IDOM_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.
       */
      virtual IDOM_Node       *insertBefore(IDOM_Node *newChild,
                                            IDOM_Node *refChild) = 0;
  
  
      /**
       * 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>IDOM_DocumentFragment</CODE> object,
       * <CODE>oldChild</CODE> is replaced by all of the <CODE>IDOM_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.
       */
      virtual IDOM_Node  *replaceChild(IDOM_Node *newChild,
                                       IDOM_Node *oldChild) = 0;
      /**
       * 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.
       */
      virtual IDOM_Node        *removeChild(IDOM_Node *oldChild) = 0;
  
      /**
       * 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.
       */
      virtual IDOM_Node        *appendChild(IDOM_Node *newChild) = 0;
  
      //@}
      /** @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.
       */
      virtual bool             hasChildNodes() const = 0;
  
  
  
      //@}
      /** @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.
      */
      virtual void              setNodeValue(const XMLCh  *nodeValue) = 0;
  
      //@}
      /** @name Functions introduced in DOM Level 2. */
      //@{
  
      /**
       * Puts all <CODE>IDOM_Text</CODE>
       * nodes in the full depth of the sub-tree underneath this <CODE>IDOM_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>IDOM_Text</CODE>
       * nodes, i.e., there are neither adjacent <CODE>IDOM_Text</CODE>
       * nodes nor empty <CODE>IDOM_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>IDOM_CDATASections</CODE>,
       * the normalize operation alone may not be sufficient, since XPointers do
       * not differentiate between <CODE>IDOM_Text</CODE>
       * nodes and <CODE>IDOM_CDATASection</CODE>
       * nodes.</P>
       *
       *
       */
      virtual void              normalize() = 0;
  
      /**
       * 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>IDOM_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.
       */
      virtual bool              isSupported(const XMLCh *feature,
  	                                       const XMLCh *version) const = 0;
  
      /**
       * 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>IDOM_Document</CODE>
       * interface, this is always <CODE>null</CODE>.
       *
       */
      virtual const XMLCh *         getNamespaceURI() const = 0;
  
      /**
       * Get the <em>namespace prefix</em>
       * of this node, or <code>null</code> if it is unspecified.
       *
       */
      virtual const XMLCh *          getPrefix() const = 0;
  
      /**
       * 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>IDOM_Document</code> interface,
       * it is null.
       *
       *
       */
      virtual const XMLCh *          getLocalName() const = 0;
  
      /**
       * 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>IDOM_Element</CODE> and <CODE>IDOM_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".
       */
      virtual void              setPrefix(const XMLCh * prefix) = 0;
  
      /**
       *  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.
       */
      virtual bool              hasAttributes() const = 0;
  
      //@}
  
  
  };
  
  
  #endif
  
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/idom/IDOM_NodeFilter.hpp
  
  Index: IDOM_NodeFilter.hpp
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001-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) 2001, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Log: IDOM_NodeFilter.hpp,v $
   * Revision 1.1  2002/10/23 08:55:10  lilantha
   * update with new XML parser lib
   *
   * Revision 1.2  2002/02/04 21:11:55  tng
   * Remove the phrase "Experimental".
   *
   * Revision 1.1.1.1  2002/02/01 22:21:56  peiyongz
   * sane_include
   *
   * Revision 1.3  2001/06/04 20:11:53  tng
   * IDOM: Complete IDNodeIterator, IDTreeWalker, IDNodeFilter.
   *
   * Revision 1.2  2001/05/11 13:25:53  tng
   * Copyright update.
   *
   * Revision 1.1.1.1  2001/04/03 00:14:31  andyh
   * IDOM
   *
   */
  
  // IDOM_NodeFilter.h: interface for the IDOM_NodeFilter class.
  //
  //////////////////////////////////////////////////////////////////////
  
  #ifndef IDOM_NodeFilter_HEADER_GUARD_
  #define IDOM_NodeFilter_HEADER_GUARD_
  
  #include "IDOM_Node.hpp"
  
  class IDNodeFilterImpl;
  
  
  /**
   * Filters are objects that know how to "filter out" nodes. If a
   * <code>IDOM_NodeIterator</code> or <code>IDOM_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 IDOM_NodeFilter
  {
      protected:
          IDOM_NodeFilter() {};
          IDOM_NodeFilter(const IDOM_NodeFilter &other) {};
          IDOM_NodeFilter & operator = (const IDOM_NodeFilter &other) {return *this;};
  
      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 Test function. */
          //@{
          /**
           * Test whether a specified node is visible in the logical view of a IDOM_TreeWalker
           * or IDOM_NodeIterator. This function will be called by the implementation of
           * IDOM_TreeWalker and IDOM_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 IDOM_Node* node) const =0;
          //@}
  
  };
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/idom/IDOM_NodeIterator.hpp
  
  Index: IDOM_NodeIterator.hpp
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001-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) 2001, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Log: IDOM_NodeIterator.hpp,v $
   * Revision 1.1  2002/10/23 08:55:10  lilantha
   * update with new XML parser lib
   *
   * Revision 1.2  2002/02/04 21:20:59  tng
   * Add DOM 2 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:56  peiyongz
   * sane_include
   *
   * Revision 1.3  2001/06/04 20:11:53  tng
   * IDOM: Complete IDNodeIterator, IDTreeWalker, IDNodeFilter.
   *
   * Revision 1.2  2001/05/11 13:25:53  tng
   * Copyright update.
   *
   * Revision 1.1.1.1  2001/04/03 00:14:31  andyh
   * IDOM
   *
   */
  
  #ifndef IDOM_NodeIterator_HEADER_GUARD_
  #define IDOM_NodeIterator_HEADER_GUARD_
  
  #include "IDOM_NodeFilter.hpp"
  #include "IDOM_Node.hpp"
  
  class IDNodeIteratorImpl;
  
  /**
   * 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 IDOM_NodeIterator
  {
      protected:
          IDOM_NodeIterator() {};
          IDOM_NodeIterator(const IDOM_NodeIterator &other) {};
          IDOM_NodeIterator & operator = (const IDOM_NodeIterator &other) {return *this;};
  
      public:
          /** @name Get functions. */
          //@{
          /**
           * The <code>root</code> node of the <code>NodeIterator</code>, as specified
           * when it was created.
           */
          virtual IDOM_Node*          getRoot() = 0;
          /**
            * Return which node types are presented via the iterator.
            * The available set of constants is defined in the IDOM_NodeFilter interface.
            *
            */
          virtual unsigned long       getWhatToShow() = 0;
  
          /**
            * Return The filter used to screen nodes.
            *
            */
          virtual IDOM_NodeFilter*     getFilter() = 0;
  
          /**
            * Return the expandEntityReferences flag.
            * The value of this flag determines whether the children of entity reference
            * nodes are visible to the IDOM_NodeFilter. If false, they will be skipped over.
            *
            */
          virtual bool getExpandEntityReferences() = 0;
  
          /**
            * Returns the next node in the set and advances the position of the iterator
            * in the set. After a IDOM_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.
            */
          virtual IDOM_Node*           nextNode() = 0;
  
          /**
            * 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.
            */
          virtual IDOM_Node*           previousNode() = 0;
          //@}
  
          /** @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.
            *
            */
          virtual void                 detach() = 0;
          //@}
  };
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/idom/IDOM_NodeList.hpp
  
  Index: IDOM_NodeList.hpp
  ===================================================================
  #ifndef IDOM_NodeList_HEADER_GUARD_
  #define IDOM_NodeList_HEADER_GUARD_
  
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 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) 2001, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Log: IDOM_NodeList.hpp,v $
   * Revision 1.1  2002/10/23 08:55:10  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:21:56  peiyongz
   * sane_include
   *
   * Revision 1.3  2001/06/04 14:55:35  tng
   * IDOM: Add IRange and IDeepNodeList Support.
   *
   * Revision 1.2  2001/05/11 13:25:54  tng
   * Copyright update.
   *
   * Revision 1.1.1.1  2001/04/03 00:14:31  andyh
   * IDOM
   *
   */
  
  #include <xercesc/util/XercesDefs.hpp>
  
  class IDOM_Node;
  
  
  /**
   * 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 IDOM_NodeList {
  protected:
      IDOM_NodeList() {};
      IDOM_NodeList(const IDOM_NodeList &other) {};
      IDOM_NodeList & operator = (const IDOM_NodeList &other) {return *this;};
  
  public:
      /** @name Destructor. */
      //@{
      virtual ~IDOM_NodeList()  {};
      //@}
  
  
  
      /** @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.
       */
      virtual IDOM_Node  *item(unsigned int index) = 0;
  
      /**
       * Returns the number of nodes in the list.
       *
       * The range of valid child node indices is 0 to <code>length-1</code> inclusive.
       */
      virtual unsigned int getLength() = 0;
      //@}
  };
  
  #endif
  
  
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/idom/IDOM_Notation.hpp
  
  Index: IDOM_Notation.hpp
  ===================================================================
  #ifndef IDOM_Notation_HEADER_GUARD_
  #define IDOM_Notation_HEADER_GUARD_
  
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 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) 2001, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Log: IDOM_Notation.hpp,v $
   * Revision 1.1  2002/10/23 08:55:10  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:21:56  peiyongz
   * sane_include
   *
   * Revision 1.2  2001/05/11 13:25:54  tng
   * Copyright update.
   *
   * Revision 1.1.1.1  2001/04/03 00:14:32  andyh
   * IDOM
   *
   */
  
  #include <xercesc/util/XercesDefs.hpp>
  #include "IDOM_Node.hpp"
  
  
  /**
   * 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 IDOM_Notation: public IDOM_Node {
  protected:
      IDOM_Notation() {};
      IDOM_Notation(const IDOM_Notation &other) {};
      IDOM_Notation & operator = (const IDOM_Notation &other) {return *this;};
  
  public:
      virtual ~IDOM_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
       */
      virtual const XMLCh *getPublicId() const = 0;
      /**
       * 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
       */
      virtual const XMLCh *getSystemId() const = 0;
  
  
      //@}
  };
  
  #endif
  
  
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/idom/IDOM_ProcessingInstruction.hpp
  
  Index: IDOM_ProcessingInstruction.hpp
  ===================================================================
  #ifndef IDOM_ProcessingInstruction_HEADER_GUARD_
  #define IDOM_ProcessingInstruction_HEADER_GUARD_
  
  
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 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) 2001, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Log: IDOM_ProcessingInstruction.hpp,v $
   * Revision 1.1  2002/10/23 08:55:10  lilantha
   * update with new XML parser lib
   *
   * Revision 1.2  2002/02/20 18:17:01  tng
   * [Bug 5977] Warnings on generating apiDocs.
   *
   * Revision 1.1.1.1  2002/02/01 22:21:56  peiyongz
   * sane_include
   *
   * Revision 1.2  2001/05/11 13:25:54  tng
   * Copyright update.
   *
   * Revision 1.1.1.1  2001/04/03 00:14:32  andyh
   * IDOM
   *
   */
  
  #include <xercesc/util/XercesDefs.hpp>
  #include "IDOM_Node.hpp"
  
  
  /**
   * 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 IDOM_ProcessingInstruction: public IDOM_Node {
  protected:
      IDOM_ProcessingInstruction() {};
  
      IDOM_ProcessingInstruction(const IDOM_ProcessingInstruction &other) {};
      IDOM_ProcessingInstruction & operator = (const IDOM_ProcessingInstruction &other) {return *this;};
  
  public:
      virtual ~IDOM_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.
       */
      virtual const XMLCh *        getTarget() const = 0;
  
      /**
       * 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>?&gt;</code>.
       * @exception DOMException
       *   NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
       */
      virtual const XMLCh *        getData() const = 0;
  
      //@}
      /** @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>?&gt;</code>.
      * @param data The string containing the processing instruction
      */
      virtual void             setData(const XMLCh * data) = 0;
      //@}
  
  };
  
  #endif
  
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/idom/IDOM_Range.hpp
  
  Index: IDOM_Range.hpp
  ===================================================================
  #ifndef IDOM_Range_HEADER_GUARD_
  #define IDOM_Range_HEADER_GUARD_
  
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 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) 2001, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Id: IDOM_Range.hpp,v 1.1 2002/10/23 08:55:10 lilantha Exp $
   */
  
  #include <xercesc/util/XercesDefs.hpp>
  
  class IDOM_Node;
  class IDOM_DocumentFragment;
  
  class CDOM_EXPORT IDOM_Range {
  protected:
      IDOM_Range() {};
      IDOM_Range(const IDOM_Range &other) {};
      IDOM_Range & operator = (const IDOM_Range &other) {return *this;};
  
  public:
  
      enum CompareHow {
          START_TO_START  = 0,
          START_TO_END    = 1,
          END_TO_END      = 2,
          END_TO_START    = 3
      };
  
      virtual ~IDOM_Range() {};
  
      //getter functions
      virtual IDOM_Node* getStartContainer() const = 0;
      virtual unsigned int getStartOffset() const = 0;
      virtual IDOM_Node* getEndContainer() const = 0;
      virtual unsigned int getEndOffset() const = 0;
      virtual bool getCollapsed() const = 0;
      virtual const IDOM_Node* getCommonAncestorContainer() const = 0;
  
      //setter functions
      virtual void setStart(const IDOM_Node *parent, unsigned int offset) = 0;
      virtual void setEnd(const IDOM_Node *parent, unsigned int offset) = 0;
  
      virtual void setStartBefore(const IDOM_Node *refNode) = 0;
      virtual void setStartAfter(const IDOM_Node *refNode) = 0;
      virtual void setEndBefore(const IDOM_Node *refNode) = 0;
      virtual void setEndAfter(const IDOM_Node *refNode) = 0;
  
      //misc functions
      virtual void collapse(bool toStart) = 0;
      virtual void selectNode(const IDOM_Node *node) = 0;
      virtual void selectNodeContents(const IDOM_Node *node) = 0;
  
      //Functions related to comparing range Boundrary-Points
      virtual short compareBoundaryPoints(CompareHow how, const IDOM_Range* range) const = 0;
      virtual void deleteContents() = 0;
      virtual IDOM_DocumentFragment* extractContents() = 0;
      virtual IDOM_DocumentFragment* cloneContents() const = 0;
      virtual void insertNode(IDOM_Node *node) = 0;
      //Misc functions
      virtual void surroundContents(IDOM_Node *node) = 0;
      virtual IDOM_Range* cloneRange() const = 0;
      virtual const XMLCh* toString() const = 0;
      virtual void detach() = 0;
  
  };
  
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/idom/IDOM_RangeException.hpp
  
  Index: IDOM_RangeException.hpp
  ===================================================================
  #ifndef IDOM_RangeException_HEADER_GUARD_
  #define IDOM_RangeException_HEADER_GUARD_
  
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 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) 2001, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Log: IDOM_RangeException.hpp,v $
   * Revision 1.1  2002/10/23 08:55:10  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:21:56  peiyongz
   * sane_include
   *
   * Revision 1.3  2001/06/04 14:55:36  tng
   * IDOM: Add IRange and IDeepNodeList Support.
   *
   * Revision 1.2  2001/05/11 13:25:55  tng
   * Copyright update.
   *
   * Revision 1.1.1.1  2001/04/03 00:14:32  andyh
   * IDOM
   *
   */
  
  #include <xercesc/idom/IDOM_DOMException.hpp>
  
  /**
    * Encapsulate range related DOM error or warning. DOM level 2 implementation.
    *
    * <p> The DOM will create and throw an instance of IDOM_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, IDOM_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 IDOM_RangeException  : public IDOM_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 IDOM_RangeException.
        *
        */
      IDOM_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
        */
      IDOM_RangeException(RangeExceptionCode code, const XMLCh* message);
  
      /**
        * Copy constructor.
        *
        * @param other The object to be copied.
        */
      IDOM_RangeException(const IDOM_RangeException &other);
  
      //@}
      /** @name Destructor. */
      //@{
  	 /**
  	  * Destructor for IDOM_RangeException.  Applications are responsible
        * for deleting IDOM_RangeException objects that they catch after they
        * have completed their exception processing.
  	  *
  	  */
      virtual ~IDOM_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/idom/IDOM_Text.hpp
  
  Index: IDOM_Text.hpp
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001-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) 2001, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Log: IDOM_Text.hpp,v $
   * Revision 1.1  2002/10/23 08:55:10  lilantha
   * update with new XML parser lib
   *
   * Revision 1.2  2002/02/04 21:11:55  tng
   * Remove the phrase "Experimental".
   *
   * Revision 1.1.1.1  2002/02/01 22:21:56  peiyongz
   * sane_include
   *
   * Revision 1.2  2001/05/11 13:25:55  tng
   * Copyright update.
   *
   * Revision 1.1.1.1  2001/04/03 00:14:32  andyh
   * IDOM
   *
   */
  
  #ifndef IDOM_Text_HEADER_GUARD_
  #define IDOM_Text_HEADER_GUARD_
  
  #include <xercesc/util/XercesDefs.hpp>
  #include "IDOM_CharacterData.hpp"
  
  
  
  /**
   * 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 IDOM_Text: public IDOM_CharacterData {
  
      protected:
      /** @name Constructors and assignment operator */
      //@{
          IDOM_Text() {};
  
          IDOM_Text(const IDOM_Text &other) {};
  
          IDOM_Text & operator = (const IDOM_Text &other) {return *this;};
  
  
      //@}
      public:
      /** @name Destructor. */
      //@{
  	 /**
  	  * Destructor for IDOM_Text. The object being destroyed is the reference
        * object, not the underlying Comment node itself.
  	  *
  	  */
          virtual ~IDOM_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.
       */
      virtual IDOM_Text *splitText(unsigned int offset) = 0;
  
      //@}
      /** @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.
       */
      virtual bool isIgnorableWhitespace() const = 0;
  
      //@}
  
  };
  
  #endif
  
  
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/idom/IDOM_TreeWalker.hpp
  
  Index: IDOM_TreeWalker.hpp
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2001-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) 2001, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Log: IDOM_TreeWalker.hpp,v $
   * Revision 1.1  2002/10/23 08:55:10  lilantha
   * update with new XML parser lib
   *
   * Revision 1.2  2002/02/04 21:20:59  tng
   * Add DOM 2 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:56  peiyongz
   * sane_include
   *
   * Revision 1.3  2001/06/04 20:11:53  tng
   * IDOM: Complete IDNodeIterator, IDTreeWalker, IDNodeFilter.
   *
   * Revision 1.2  2001/05/11 13:25:56  tng
   * Copyright update.
   *
   * Revision 1.1.1.1  2001/04/03 00:14:33  andyh
   * IDOM
   *
   */
  
  #ifndef IDOM_TreeWalker_HEADER_GUARD_
  #define IDOM_TreeWalker_HEADER_GUARD_
  
  #include "IDOM_Node.hpp"
  #include "IDOM_NodeFilter.hpp"
  
  
  /**
   * <code>IDOM_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>IDOM_TreeWalker</code>. Any
   * function which performs navigation using a <code>IDOM_TreeWalker</code> will
   * automatically support any view defined by a <code>IDOM_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 IDOM_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 IDOM_TreeWalker {
      protected:
          IDOM_TreeWalker() {};
          IDOM_TreeWalker(const IDOM_TreeWalker &other) {};
          IDOM_TreeWalker & operator = (const IDOM_TreeWalker &other) {return *this;};
  
      public:
          /** @name Get functions. */
          //@{
          /**
           * The <code>root</code> node of the <code>TreeWalker</code>, as specified
           * when it was created.
           */
          virtual IDOM_Node*          getRoot() = 0;
          /**
            * Return which node types are presented via the IDOM_TreeWalker.
            * These constants are defined in the IDOM_NodeFilter interface.
            *
            */
          virtual unsigned long   	getWhatToShow()= 0;
  
          /**
            * Return The filter used to screen nodes.
            *
            */
          virtual IDOM_NodeFilter*		getFilter()= 0;
  
          /**
            * Return the expandEntityReferences flag.
            * The value of this flag determines whether the children of entity reference
            * nodes are visible to the IDOM_TreeWalker. If false, they will be skipped over.
            *
            */
          virtual bool getExpandEntityReferences()= 0;
  
          /**
            * Return the node at which the IDOM_TreeWalker is currently positioned.
            *
            */
          virtual IDOM_Node*		getCurrentNode()= 0;
  
          /**
            * Moves to and returns the closest visible ancestor node of the current node.
            * If the search for parentNode attempts to step upward from the IDOM_TreeWalker's root
            * node, or if it fails to find a visible ancestor node, this method retains the
            * current position and returns null.
            *
            */
          virtual IDOM_Node*		parentNode()= 0;
  
          /**
            * Moves the <code>IDOM_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.
            *
            */
          virtual IDOM_Node*		firstChild()= 0;
  
          /**
            * Moves the <code>IDOM_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.
            *
            */
          virtual IDOM_Node*		lastChild()= 0;
  
          /**
            * Moves the <code>IDOM_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.
            *
            */
          virtual IDOM_Node*		previousSibling()= 0;
  
          /**
            * Moves the <code>IDOM_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.
            *
            */
          virtual IDOM_Node*		nextSibling()= 0;
  
          /**
            * Moves the <code>IDOM_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 IDOM_TreeWalker's
            * root node, returns <code>null</code>, and retains the current node.
            *
            */
          virtual IDOM_Node*		previousNode()= 0;
  
          /**
            * Moves the <code>IDOM_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 IDOM_TreeWalker's
            * root node, returns <code>null</code>, and retains the current node.
            *
            */
          virtual IDOM_Node*		nextNode()= 0;
          //@}
  
          /** @name Set functions. */
          //@{
          /**
            * Set the node at which the IDOM_TreeWalker is currently positioned.
            *
            */
          virtual void			setCurrentNode(IDOM_Node* currentNode)= 0;
          //@}
  };
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/idom/IDParentNode.hpp
  
  Index: IDParentNode.hpp
  ===================================================================
  #ifndef IDParentNode_HEADER_GUARD_
  #define IDParentNode_HEADER_GUARD_
  
  
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 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) 2001, 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: IDParentNode.hpp,v 1.1 2002/10/23 08:55:10 lilantha Exp $
   */
  
  /**
   * ParentNode provides the capability of having child
   * nodes. Not every node in the DOM can have children, so only nodes that can
   * should include this class and pay the price for it.
   * <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.
   *
   **/
  
  #include <xercesc/util/XercesDefs.hpp>
  #include "IDNodeListImpl.hpp"
  
  class IDChildNode;
  class IDOM_Document;
  class IDOM_Node;
  class IDOM_NodeList;
  
  class CDOM_EXPORT IDParentNode  {
  public:
      IDOM_Document            *fOwnerDocument; // Document this node belongs to
      IDOM_Node                *fFirstChild;
      IDNodeListImpl            fChildNodeList;      // for GetChildNodes()
  
  public:
      IDParentNode(IDOM_Document *ownerDocument);
      IDParentNode(const IDParentNode &other);
  
      IDOM_Document * getOwnerDocument() const;
      void setOwnerDocument(IDOM_Document* doc);
  
      // Track changes to the node tree structure under this node.  An optimization
      //   for NodeLists.
      int changes() const;
      void changed();
  
      IDOM_Node     * appendChild(IDOM_Node *newChild);
      IDOM_NodeList * getChildNodes() const;
      IDOM_Node     * getFirstChild() const;
      IDOM_Node     * getLastChild() const;
      unsigned int    getLength() const;
      bool            hasChildNodes() const;
      IDOM_Node     * insertBefore(IDOM_Node *newChild, IDOM_Node *refChild);
      IDOM_Node     * item(unsigned int index) const;
      IDOM_Node     * removeChild(IDOM_Node *oldChild);
      IDOM_Node     * replaceChild(IDOM_Node *newChild, IDOM_Node *oldChild);
  
      //Introduced in DOM Level 2
      void	normalize();
  
      // NON-DOM
      // unlike getOwnerDocument this never returns null, even for Document nodes
      IDOM_Document * getDocument() const;
  
  
  public:
      void cloneChildren(const IDOM_Node *other);
      IDOM_Node * lastChild() const;
      void lastChild(IDOM_Node *);
  };
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/internal/CharTypeTables.hpp
  
  Index: CharTypeTables.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: CharTypeTables.hpp,v $
   * Revision 1.1  2002/10/23 08:55:11  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:21:57  peiyongz
   * sane_include
   *
   * Revision 1.4  2001/07/26 19:53:02  tng
   * [Bug 2751] Several NameChar characters missing from internal tables .
   *
   * Revision 1.3  2000/02/24 20:18:06  abagchi
   * Swat for removing Log from API docs
   *
   * Revision 1.2  2000/02/06 07:47:52  rahulj
   * Year 2K copyright swat.
   *
   * Revision 1.1.1.1  1999/11/09 01:08:03  twl
   * Initial checkin
   *
   * Revision 1.3  1999/11/08 20:44:41  rahul
   * Swat for adding in Product name and CVS comment log variable.
   *
   */
  
  
  // ---------------------------------------------------------------------------
  //  These are character type lookup tables. They are included into XMLReader
  //  but are in their own private header in order to keep from making that
  //  file unreadable.
  //
  //  THE RANGES and SINGLES MUST BE IN NUMERICAL ORDER, because the lookup
  //  method will use this info to short circuit the search!
  // ---------------------------------------------------------------------------
  static const XMLCh gBaseChars[] =
  {
      // Ranges
          0x0041, 0x005A, 0x0061, 0x007A, 0x00C0, 0x00D6, 0x00D8, 0x00F6
      ,   0x00F8, 0x00FF
  
      ,   0x0100, 0x0131, 0x0134, 0x013E, 0x0141, 0x0148, 0x014A, 0x017E
      ,   0x0180, 0x01C3, 0x01CD, 0x01F0, 0x01F4, 0x01F5, 0x01FA, 0x0217
      ,   0x0250, 0x02A8, 0x02BB, 0x02C1, 0x0388, 0x038A, 0x038E, 0x03A1
      ,   0x03A3, 0x03CE, 0x03D0, 0x03D6, 0x03E2, 0x03F3, 0x0401, 0x040C
      ,   0x040E, 0x044F, 0x0451, 0x045C, 0x045E, 0x0481, 0x0490, 0x04C4
      ,   0x04C7, 0x04C8, 0x04CB, 0x04CC, 0x04D0, 0x04EB, 0x04EE, 0x04F5
      ,   0x04F8, 0x04F9, 0x0531, 0x0556, 0x0561, 0x0586, 0x05D0, 0x05EA
      ,   0x05F0, 0x05F2, 0x0621, 0x063A, 0x0641, 0x064A, 0x0671, 0x06B7
      ,   0x06BA, 0x06BE, 0x06C0, 0x06CE, 0x06D0, 0x06D3, 0x06E5, 0x06E6
      ,   0x0905, 0x0939, 0x0958, 0x0961, 0x0985, 0x098C, 0x098F, 0x0990
      ,   0x0993, 0x09A8, 0x09AA, 0x09B0, 0x09B6, 0x09B9, 0x09DC, 0x09DD
      ,   0x09DF, 0x09E1, 0x09F0, 0x09F1, 0x0A05, 0x0A0A, 0x0A0F, 0x0A10
      ,   0x0A13, 0x0A28, 0x0A2A, 0x0A30, 0x0A32, 0x0A33, 0x0A35, 0x0A36
      ,   0x0A38, 0x0A39, 0x0A59, 0x0A5C, 0x0A72, 0x0A74, 0x0A85, 0x0A8B
      ,   0x0A8F, 0x0A91, 0x0A93, 0x0AA8, 0x0AAA, 0x0AB0, 0x0AB2, 0x0AB3
      ,   0x0AB5, 0x0AB9, 0x0B05, 0x0B0C, 0x0B0F, 0x0B10, 0x0B13, 0x0B28
      ,   0x0B2A, 0x0B30, 0x0B32, 0x0B33, 0x0B36, 0x0B39, 0x0B5C, 0x0B5D
      ,   0x0B5F, 0x0B61, 0x0B85, 0x0B8A, 0x0B8E, 0x0B90, 0x0B92, 0x0B95
      ,   0x0B99, 0x0B9A, 0x0B9E, 0x0B9F, 0x0BA3, 0x0BA4, 0x0BA8, 0x0BAA
      ,   0x0BAE, 0x0BB5, 0x0BB7, 0x0BB9, 0x0C05, 0x0C0C, 0x0C0E, 0x0C10
      ,   0x0C12, 0x0C28, 0x0C2A, 0x0C33, 0x0C35, 0x0C39, 0x0C60, 0x0C61
      ,   0x0C85, 0x0C8C, 0x0C8E, 0x0C90, 0x0C92, 0x0CA8, 0x0CAA, 0x0CB3
      ,   0x0CB5, 0x0CB9, 0x0CE0, 0x0CE1, 0x0D05, 0x0D0C, 0x0D0E, 0x0D10
      ,   0x0D12, 0x0D28, 0x0D2A, 0x0D39, 0x0D60, 0x0D61, 0x0E01, 0x0E2E
      ,   0x0E32, 0x0E33, 0x0E40, 0x0E45, 0x0E81, 0x0E82, 0x0E87, 0x0E88
      ,   0x0E94, 0x0E97, 0x0E99, 0x0E9F, 0x0EA1, 0x0EA3, 0x0EAA, 0x0EAB
      ,   0x0EAD, 0x0EAE, 0x0EB2, 0x0EB3, 0x0EC0, 0x0EC4, 0x0F40, 0x0F47
      ,   0x0F49, 0x0F69, 0x10A0, 0x10C5, 0x10D0, 0x10F6, 0x1102, 0x1103
      ,   0x1105, 0x1107, 0x110B, 0x110C, 0x110E, 0x1112, 0x1154, 0x1155
      ,   0x115F, 0x1161, 0x116D, 0x116E, 0x1172, 0x1173, 0x11AE, 0x11AF
      ,   0x11B7, 0x11B8, 0x11BC, 0x11C2, 0x1E00, 0x1E9B, 0x1EA0, 0x1EF9
      ,   0x1F00, 0x1F15, 0x1F18, 0x1F1D, 0x1F20, 0x1F45, 0x1F48, 0x1F4D
      ,   0x1F50, 0x1F57, 0x1F5F, 0x1F7D, 0x1F80, 0x1FB4, 0x1FB6, 0x1FBC
      ,   0x1FC2, 0x1FC4, 0x1FC6, 0x1FCC, 0x1FD0, 0x1FD3, 0x1FD6, 0x1FDB
      ,   0x1FE0, 0x1FEC, 0x1FF2, 0x1FF4, 0x1FF6, 0x1FFC, 0x212A, 0x212B
      ,   0x2180, 0x2182, 0x3041, 0x3094, 0x30A1, 0x30FA, 0x3105, 0x312C
      ,   0xAC00, 0xD7A3
      ,   0x00
  
      // Singles
      ,   0x0386, 0x038C, 0x03DA, 0x03DC, 0x03DE, 0x03E0, 0x0559, 0x06D5
      ,   0x093D, 0x09B2, 0x0A5E, 0x0A8D, 0x0ABD, 0x0AE0, 0x0B3D, 0x0B9C
      ,   0x0CDE, 0x0E30, 0x0E84, 0x0E8A, 0x0E8D, 0x0EA5, 0x0EA7, 0x0EB0
      ,   0x0EBD, 0x1100, 0x1109, 0x113C, 0x113E, 0x1140, 0x114C, 0x114E
      ,   0x1150, 0x1159, 0x1163, 0x1165, 0x1167, 0x1169, 0x1175, 0x119E
      ,   0x11A8, 0x11AB, 0x11BA, 0x11EB, 0x11F0, 0x11F9, 0x1F59, 0x1F5B
      ,   0x1F5D, 0x1FBE, 0x2126, 0x212E
      ,   0x00
  };
  
  
  static const XMLCh gCombiningChars[] =
  {
      // Ranges
          0x0300, 0x0345, 0x0360, 0x0361, 0x0483, 0x0486, 0x0591, 0x05A1
      ,   0x05A3, 0x05B9, 0x05BB, 0x05BD, 0x05C1, 0x05C2, 0x064B, 0x0652
      ,   0x06D6, 0x06DC, 0x06DD, 0x06DF, 0x06E0, 0x06E4
      ,   0x06E7, 0x06E8, 0x06EA, 0x06ED, 0x0901, 0x0903, 0x093E, 0x094C
      ,   0x0951, 0x0954, 0x0962, 0x0963, 0x0981, 0x0983, 0x09C0, 0x09C4
      ,   0x09C7, 0x09C8, 0x09CB, 0x09CD, 0x09E2, 0x09E3, 0x0A40, 0x0A42
      ,   0x0A47, 0x0A48, 0x0A4B, 0x0A4D, 0x0A70, 0x0A71, 0x0A81, 0x0A83
      ,   0x0ABE, 0x0AC5, 0x0AC7, 0x0AC9, 0x0ACB, 0x0ACD, 0x0B01, 0x0B03
      ,   0x0B3E, 0x0B43, 0x0B47, 0x0B48, 0x0B4B, 0x0B4D, 0x0B56, 0x0B57
      ,   0x0B82, 0x0B83, 0x0BBE, 0x0BC2, 0x0BC6, 0x0BC8, 0x0BCA, 0x0BCD
      ,   0x0C01, 0x0C03, 0x0C3E, 0x0C44, 0x0C46, 0x0C48, 0x0C4A, 0x0C4D
      ,   0x0C55, 0x0C56, 0x0C82, 0x0C83, 0x0CBE, 0x0CC4, 0x0CC6, 0x0CC8
      ,   0x0CCA, 0x0CCD, 0x0CD5, 0x0CD6, 0x0D02, 0x0D03, 0x0D3E, 0x0D43
      ,   0x0D46, 0x0D48, 0x0D4A, 0x0D4D, 0x0E34, 0x0E3A, 0x0E47, 0x0E4E
      ,   0x0EB4, 0x0EB9, 0x0EBB, 0x0EBC, 0x0EC8, 0x0ECD, 0x0F18, 0x0F19
      ,   0x0F71, 0x0F84, 0x0F86, 0x0F8B, 0x0F90, 0x0F95, 0x0F99, 0x0FAD
      ,   0x0FB1, 0x0FB7, 0x20D0, 0x20DC, 0x302A, 0x302F
      ,   0x00
  
      // Singles
      ,   0x05BF, 0x05C4, 0x0670
      ,   0x093C, 0x094D, 0x09BC, 0x09BE, 0x09BF, 0x09D7, 0x0A02
      ,   0x0A3C, 0x0A3E, 0x0A3F, 0x0ABC, 0x0B3C, 0x0BD7, 0x0D57, 0x0E31
      ,   0x0EB1, 0x0F35, 0x0F37, 0x0F39, 0x0F3E, 0x0F3F, 0x0F97, 0x0FB9
      ,   0x20E1, 0x3099, 0x309A
      ,   0x00
  };
  
  
  static const XMLCh gDigitChars[] =
  {
      // Ranges
          0x0030, 0x0039, 0x0660, 0x0669, 0x06F0, 0x06F9, 0x0966, 0x096F
      ,   0x09E6, 0x09EF, 0x0A66, 0x0A6F, 0x0AE6, 0x0AEF, 0x0B66, 0x0B6F
      ,   0x0BE7, 0x0BEF, 0x0C66, 0x0C6F, 0x0CE6, 0x0CEF, 0x0D66, 0x0D6F
      ,   0x0E50, 0x0E59, 0x0ED0, 0x0ED9, 0x0F20, 0x0F29
      ,   0x00
  
      // Singles
      ,   0x00
  };
  
  
  static const XMLCh gIdeographicChars[] =
  {
      // Ranges
          0x3021, 0x3029, 0x4E00, 0x9FA5
      ,   0x00
  
      // Singles
      ,   0x3007
      ,   0x00
  };
  
  static const XMLCh gExtenderChars[] =
  {
      // Ranges
          0x3031, 0x3035, 0x309D, 0x309E, 0x30FC, 0x30FE
      ,   0x00
  
      // Singles
      ,   0x00B7, 0x02D0, 0x02D1, 0x0387, 0x0640, 0x0E46, 0x0EC6, 0x3005
      ,   0x00
  };
  
  
  static const XMLCh gLetterChars[] =
  {
      // Ranges
          0x3021, 0x3029, 0x4E00, 0x9FA5
      ,   0x00
  
      // Sngles
      ,   0x3007
      ,   0x00
  };
  
  
  static const XMLCh gPublicIdChars[] =
  {
      // Ranges
          0x0023, 0x0025, 0x0027, 0x003B, 0x003F, 0x005A, 0x0061, 0x007A
      ,   0x00
  
      // Singles
      ,   0x000A, 0x000D, 0x0020, 0x0021, 0x003D, 0x005F
      ,   0x00
  };
  
  
  static const XMLCh gWhitespaceChars[] =
  {
      // Ranges
          0x00
  
      ,   0x0020, 0x0009, 0x000D, 0x000A
      ,   0x00
  };
  
  
  static const XMLCh gXMLChars[] =
  {
      // Ranges
          0x0020, 0xD7FF, 0xE000, 0xFFFD
      ,   0x00
  
      ,   0x0009, 0x000D, 0x000A
      ,   0x00
  };
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/internal/ElemStack.hpp
  
  Index: ElemStack.hpp
  ===================================================================
  /*
   * 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/>.
   */
  
  /*
   * $Log: ElemStack.hpp,v $
   * Revision 1.1  2002/10/23 08:55:11  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:21:58  peiyongz
   * sane_include
   *
   * Revision 1.11  2001/12/12 14:29:50  tng
   * Remove obsolete code in ElemStack which can help performance.
   *
   * Revision 1.10  2001/08/07 13:47:47  tng
   * Schema: Fix unmatched end tag for qualified/unqualifed start tag.
   *
   * Revision 1.9  2001/05/28 20:55:19  tng
   * Schema: Store Grammar in ElemStack as well.
   *
   * Revision 1.8  2001/05/11 13:26:16  tng
   * Copyright update.
   *
   * Revision 1.7  2001/05/03 20:34:28  tng
   * Schema: SchemaValidator update
   *
   * Revision 1.6  2001/04/19 18:16:58  tng
   * Schema: SchemaValidator update, and use QName in Content Model
   *
   * Revision 1.5  2000/04/18 23:54:29  roddey
   * Got rid of some foward references to no longer used classes.
   *
   * Revision 1.4  2000/03/02 19:54:28  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:18:07  abagchi
   * Swat for removing Log from API docs
   *
   * Revision 1.2  2000/02/06 07:47:52  rahulj
   * Year 2K copyright swat.
   *
   * Revision 1.1.1.1  1999/11/09 01:08:06  twl
   * Initial checkin
   *
   * Revision 1.2  1999/11/08 20:44:42  rahul
   * Swat for adding in Product name and CVS comment log variable.
   *
   */
  
  #if !defined(ELEMSTACK_HPP)
  #define ELEMSTACK_HPP
  
  #include <xercesc/util/XercesDefs.hpp>
  #include <xercesc/util/StringPool.hpp>
  #include <xercesc/util/QName.hpp>
  class XMLElementDecl;
  class Grammar;
  
  //
  //  During the scan of content, we have to keep up with the nesting of
  //  elements (for validation and wellformedness purposes) and we have to
  //  have places to remember namespace (prefix to URI) mappings.
  //
  //  We only have to keep a stack of the current path down through the tree
  //  that we are currently scanning, and keep track of any children of any
  //  elements along that path.
  //
  //  So, this data structure is a stack, which represents the current path
  //  through the tree that we've worked our way down to. For each node in
  //  the stack, there is an array of element ids that represent the ids of
  //  the child elements scanned so far. Upon exit from that element, its
  //  array of child elements is validated.
  //
  //  Since we have the actual XMLElementDecl in the stack nodes, when its time
  //  to validate, we just extract the content model from that element decl
  //  and validate. All the required data falls easily to hand. Note that we
  //  actually have some derivative of XMLElementDecl, which is specific to
  //  the validator used, but the abstract API is sufficient for the needs of
  //  the scanner.
  //
  //  Since the namespace support also requires the storage of information on
  //  a nested element basis, this structure also holds the namespace info. For
  //  each level, the prefixes defined at that level (and the namespaces that
  //  they map to) are stored.
  //
  class XMLPARSER_EXPORT ElemStack
  {
  public :
      // -----------------------------------------------------------------------
      //  Class specific data types
      //
      //  These really should be private, but some of the compilers we have to
      //  support are too dumb to deal with that.
      //
      //  PrefMapElem
      //      fURIId is the id of the URI from the validator's URI map. The
      //      fPrefId is the id of the prefix from our own prefix pool. The
      //      namespace stack consists of these elements.
      //
      //  StackElem
      //      fThisElement is the basic element decl for the current element.
      //      The fRowCapacity is how large fChildIds has grown so far.
      //      fChildCount is how many of them are valid right now.
      //
      //      The fMapCapacity is how large fMap has grown so far. fMapCount
      //      is how many of them are valid right now.
      //
      //      Note that we store the reader number we were in when we found the
      //      start tag. We'll use this at the end tag to test for unbalanced
      //      markup in entities.
      //
      //  MapModes
      //      When a prefix is mapped to a namespace id, it matters whether the
      //      QName being mapped is an attribute or name. Attributes are not
      //      affected by an sibling xmlns attributes, whereas elements are
      //      affected by its own xmlns attributes.
      // -----------------------------------------------------------------------
      struct PrefMapElem
      {
          unsigned int        fPrefId;
          unsigned int        fURIId;
      };
  
      struct StackElem
      {
          XMLElementDecl*     fThisElement;
          unsigned int        fReaderNum;
  
          unsigned int        fChildCapacity;
          unsigned int        fChildCount;
          QName**             fChildren;
  
          PrefMapElem*        fMap;
          unsigned int        fMapCapacity;
          unsigned int        fMapCount;
  
          bool                fValidationFlag;
          int                 fCurrentScope;
          Grammar*            fCurrentGrammar;
          unsigned int        fCurrentURI;
      };
  
      enum MapModes
      {
          Mode_Attribute
          , Mode_Element
      };
  
  
      // -----------------------------------------------------------------------
      //  Constructors and Destructor
      // -----------------------------------------------------------------------
      ElemStack();
      ~ElemStack();
  
  
      // -----------------------------------------------------------------------
      //  Stack access
      // -----------------------------------------------------------------------
      unsigned int addLevel();
      unsigned int addLevel(XMLElementDecl* const toSet, const unsigned int readerNum);
      const StackElem* popTop();
  
  
      // -----------------------------------------------------------------------
      //  Stack top access
      // -----------------------------------------------------------------------
      unsigned int addChild(QName* const child, const bool toParent);
      const StackElem* topElement() const;
      void setElement(XMLElementDecl* const toSet, const unsigned int readerNum);
  
      void setValidationFlag(bool validationFlag);
      bool getValidationFlag();
  
      void setCurrentScope(int currentScope);
      int getCurrentScope();
  
      void setCurrentGrammar(Grammar* currentGrammar);
      Grammar* getCurrentGrammar();
  
      void setCurrentURI(unsigned int uri);
      unsigned int getCurrentURI();
  
      // -----------------------------------------------------------------------
      //  Prefix map methods
      // -----------------------------------------------------------------------
      void addPrefix
      (
          const   XMLCh* const    prefixToAdd
          , const unsigned int    uriId
      );
      unsigned int mapPrefixToURI
      (
          const   XMLCh* const    prefixToMap
          , const MapModes        mode
          ,       bool&           unknown
      )   const;
  
  
      // -----------------------------------------------------------------------
      //  Miscellaneous methods
      // -----------------------------------------------------------------------
      bool isEmpty() const;
      void reset
      (
          const   unsigned int    emptyId
          , const unsigned int    unknownId
          , const unsigned int    xmlId
          , const unsigned int    xmlNSId
      );
  
  
  private :
      // -----------------------------------------------------------------------
      //  Unimplemented constructors and operators
      // -----------------------------------------------------------------------
      ElemStack(const ElemStack&);
      void operator=(const ElemStack&);
  
  
      // -----------------------------------------------------------------------
      //  Private helper methods
      // -----------------------------------------------------------------------
      void expandMap(StackElem* const toExpand);
      void expandStack();
  
  
      // -----------------------------------------------------------------------
      //  Data members
      //
      //  fEmptyNamespaceId
      //      This is the special URI id for the "" namespace, which is magic
      //      because of the xmlns="" operation.
      //
      //  fGlobalPoolId
      //      This is a special URI id that is returned when the namespace
      //      prefix is "" and no one has explicitly mapped that prefix to an
      //      explicit URI (or when they explicitly clear any such mapping,
      //      which they can also do.) And also its prefix pool id, which is
      //      stored here for fast access.
      //
      //  fPrefixPool
      //      This is the prefix pool where prefixes are hashed and given unique
      //      ids. These ids are used to track prefixes in the element stack.
      //
      //  fStack
      //  fStackCapacity
      //  fStackTop
      //      This the stack array. Its an array of pointers to StackElem
      //      structures. The capacity is the current high water mark of the
      //      stack. The top is the current top of stack (i.e. the part of it
      //      being used.)
      //
      //  fUnknownNamespaceId
      //      This is the URI id for the special URI that is assigned to any
      //      prefix which has not been mapped. This lets us keep going after
      //      issuing the error.
      //
      //  fXMLNamespaceId
      //  fXMLPoolId
      //  fXMLNSNamespaceId
      //  fXMLNSPoolId
      //      These are the URI ids for the special URIs that are assigned to
      //      the 'xml' and 'xmlns' namespaces. And also its prefix pool id,
      //      which is stored here for fast access.
      // -----------------------------------------------------------------------
      unsigned int    fEmptyNamespaceId;
      unsigned int    fGlobalPoolId;
      XMLStringPool   fPrefixPool;
      StackElem**     fStack;
      unsigned int    fStackCapacity;
      unsigned int    fStackTop;
      unsigned int    fUnknownNamespaceId;
      unsigned int    fXMLNamespaceId;
      unsigned int    fXMLPoolId;
      unsigned int    fXMLNSNamespaceId;
      unsigned int    fXMLNSPoolId;
  };
  
  
  // ---------------------------------------------------------------------------
  //  ElemStack: Miscellaneous methods
  // ---------------------------------------------------------------------------
  inline bool ElemStack::isEmpty() const
  {
      return (fStackTop == 0);
  }
  
  inline bool ElemStack::getValidationFlag()
  {
      return fStack[fStackTop-1]->fValidationFlag;
  }
  
  inline void ElemStack::setValidationFlag(bool validationFlag)
  {
      fStack[fStackTop-1]->fValidationFlag = validationFlag;
      return;
  }
  
  inline int ElemStack::getCurrentScope()
  {
      return fStack[fStackTop-1]->fCurrentScope;
  }
  
  inline void ElemStack::setCurrentScope(int currentScope)
  {
      fStack[fStackTop-1]->fCurrentScope = currentScope;
      return;
  }
  
  inline Grammar* ElemStack::getCurrentGrammar()
  {
      return fStack[fStackTop-1]->fCurrentGrammar;
  }
  
  inline void ElemStack::setCurrentGrammar(Grammar* currentGrammar)
  {
      fStack[fStackTop-1]->fCurrentGrammar = currentGrammar;
      return;
  }
  
  inline unsigned int ElemStack::getCurrentURI()
  {
      return fStack[fStackTop-1]->fCurrentURI;
  }
  
  inline void ElemStack::setCurrentURI(unsigned int uri)
  {
      fStack[fStackTop-1]->fCurrentURI = uri;
      return;
  }
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/internal/EndOfEntityException.hpp
  
  Index: EndOfEntityException.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: EndOfEntityException.hpp,v $
   * Revision 1.1  2002/10/23 08:55:11  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:21:58  peiyongz
   * sane_include
   *
   * Revision 1.3  2000/02/24 20:18:07  abagchi
   * Swat for removing Log from API docs
   *
   * Revision 1.2  2000/02/06 07:47:53  rahulj
   * Year 2K copyright swat.
   *
   * Revision 1.1.1.1  1999/11/09 01:08:07  twl
   * Initial checkin
   *
   * Revision 1.2  1999/11/08 20:44:42  rahul
   * Swat for adding in Product name and CVS comment log variable.
   *
   */
  
  
  #if !defined(ENDOFENTITYEXCEPTION_HPP)
  #define ENDOFENTITYEXCEPTION_HPP
  
  class XMLEntityDecl;
  
  //
  //  This class is only used internally. Its thrown by the ReaderMgr class,
  //  when an entity ends, and is caught in the scanner. This tells the scanner
  //  that an entity has ended, and allows it to do the right thing according
  //  to what was going on when the entity ended.
  //
  //  Since its internal, it does not bother implementing XMLException.
  //
  class XMLPARSER_EXPORT EndOfEntityException
  {
  public:
      // -----------------------------------------------------------------------
      //  Constructors and Destructor
      // -----------------------------------------------------------------------
      EndOfEntityException(       XMLEntityDecl*  entityThatEnded
                          , const unsigned int    readerNum) :
  
          fEntity(entityThatEnded)
          , fReaderNum(readerNum)
      {
      }
  
      EndOfEntityException(const EndOfEntityException& toCopy) :
  
          fEntity(toCopy.fEntity)
          , fReaderNum(toCopy.fReaderNum)
      {
      }
  
      ~EndOfEntityException()
      {
      }
  
  
      // -----------------------------------------------------------------------
      //  Getter methods
      // -----------------------------------------------------------------------
      XMLEntityDecl& getEntity();
      const XMLEntityDecl& getEntity() const;
      unsigned int getReaderNum() const;
  
  
  private :
      // -----------------------------------------------------------------------
      //  Private data members
      //
      //  fEntity
      //      This is a reference to the entity that ended, causing this
      //      exception.
      //
      //  fReaderNum
      //      The unique reader number of the reader that was handling this
      //      entity. This is used to know whether a particular entity has
      //      ended.
      // -----------------------------------------------------------------------
      XMLEntityDecl*  fEntity;
      unsigned int    fReaderNum;
  };
  
  
  // ---------------------------------------------------------------------------
  //  EndOfEntityException: Getter methods
  // ---------------------------------------------------------------------------
  inline XMLEntityDecl& EndOfEntityException::getEntity()
  {
      return *fEntity;
  }
  
  inline const XMLEntityDecl& EndOfEntityException::getEntity() const
  {
      return *fEntity;
  }
  
  inline unsigned int EndOfEntityException::getReaderNum() const
  {
      return fReaderNum;
  }
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/internal/ReaderMgr.hpp
  
  Index: ReaderMgr.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: ReaderMgr.hpp,v $
   * Revision 1.1  2002/10/23 08:55:11  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:21:58  peiyongz
   * sane_include
   *
   * Revision 1.13  2001/07/12 18:50:08  tng
   * Some performance modification regarding standalone check and xml decl check.
   *
   * Revision 1.12  2000/09/09 00:18:18  andyh
   * Reordered member variables in ThrowEOEJanitor.  Patch submitted
   * by Kirk Wylie.
   *
   * Revision 1.11  2000/07/08 00:17:13  andyh
   * Cleanup of yesterday's speedup changes.  Merged new bit into the
   * scanner character properties table.
   *
   * Revision 1.10  2000/07/07 01:08:44  andyh
   * Parser speed up in scan of XML content.
   *
   * Revision 1.9  2000/03/02 19:54:29  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.8  2000/02/24 20:18:07  abagchi
   * Swat for removing Log from API docs
   *
   * Revision 1.7  2000/02/24 02:12:53  aruna1
   * ReaderMgr:;getReaderDepth() added
   *
   * Revision 1.6  2000/02/06 07:47:53  rahulj
   * Year 2K copyright swat.
   *
   * Revision 1.5  2000/01/25 01:04:21  roddey
   * Fixes a bogus error about ]]> in char data.
   *
   * Revision 1.4  2000/01/24 20:40:43  roddey
   * Exposed the APIs to get to the byte offset in the source XML buffer. This stuff
   * is not tested yet, but I wanted to get the API changes in now so that the API
   * can be stablized.
   *
   * Revision 1.3  2000/01/12 00:15:04  roddey
   * Changes to deal with multiply nested, relative pathed, entities and to deal
   * with the new URL class changes.
   *
   * Revision 1.2  1999/12/15 19:48:03  roddey
   * Changed to use new split of transcoder interfaces into XML transcoders and
   * LCP transcoders, and implementation of intrinsic transcoders as pluggable
   * transcoders, and addition of Latin1 intrinsic support.
   *
   * Revision 1.1.1.1  1999/11/09 01:08:13  twl
   * Initial checkin
   *
   * Revision 1.4  1999/11/08 20:56:54  droddey
   * If the main xml entity does not exist, we need to get the error handling for that
   * inside the main XMLScanner::scanDocument() try block so that it gets reported
   * in the normal way. We have to add a little extra safety code because, when this
   * happens, there is no reader on the reader stack to get position ino from.
   *
   * Revision 1.3  1999/11/08 20:44:43  rahul
   * Swat for adding in Product name and CVS comment log variable.
   *
   */
  
  #if !defined(READERMGR_HPP)
  #define READERMGR_HPP
  
  #include <xercesc/util/RefStackOf.hpp>
  #include <xercesc/util/XMLString.hpp>
  #include <xercesc/sax/Locator.hpp>
  #include <xercesc/framework/XMLBuffer.hpp>
  #include <xercesc/internal/XMLReader.hpp>
  
  class XMLBuffer;
  class XMLEntityDecl;
  class XMLEntityHandler;
  class XMLDocumentHandler;
  class XMLScanner;
  
  
  // ---------------------------------------------------------------------------
  //  This class is used by the scanner. The scanner must deal with expansion
  //  of entities, some of which are totally different files (external parsed
  //  entities.) It does so by pushing readers onto a stack. The top reader is
  //  the one it wants to read out of, but that one must be popped when it is
  //  empty. To keep that logic from being all over the place, the scanner
  //  talks to the reader manager, which handles the stack and popping off
  //  used up readers.
  // ---------------------------------------------------------------------------
  class XMLPARSER_EXPORT ReaderMgr : public Locator
  {
  public :
      // -----------------------------------------------------------------------
      //  Class specific types
      // -----------------------------------------------------------------------
      struct LastExtEntityInfo
      {
          const   XMLCh*          systemId;
          const   XMLCh*          publicId;
                  unsigned int    lineNumber;
                  unsigned int    colNumber;
      };
  
  
      // -----------------------------------------------------------------------
      //  Constructors and Destructor
      // -----------------------------------------------------------------------
      ReaderMgr();
      ~ReaderMgr();
  
  
      // -----------------------------------------------------------------------
      //  Convenience scanning methods
      //
      //  This are all convenience methods that work in terms of the core
      //  character spooling methods.
      // -----------------------------------------------------------------------
      bool atEOF() const;
      bool getName(XMLBuffer& toFill);
      bool getNameToken(XMLBuffer& toFill);
      XMLCh getNextChar();
      bool getNextCharIfNot(const XMLCh chNotToGet, XMLCh& chGotten);
      void movePlainContentChars(XMLBuffer &dest);
      void getSpaces(XMLBuffer& toFill);
      void getUpToCharOrWS(XMLBuffer& toFill, const XMLCh toCheck);
      bool isEmpty() const;
      bool lookingAtChar(const XMLCh toCheck);
      bool lookingAtSpace();
      XMLCh peekNextChar();
      bool skipIfQuote(XMLCh& chGotten);
      void skipPastChar(const XMLCh toSkip);
      bool skipPastSpaces();
      void skipToChar(const XMLCh toSkipTo);
      bool skippedChar(const XMLCh toSkip);
      bool skippedSpace();
      bool skippedString(const XMLCh* const toSkip);
      void skipQuotedString(const XMLCh quoteCh);
      XMLCh skipUntilIn(const XMLCh* const listToSkip);
      XMLCh skipUntilInOrWS(const XMLCh* const listToSkip);
      bool peekString(const XMLCh* const toPeek);
  
  
      // -----------------------------------------------------------------------
      //  Control methods
      // -----------------------------------------------------------------------
      void cleanStackBackTo(const unsigned int readerNum);
      XMLReader* createReader
      (
          const   InputSource&        src
          , const bool                xmlDecl
          , const XMLReader::RefFrom  refFrom
          , const XMLReader::Types    type
          , const XMLReader::Sources  source
      );
      XMLReader* createReader
      (
          const   XMLCh* const        sysId
          , const XMLCh* const        pubId
          , const bool                xmlDecl
          , const XMLReader::RefFrom  refFrom
          , const XMLReader::Types    type
          , const XMLReader::Sources  source
          ,       InputSource*&       srcToFill
      );
      XMLReader* createIntEntReader
      (
          const   XMLCh* const        sysId
          , const XMLReader::RefFrom  refFrom
          , const XMLReader::Types    type
          , const XMLCh* const        dataBuf
          , const unsigned int        dataLen
          , const bool                copyBuf
      );
      bool isScanningPERefOutOfLiteral() const;
      bool pushReader
      (
                  XMLReader* const        reader
          ,       XMLEntityDecl* const    entity
      );
      void reset();
  
  
      // -----------------------------------------------------------------------
      //  Getter methods
      // -----------------------------------------------------------------------
      const XMLCh* getCurrentEncodingStr() const;
      const XMLEntityDecl* getCurrentEntity() const;
      XMLEntityDecl* getCurrentEntity();
      const XMLReader* getCurrentReader() const;
      XMLReader* getCurrentReader();
      unsigned int getCurrentReaderNum() const;
      unsigned int getReaderDepth() const;
      void getLastExtEntityInfo(LastExtEntityInfo& lastInfo) const;
      unsigned int getSrcOffset() const;
      bool getThrowEOE() const;
  
  
      // -----------------------------------------------------------------------
      //  Setter methods
      // -----------------------------------------------------------------------
      void setEntityHandler(XMLEntityHandler* const newHandler);
      void setThrowEOE(const bool newValue);
  
  
      // -----------------------------------------------------------------------
      //  Implement the SAX Locator interface
      // -----------------------------------------------------------------------
      virtual const XMLCh* getPublicId() const;
      virtual const XMLCh* getSystemId() const;
      virtual int getLineNumber() const;
      virtual int getColumnNumber() const;
  
  
  private :
      // -----------------------------------------------------------------------
      //  Private helper methods
      // -----------------------------------------------------------------------
      const XMLReader* getLastExtEntity(const XMLEntityDecl*& itsEntity) const;
      bool popReader();
  
  
      // -----------------------------------------------------------------------
      //  Private data members
      //
      //  fCurEntity
      //      This is the current top of stack entity. We pull it off the stack
      //      and store it here for efficiency.
      //
      //  fCurReader
      //      This is the current top of stack reader. We pull it off the
      //      stack and store it here for efficiency.
      //
      //  fEntityHandler
      //      This is the installed entity handler. Its installed via the
      //      scanner but he passes it on to us since we need it the most, in
      //      process of creating external entity readers.
      //
      //  fEntityStack
      //      We need to keep up with which of the pushed readers are pushed
      //      entity values that are being spooled. This is done to avoid the
      //      problem of recursive definitions. This stack consists of refs to
      //      EntityDecl objects for the pushed entities.
      //
      //  fNextReaderNum
      //      This is the reader serial number value. Each new reader that is
      //      created from this reader is given a successive number. This lets
      //      us catch things like partial markup errors and such.
      //
      //  fReaderStack
      //      This is the stack of reader references. We own all the readers
      //      and destroy them when they are used up.
      //
      //  fThrowEOE
      //      This flag controls whether we throw an exception when we hit an
      //      end of entity. The scanner doesn't really need to know about ends
      //      of entities in the int/ext subsets, so it will turn this flag off
      //      until it gets into the content usually.
      // -----------------------------------------------------------------------
      XMLEntityDecl*              fCurEntity;
      XMLReader*                  fCurReader;
      XMLEntityHandler*           fEntityHandler;
      RefStackOf<XMLEntityDecl>*  fEntityStack;
      unsigned int                fNextReaderNum;
      RefStackOf<XMLReader>*      fReaderStack;
      bool                        fThrowEOE;
  };
  
  
  
  // ---------------------------------------------------------------------------
  //  ReaderMgr: Inlined methods
  //
  //  NOTE: We cannot put these in alphabetical and type order as we usually
  //  do because some of the compilers we have to support are too stupid to
  //  understand out of order inlines!
  // ---------------------------------------------------------------------------
  inline unsigned int ReaderMgr::getCurrentReaderNum() const
  {
      return fCurReader->getReaderNum();
  }
  
  inline bool ReaderMgr::getName(XMLBuffer& toFill)
  {
      toFill.reset();
      return fCurReader->getName(toFill, false);
  }
  
  inline bool ReaderMgr::getNameToken(XMLBuffer& toFill)
  {
      toFill.reset();
      return fCurReader->getName(toFill, true);
  }
  
  inline bool ReaderMgr::getNextCharIfNot(const XMLCh chNotToGet, XMLCh& chGotten)
  {
      return fCurReader->getNextCharIfNot(chNotToGet, chGotten);
  }
  
  inline void ReaderMgr::movePlainContentChars(XMLBuffer &dest)
  {
      fCurReader->movePlainContentChars(dest);
  }
  
  inline bool ReaderMgr::getThrowEOE() const
  {
      return fThrowEOE;
  }
  
  inline unsigned int ReaderMgr::getSrcOffset() const
  {
      return fCurReader->getSrcOffset();
  }
  
  inline bool ReaderMgr::lookingAtChar(const XMLCh chToCheck)
  {
      return (chToCheck == peekNextChar());
  }
  
  inline bool ReaderMgr::lookingAtSpace()
  {
      return XMLReader::isWhitespace(peekNextChar());
  }
  
  inline void ReaderMgr::setThrowEOE(const bool newValue)
  {
      fThrowEOE = newValue;
  }
  
  inline bool ReaderMgr::skippedString(const XMLCh* const toSkip)
  {
      return fCurReader->skippedString(toSkip);
  }
  
  inline void ReaderMgr::skipToChar(const XMLCh toSkipTo)
  {
      while (true)
      {
          // Get chars until we find the one to skip
          const XMLCh nextCh = getNextChar();
  
          // Break out at end of input or the char to skip
          if ((nextCh == toSkipTo) || !nextCh)
              break;
      }
  }
  
  inline void ReaderMgr::skipPastChar(const XMLCh toSkipPast)
  {
      while (true)
      {
          // Get chars until we find the one to skip
          const XMLCh nextCh = getNextChar();
  
          if ((nextCh == toSkipPast) || !nextCh)
              break;
      }
  }
  
  inline bool ReaderMgr::peekString(const XMLCh* const toPeek)
  {
      return fCurReader->peekString(toPeek);
  }
  
  inline void ReaderMgr::setEntityHandler(XMLEntityHandler* const newHandler)
  {
      fEntityHandler = newHandler;
  }
  
  
  //
  //  This is a simple class to temporarily change the 'throw at end of entity'
  //  flag of the reader manager. There are some places where we need to
  //  turn this on and off on a scoped basis.
  //
  class XMLPARSER_EXPORT ThrowEOEJanitor
  {
  public :
      // -----------------------------------------------------------------------
      //  Constructors and destructor
      // -----------------------------------------------------------------------
      ThrowEOEJanitor(ReaderMgr* mgrTarget, const bool newValue) :
  
          fOld(mgrTarget->getThrowEOE())
          , fMgr(mgrTarget)
      {
          mgrTarget->setThrowEOE(newValue);
      }
  
      ~ThrowEOEJanitor()
      {
          fMgr->setThrowEOE(fOld);
      };
  
  private :
      // -----------------------------------------------------------------------
      //  Private data members
      //
      //  fOld
      //      The previous value of the flag, which we replaced during ctor,
      //      and will replace during dtor.
      //
      //  fMgr
      //      A pointer to the reader manager we are going to set/reset the
      //      flag on.
      // -----------------------------------------------------------------------
      bool        fOld;
      ReaderMgr*  fMgr;
  };
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/internal/VecAttrListImpl.hpp
  
  Index: VecAttrListImpl.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: VecAttrListImpl.hpp,v $
   * Revision 1.1  2002/10/23 08:55:11  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:21:58  peiyongz
   * sane_include
   *
   * Revision 1.4  2000/02/24 20:18:07  abagchi
   * Swat for removing Log from API docs
   *
   * Revision 1.3  2000/02/06 07:47:53  rahulj
   * Year 2K copyright swat.
   *
   * Revision 1.2  1999/12/15 19:49:37  roddey
   * Added second getValue() method which takes a short name for the attribute
   * to get the value for. Just a convenience method.
   *
   * Revision 1.1.1.1  1999/11/09 01:08:19  twl
   * Initial checkin
   *
   * Revision 1.2  1999/11/08 20:44:45  rahul
   * Swat for adding in Product name and CVS comment log variable.
   *
   */
  
  
  #if !defined(VECATTRLISTIMPL_HPP)
  #define VECATTRLISTIMPL_HPP
  
  #include <xercesc/sax/AttributeList.hpp>
  #include <xercesc/framework/XMLAttr.hpp>
  #include <xercesc/util/RefVectorOf.hpp>
  
  class XMLPARSER_EXPORT VecAttrListImpl : public AttributeList
  {
  public :
      // -----------------------------------------------------------------------
      //  Constructors and Destructor
      // -----------------------------------------------------------------------
      VecAttrListImpl();
      ~VecAttrListImpl();
  
  
      // -----------------------------------------------------------------------
      //  Implementation of the attribute list interface
      // -----------------------------------------------------------------------
      virtual unsigned int getLength() const;
      virtual const XMLCh* getName(const unsigned int index) const;
      virtual const XMLCh* getType(const unsigned int index) const;
      virtual const XMLCh* getValue(const unsigned int index) const;
      virtual const XMLCh* getType(const XMLCh* const name) const;
      virtual const XMLCh* getValue(const XMLCh* const name) const;
      virtual const XMLCh* getValue(const char* const name) const;
  
  
      // -----------------------------------------------------------------------
      //  Setter methods
      // -----------------------------------------------------------------------
      void setVector
      (
          const   RefVectorOf<XMLAttr>* const srcVec
          , const unsigned int                count
          , const bool                        adopt = false
      );
  
  
  private :
      // -----------------------------------------------------------------------
      //  Unimplemented constructors and operators
      // -----------------------------------------------------------------------
      VecAttrListImpl(const VecAttrListImpl&);
      void operator=(const VecAttrListImpl&);
  
  
      // -----------------------------------------------------------------------
      //  Private data members
      //
      //  fAdopt
      //      Indicates whether the passed vector is to be adopted or not. If
      //      so, we destroy it when we are destroyed (and when a new vector is
      //      set!)
      //
      //  fCount
      //      The count of elements in the vector that should be considered
      //      valid. This is an optimization to allow vector elements to be
      //      reused over and over but a different count of them be valid for
      //      each use.
      //
      //  fVector
      //      The vector that provides the backing for the list.
      // -----------------------------------------------------------------------
      bool                        fAdopt;
      unsigned int                fCount;
      const RefVectorOf<XMLAttr>* fVector;
  };
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/internal/VecAttributesImpl.hpp
  
  Index: VecAttributesImpl.hpp
  ===================================================================
  /*
   * 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/>.
   */
  
  /*
   * $Log: VecAttributesImpl.hpp,v $
   * Revision 1.1  2002/10/23 08:55:11  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:21:58  peiyongz
   * sane_include
   *
   * Revision 1.5  2001/05/11 13:26:16  tng
   * Copyright update.
   *
   * Revision 1.4  2001/03/21 21:56:04  tng
   * Schema: Add Schema Grammar, Schema Validator, and split the DTDValidator into DTDValidator, DTDScanner, and DTDGrammar.
   *
   * Revision 1.3  2001/02/26 19:44:15  tng
   * Schema: add utility class QName, by Pei Yong Zhang.
   *
   * Revision 1.2  2000/08/09 22:11:17  jpolast
   * changes to allow const instances of the sax2
   * Attributes class.
   *
   * Revision 1.1  2000/08/02 18:09:14  jpolast
   * initial checkin: attributes vector needed for
   * Attributes class as defined by sax2 spec
   *
   *
   */
  
  
  #if !defined(VECATTRIBUTESIMPL_HPP)
  #define VECATTRIBUTESIMPL_HPP
  
  #include <xercesc/sax2/Attributes.hpp>
  #include <xercesc/framework/XMLAttr.hpp>
  #include <xercesc/util/RefVectorOf.hpp>
  #include <xercesc/internal/XMLScanner.hpp>
  #include <xercesc/framework/XMLBuffer.hpp>
  
  class XMLPARSER_EXPORT VecAttributesImpl : public Attributes
  {
  public :
      // -----------------------------------------------------------------------
      //  Constructors and Destructor
      // -----------------------------------------------------------------------
      VecAttributesImpl();
      ~VecAttributesImpl();
  
  
      // -----------------------------------------------------------------------
      //  Implementation of the attributes interface
      // -----------------------------------------------------------------------
      virtual unsigned int getLength() const ;
  
  	virtual const XMLCh* getURI(const unsigned int index) const;
      virtual const XMLCh* getLocalName(const unsigned int index) const ;
      virtual const XMLCh* getQName(const unsigned int index) const ;
      virtual const XMLCh* getType(const unsigned int index) const ;
      virtual const XMLCh* getValue(const unsigned int index) const ;
  
  	virtual int getIndex(const XMLCh* const uri, const XMLCh* const localPart ) const  ;
  	virtual int getIndex(const XMLCh* const qName ) const  ;
  
  	virtual const XMLCh* getType(const XMLCh* const uri, const XMLCh* const localPart ) const  ;
      virtual const XMLCh* getType(const XMLCh* const qName) const ;
  
      virtual const XMLCh* getValue(const XMLCh* const qName) const;
  	virtual const XMLCh* getValue(const XMLCh* const uri, const XMLCh* const localPart ) const  ;
  
  
      // -----------------------------------------------------------------------
      //  Setter methods
      // -----------------------------------------------------------------------
      void setVector
      (
          const   RefVectorOf<XMLAttr>* const srcVec
          , const unsigned int                count
  		, const XMLScanner * const		scanner
          , const bool                        adopt = false
      );
  
  private :
      // -----------------------------------------------------------------------
      //  Unimplemented constructors and operators
      // -----------------------------------------------------------------------
      VecAttributesImpl(const VecAttributesImpl&);
      void operator=(const VecAttributesImpl&);
  
  
      // -----------------------------------------------------------------------
      //  Private data members
      //
      //  fAdopt
      //      Indicates whether the passed vector is to be adopted or not. If
      //      so, we destroy it when we are destroyed (and when a new vector is
      //      set!)
      //
      //  fCount
      //      The count of elements in the vector that should be considered
      //      valid. This is an optimization to allow vector elements to be
      //      reused over and over but a different count of them be valid for
      //      each use.
      //
      //  fVector
      //      The vector that provides the backing for the list.
  	//
  	//	fScanner
  	//		This is a pointer to the in use Scanner, so that we can resolve
  	//		namespace URIs from UriIds
  	//
  	//	fURIBuffer
  	//		A temporary buffer which is re-used when getting namespace URI's
      // -----------------------------------------------------------------------
      bool                        fAdopt;
      unsigned int                fCount;
      const RefVectorOf<XMLAttr>* fVector;
  	const XMLScanner *		fScanner ;
  	//XMLBuffer				    fURIBuffer ;
  };
  
  #endif // ! VECATTRIBUTESIMPL_HPP
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/internal/XMLInternalErrorHandler.hpp
  
  Index: XMLInternalErrorHandler.hpp
  ===================================================================
  
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 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/>.
   */
  
  /*
   * $Log: XMLInternalErrorHandler.hpp,v $
   * Revision 1.1  2002/10/23 08:55:11  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:21:58  peiyongz
   * sane_include
   *
   * Revision 1.1  2001/07/26 17:04:10  tng
   * Schema: Process should stop after fatal error, and user throws need to be rethrown.
   *
   */
  
  #include <xercesc/util/XercesDefs.hpp>
  #include <xercesc/sax/ErrorHandler.hpp>
  
  class XMLInternalErrorHandler : public ErrorHandler
  {
  public:
      // -----------------------------------------------------------------------
      //  Constructors and Destructor
      // -----------------------------------------------------------------------
      XMLInternalErrorHandler(ErrorHandler* userHandler = 0) :
         fSawWarning(false),
         fSawError(false),
         fSawFatal(false),
         fUserErrorHandler(userHandler)
      {
      }
  
      ~XMLInternalErrorHandler()
      {
      }
  
      // -----------------------------------------------------------------------
      //  Implementation of the error handler interface
      // -----------------------------------------------------------------------
      void warning(const SAXParseException& toCatch);
      void error(const SAXParseException& toCatch);
      void fatalError(const SAXParseException& toCatch);
      void resetErrors();
  
      // -----------------------------------------------------------------------
      //  Getter methods
      // -----------------------------------------------------------------------
      bool getSawWarning() const;
      bool getSawError() const;
      bool getSawFatal() const;
  
      // -----------------------------------------------------------------------
      //  Private data members
      //
      //  fSawWarning
      //      This is set if we get any warning, and is queryable via a getter
      //      method.
      //
      //  fSawError
      //      This is set if we get any errors, and is queryable via a getter
      //      method.
      //
      //  fSawFatal
      //      This is set if we get any fatal, and is queryable via a getter
      //      method.
      //
      //  fUserErrorHandler
      //      This is the error handler from user
      // -----------------------------------------------------------------------
      bool    fSawWarning;
      bool    fSawError;
      bool    fSawFatal;
      ErrorHandler* fUserErrorHandler;
  };
  
  inline bool XMLInternalErrorHandler::getSawWarning() const
  {
      return fSawWarning;
  }
  
  inline bool XMLInternalErrorHandler::getSawError() const
  {
      return fSawError;
  }
  
  inline bool XMLInternalErrorHandler::getSawFatal() const
  {
      return fSawFatal;
  }
  
  inline void XMLInternalErrorHandler::warning(const SAXParseException& toCatch)
  {
      fSawWarning = true;
      if (fUserErrorHandler)
          fUserErrorHandler->warning(toCatch);
  }
  
  inline void XMLInternalErrorHandler::error(const SAXParseException& toCatch)
  {
      fSawError = true;
      if (fUserErrorHandler)
          fUserErrorHandler->error(toCatch);
  }
  
  inline void XMLInternalErrorHandler::fatalError(const SAXParseException& toCatch)
  {
      fSawFatal = true;
      if (fUserErrorHandler)
          fUserErrorHandler->fatalError(toCatch);
  }
  
  inline void XMLInternalErrorHandler::resetErrors()
  {
      fSawWarning = false;
      fSawError = false;
      fSawFatal = false;
  }
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/internal/XMLReader.hpp
  
  Index: XMLReader.hpp
  ===================================================================
  /*
   * 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/>.
   */
  
  /*
   * $Log: XMLReader.hpp,v $
   * Revision 1.1  2002/10/23 08:55:11  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:22:02  peiyongz
   * sane_include
   *
   * Revision 1.18  2001/12/06 17:47:04  tng
   * Performance Enhancement.  Modify the handling of the fNEL option so that it results in fgCharCharsTable being modified, instead of having all of the low-level routines check the option.  This seemed acceptable because the code appears to only permit the option to be turned on and not turned off again.   By Henry Zongaro.
   *
   * Revision 1.17  2001/07/12 18:50:13  tng
   * Some performance modification regarding standalone check and xml decl check.
   *
   * Revision 1.16  2001/05/11 13:26:17  tng
   * Copyright update.
   *
   * Revision 1.15  2001/05/03 18:42:51  knoaman
   * Added new option to the parsers so that the NEL (0x85) char can be treated as a newline character.
   *
   * Revision 1.14  2001/01/25 19:16:58  tng
   * const should be used instead of static const.  Fixed by Khaled Noaman.
   *
   * Revision 1.13  2000/07/25 22:33:05  aruna1
   * Char definitions in XMLUni moved to XMLUniDefs
   *
   * Revision 1.12  2000/07/08 00:17:13  andyh
   * Cleanup of yesterday's speedup changes.  Merged new bit into the
   * scanner character properties table.
   *
   * Revision 1.11  2000/07/07 01:08:44  andyh
   * Parser speed up in scan of XML content.
   *
   * Revision 1.10  2000/07/06 21:00:52  jpolast
   * inlined getNextCharIfNot() for better performance
   *
   * Revision 1.9  2000/05/11 23:11:33  andyh
   * Add missing validity checks for stand-alone documents, character range
   * and Well-formed parsed entities.  Changes contributed by Sean MacRoibeaird
   * <sean.Macroibeaird@ireland.sun.com>
   *
   * Revision 1.8  2000/03/02 19:54:29  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:18:07  abagchi
   * Swat for removing Log from API docs
   *
   * Revision 1.6  2000/02/06 07:47:53  rahulj
   * Year 2K copyright swat.
   *
   * Revision 1.5  2000/01/25 01:04:21  roddey
   * Fixes a bogus error about ]]> in char data.
   *
   * Revision 1.4  2000/01/22 00:01:08  roddey
   * Simple change to get rid of two hard coded 'x' type characters, which won't
   * work on EBCDIC systems.
   *
   * Revision 1.3  1999/12/18 00:20:00  roddey
   * More changes to support the new, completely orthagonal, support for
   * intrinsic encodings.
   *
   * Revision 1.2  1999/12/15 19:48:03  roddey
   * Changed to use new split of transcoder interfaces into XML transcoders and
   * LCP transcoders, and implementation of intrinsic transcoders as pluggable
   * transcoders, and addition of Latin1 intrinsic support.
   *
   * Revision 1.1.1.1  1999/11/09 01:08:22  twl
   * Initial checkin
   *
   * Revision 1.3  1999/11/08 20:44:47  rahul
   * Swat for adding in Product name and CVS comment log variable.
   *
   */
  
  #if !defined(XMLREADER_HPP)
  #define XMLREADER_HPP
  
  #include <xercesc/util/XMLUniDefs.hpp>
  #include <xercesc/framework/XMLRecognizer.hpp>
  #include <xercesc/framework/XMLBuffer.hpp>
  #include <xercesc/util/XMLUniDefs.hpp>
  
  class InputSource;
  class BinInputStream;
  class ReaderMgr;
  class XMLBuffer;
  class XMLScanner;
  class XMLTranscoder;
  
  
  // Masks for the fgCharCharsTable array
  const XMLByte   gBaseCharMask               = 0x1;
  const XMLByte   gSpecialCharDataMask        = 0x2;
  const XMLByte   gNameCharMask               = 0x4;
  const XMLByte   gPlainContentCharMask       = 0x8;
  const XMLByte   gSpecialStartTagCharMask    = 0x10;
  const XMLByte   gLetterCharMask             = 0x20;
  const XMLByte   gXMLCharMask                = 0x40;
  const XMLByte   gWhitespaceCharMask         = 0x80;
  
  
  // ---------------------------------------------------------------------------
  //  Instances of this class are used to manage the content of entities. The
  //  scanner maintains a stack of these, one for each entity (this means entity
  //  in the sense of any parsed file or internal entity) currently being
  //  scanned. This class, given a binary input stream will handle reading in
  //  the data and decoding it from its external decoding into the internal
  //  Unicode format. Once internallized, this class provides the access
  //  methods to read in the data in various ways, maintains line and column
  //  information, and provides high performance character attribute checking
  //  methods.
  //
  //  This is NOT to be derived from.
  //
  // ---------------------------------------------------------------------------
  class XMLPARSER_EXPORT XMLReader
  {
  public:
      // -----------------------------------------------------------------------
      //  Public types
      // -----------------------------------------------------------------------
      enum Types
      {
          Type_PE
          , Type_General
      };
  
      enum Sources
      {
          Source_Internal
          , Source_External
      };
  
      enum RefFrom
      {
          RefFrom_Literal
          , RefFrom_NonLiteral
      };
  
  
      // -----------------------------------------------------------------------
      //  Public, static methods
      // -----------------------------------------------------------------------
      static bool isAllSpaces
      (
          const   XMLCh* const    toCheck
          , const unsigned int    count
      );
  
      static bool containsWhiteSpace
      (
          const   XMLCh* const    toCheck
          , const unsigned int    count
      );
  
  
      static bool isBaseChar(const XMLCh toCheck);
      static bool isFirstNameChar(const XMLCh toCheck);
      static bool isNameChar(const XMLCh toCheck);
      static bool isPlainContentChar(const XMLCh toCheck);
      static bool isPublicIdChar(const XMLCh toCheck);
      static bool isSpecialCharDataChar(const XMLCh toCheck);
      static bool isSpecialStartTagChar(const XMLCh toCheck);
      static bool isXMLLetter(const XMLCh toCheck);
      static bool isXMLChar(const XMLCh toCheck);
      static bool isWhitespace(const XMLCh toCheck);
  
      /**
        * Return the value of fgNEL flag.
        */
      static bool isNELRecognized();
  
  
      // -----------------------------------------------------------------------
      //  Constructors and Destructor
      // -----------------------------------------------------------------------
      XMLReader
      (
          const   XMLCh* const                pubId
          , const XMLCh* const                sysId
          ,       BinInputStream* const       streamToAdopt
          , const RefFrom                     from
          , const Types                       type
          , const Sources                     source
          , const bool                        throwAtEnd = false
      );
  
      XMLReader
      (
          const   XMLCh* const                pubId
          , const XMLCh* const                sysId
          ,       BinInputStream* const       streamToAdopt
          , const XMLCh* const                encodingStr
          , const RefFrom                     from
          , const Types                       type
          , const Sources                     source
          , const bool                        throwAtEnd = false
      );
  
      ~XMLReader();
  
  
      // -----------------------------------------------------------------------
      //  Character buffer management methods
      // -----------------------------------------------------------------------
      unsigned long charsLeftInBuffer() const;
      bool refreshCharBuffer();
  
  
      // -----------------------------------------------------------------------
      //  Scanning methods
      // -----------------------------------------------------------------------
      bool getName(XMLBuffer& toFill, const bool token);
      bool getNextChar(XMLCh& chGotten);
      bool getNextCharIfNot(const XMLCh chNotToGet, XMLCh& chGotten);
      void movePlainContentChars(XMLBuffer &dest);
      bool getSpaces(XMLBuffer& toFill);
      bool getUpToCharOrWS(XMLBuffer& toFill, const XMLCh toCheck);
      bool peekNextChar(XMLCh& chGotten);
      bool skipIfQuote(XMLCh& chGotten);
      bool skipSpaces(bool& skippedSomething);
      bool skippedChar(const XMLCh toSkip);
      bool skippedSpace();
      bool skippedString(const XMLCh* const toSkip);
      bool peekString(const XMLCh* const toPeek);
  
  
      // -----------------------------------------------------------------------
      //  Getter methods
      // -----------------------------------------------------------------------
      unsigned int getColumnNumber() const;
      const XMLCh* getEncodingStr() const;
      unsigned int getLineNumber() const;
      bool getNoMoreFlag() const;
      const XMLCh* getPublicId() const;
      unsigned int getReaderNum() const;
      RefFrom getRefFrom() const;
      Sources getSource() const;
      unsigned int getSrcOffset() const;
      const XMLCh* getSystemId() const;
      bool getThrowAtEnd() const;
      Types getType() const;
  
  
      // -----------------------------------------------------------------------
      //  Setter methods
      // -----------------------------------------------------------------------
      bool setEncoding
      (
          const   XMLCh* const    newEncoding
      );
      void setReaderNum(const unsigned int newNum);
      void setThrowAtEnd(const bool newValue);
  
  
  private:
      // ---------------------------------------------------------------------------
      //  Class Constants
      //
      //  kCharBufSize
      //      The size of the character spool buffer that we use. Its not terribly
      //      large because its just getting filled with data from a raw byte
      //      buffer as we go along. We don't want to decode all the text at
      //      once before we find out that there is an error.
      //
      //      NOTE: This is a size in characters, not bytes.
      //
      //  kRawBufSize
      //      The size of the raw buffer from which raw bytes are spooled out
      //      as we transcode chunks of data. As it is emptied, it is filled back
      //      in again from the source stream.
      // ---------------------------------------------------------------------------
      enum Constants
      {
          kCharBufSize        = 16 * 1024
          , kRawBufSize       = 48 * 1024
      };
  
  
      // -----------------------------------------------------------------------
      //  Private static methods
      // -----------------------------------------------------------------------
      static bool checkTable
      (
          const   XMLCh* const    theTable
          , const XMLCh           toCheck
      );
  
  
      /**
        * Method to enable NEL char to be treated as white space char.
        */
      static void enableNELWS();
  
      // -----------------------------------------------------------------------
      //  Private helper methods
      // -----------------------------------------------------------------------
      void checkForSwapped();
  
      void doInitCharSizeChecks();
  
      void doInitDecode();
  
      XMLByte getNextRawByte
      (
          const   bool            eoiOk
      );
  
      void refreshRawBuffer();
  
      void setTranscoder
      (
          const   XMLCh* const    newEncoding
      );
  
      unsigned int xcodeMoreChars
      (
                  XMLCh* const            bufToFill
          ,       unsigned char* const    charSizes
          , const unsigned int            maxChars
      );
  
  
      // -----------------------------------------------------------------------
      //  Data members
      //
      //  fCharIndex
      //      The index into the character buffer. When this hits fCharsAvail
      //      then its time to refill.
      //
      //  fCharBuf
      //      A buffer that the reader manager fills up with transcoded
      //      characters a small amount at a time.
      //
      //  fCharsAvail
      //      The characters currently available in the character buffer.
      //
      //  fCharSizeBuf
      //      This buffer is an array that contains the number of source chars
      //      eaten to create each char in the fCharBuf buffer. So the entry
      //      fCharSizeBuf[x] is the number of source chars that were eaten
      //      to make the internalized char fCharBuf[x]. This only contains
      //      useful data if fSrcOfsSupported is true.
      //
      //  fCurCol
      //  fCurLine
      //      The current line and column that we are in within this reader's
      //      text.
      //
      //  fEncoding
      //      This is the rough encoding setting. This enum is set during
      //      construction and just tells us the rough family of encoding that
      //      we are doing.
      //
      //  fEncodingStr
      //      This is the name of the encoding we are using. It will be
      //      provisionally set during construction, from the auto-sensed
      //      encoding. But it might be overridden when the XMLDecl is finally
      //      seen by the scanner. It can also be forced to a particular
      //      encoding, in which case fForcedEncoding is set.
      //
      //  fForcedEncoding
      //      If the encoding if forced then this is set and all other
      //      information will be ignored. This encoding will be taken as
      //      gospel. This is done by calling an alternate constructor.
      //
      //  fNoMore
      //      This is set when the source text is exhausted. It lets us know
      //      quickly that no more text is available.
      //
      //  fRawBufIndex
      //      The current index into the raw byte buffer. When its equal to
      //      fRawBytesAvail then we need to read another buffer.
      //
      //  fRawByteBuf
      //      This is the raw byte buffer that is used to spool out bytes
      //      from into the fCharBuf buffer, as we transcode in blocks.
      //
      //  fRawBytesAvail
      //      The number of bytes currently available in the raw buffer. This
      //      helps deal with the last buffer's worth, which will usually not
      //      be a full one.
      //
      //  fReaderNum
      //      Each reader from a particular reader manager (which means from a
      //      particular document) is given a unique number. The reader manager
      //      sets these numbers. They are used to catch things like partial
      //      markup errors.
      //
      //  fRefFrom
      //      This flag is provided in the ctor, and tells us if we represent
      //      some entity being expanded inside a literal. Sometimes things
      //      happen differently inside and outside literals.
      //
      //  fPublicId
      //  fSystemId
      //      These are the system and public ids of the source that this
      //      reader is reading.
      //
      //  fSentTrailingSpace
      //      If we are a PE entity being read and we not referenced from a
      //      literal, then a leading and trailing space must be faked into the
      //      data. This lets us know we've done the trailing space already (so
      //      we don't just keep doing it again and again.)
      //
      //  fSource
      //      Indicates whether the content this reader is spooling as already
      //      been internalized. This will prevent multiple processing of
      //      whitespace when an already internalized entity is being spooled
      //      out.
      //
      //  fSpareChar
      //      Some encodings can create two chars in an atomic way, e.g.
      //      surrogate pairs. We might not be able to store both, so we store
      //      it here until the next buffer transcoding operation.
      //
      //  fSrcOfsBase
      //      This is the base offset within the source of this entity. Values
      //      in the curent fCharSizeBuf array are relative to this value.
      //
      //  fSrcOfsSupported
      //      This flag is set to indicate whether source byte offset info
      //      is supported. For intrinsic encodings, its always set since we
      //      can always support it. For transcoder based encodings, we ask
      //      the transcoder if it supports it or not.
      //
      //  fStream
      //      This is the input stream that provides the data for the reader.
      //      Its always treated as a raw byte stream. The derived class will
      //      ask for buffers of text from it and will handle making some
      //      sense of it.
      //
      //  fSwapped
      //      If the encoding is one of the ones we do intrinsically, and its
      //      in a different byte order from our native order, then this is
      //      set to remind us to byte swap it during transcoding.
      //
      //  fThrowAtEnd
      //      Indicates whether the reader manager should throw an end of entity
      //      exception at the end of this reader instance. This is usually
      //      set for top level external entity references. It overrides the
      //      reader manager's global flag that controls throwing at the end
      //      of entities. Defaults to false.
      //
      //  fTranscoder
      //      If the encoding is not one that we handle intrinsically, then
      //      we use an an external transcoder to do it. This class is an
      //      abstraction that allows us to use pluggable external transcoding
      //      services (via XMLTransService in util.)
      //
      //  fType
      //      Indicates whether this reader represents a PE or not. If this
      //      flag is true and the fInLiteral flag is false, then we will put
      //      out an extra space at the end.
      // -----------------------------------------------------------------------
      unsigned int                fCharIndex;
      XMLCh                       fCharBuf[kCharBufSize];
      unsigned int                fCharsAvail;
      unsigned char               fCharSizeBuf[kCharBufSize];
      unsigned int                fCurCol;
      unsigned int                fCurLine;
      XMLRecognizer::Encodings    fEncoding;
      XMLCh*                      fEncodingStr;
      bool                        fForcedEncoding;
      bool                        fNoMore;
      XMLCh*                      fPublicId;
      unsigned int                fRawBufIndex;
      XMLByte                     fRawByteBuf[kRawBufSize];
      unsigned int                fRawBytesAvail;
      unsigned int                fReaderNum;
      RefFrom                     fRefFrom;
      bool                        fSentTrailingSpace;
      Sources                     fSource;
      XMLCh                       fSpareCh;
      unsigned int                fSrcOfsBase;
      bool                        fSrcOfsSupported;
      XMLCh*                      fSystemId;
      BinInputStream*             fStream;
      bool                        fSwapped;
      bool                        fThrowAtEnd;
      XMLTranscoder*              fTranscoder;
      Types                       fType;
  
  
      // -----------------------------------------------------------------------
      //  Static data members
      //
      //  fgCharCharsTable
      //      The character characteristics table. Bits in each byte, represent
      //      the characteristics of each character. It is generated via some
      //      code and then hard coded into the cpp file for speed.
      //
      //  fNEL
      //      Flag to respresents whether NEL whitespace recognition is enabled
      //      or disabled
      // -----------------------------------------------------------------------
      static XMLByte  fgCharCharsTable[0x10000];
      static bool     fNEL;
  
      friend class XMLPlatformUtils;
  };
  
  
  // ---------------------------------------------------------------------------
  //  XMLReader: Public, static methods
  // ---------------------------------------------------------------------------
  inline bool XMLReader::isBaseChar(const XMLCh toCheck)
  {
      return ((fgCharCharsTable[toCheck] & gBaseCharMask) != 0);
  }
  
  inline bool XMLReader::isNameChar(const XMLCh toCheck)
  {
      return ((fgCharCharsTable[toCheck] & gNameCharMask) != 0);
  }
  
  inline bool XMLReader::isPlainContentChar(const XMLCh toCheck)
  {
      return ((fgCharCharsTable[toCheck] & gPlainContentCharMask) != 0);
  }
  
  
  inline bool XMLReader::isSpecialCharDataChar(const XMLCh toCheck)
  {
      return ((fgCharCharsTable[toCheck] & gSpecialCharDataMask) != 0);
  }
  
  inline bool XMLReader::isSpecialStartTagChar(const XMLCh toCheck)
  {
      return ((fgCharCharsTable[toCheck] & gSpecialStartTagCharMask) != 0);
  }
  
  inline bool XMLReader::isXMLChar(const XMLCh toCheck)
  {
      return ((fgCharCharsTable[toCheck] & gXMLCharMask) != 0);
  }
  
  inline bool XMLReader::isXMLLetter(const XMLCh toCheck)
  {
      const XMLByte ourMask = gBaseCharMask | gLetterCharMask;
      return ((fgCharCharsTable[toCheck] & ourMask) != 0);
  }
  
  inline bool XMLReader::isWhitespace(const XMLCh toCheck)
  {
      return ((fgCharCharsTable[toCheck] & gWhitespaceCharMask) != 0);
  }
  
  // ---------------------------------------------------------------------------
  //  XMLReader: Buffer management methods
  // ---------------------------------------------------------------------------
  inline unsigned long XMLReader::charsLeftInBuffer() const
  {
      return fCharsAvail - fCharIndex;
  }
  
  
  // ---------------------------------------------------------------------------
  //  XMLReader: Getter methods
  // ---------------------------------------------------------------------------
  inline unsigned int XMLReader::getColumnNumber() const
  {
      return fCurCol;
  }
  
  inline const XMLCh* XMLReader::getEncodingStr() const
  {
      return fEncodingStr;
  }
  
  inline unsigned int XMLReader::getLineNumber() const
  {
      return fCurLine;
  }
  
  inline bool XMLReader::getNoMoreFlag() const
  {
      return fNoMore;
  }
  
  inline const XMLCh* XMLReader::getPublicId() const
  {
      return fPublicId;
  }
  
  inline unsigned int XMLReader::getReaderNum() const
  {
      return fReaderNum;
  }
  
  inline XMLReader::RefFrom XMLReader::getRefFrom() const
  {
      return fRefFrom;
  }
  
  inline XMLReader::Sources XMLReader::getSource() const
  {
      return fSource;
  }
  
  inline const XMLCh* XMLReader::getSystemId() const
  {
      return fSystemId;
  }
  
  inline bool XMLReader::getThrowAtEnd() const
  {
      return fThrowAtEnd;
  }
  
  inline XMLReader::Types XMLReader::getType() const
  {
      return fType;
  }
  
  inline bool XMLReader::isNELRecognized() {
  
      return fNEL;
  }
  
  // ---------------------------------------------------------------------------
  //  XMLReader: Setter methods
  // ---------------------------------------------------------------------------
  inline void XMLReader::setReaderNum(const unsigned int newNum)
  {
      fReaderNum = newNum;
  }
  
  inline void XMLReader::setThrowAtEnd(const bool newValue)
  {
      fThrowAtEnd = newValue;
  }
  
  
  
  // ---------------------------------------------------------------------------
  //
  //  XMLReader: movePlainContentChars()
  //
  //       Move as many plain (no special handling of any sort required) content
  //       characters as possible from this reader to the supplied destination buffer.
  //
  //       This is THE hottest performance spot in the parser.
  //
  // ---------------------------------------------------------------------------
  inline void XMLReader::movePlainContentChars(XMLBuffer &dest)
  {
      int count = 0;
      XMLCh *pStart = &fCharBuf[fCharIndex];
      XMLCh *pCurrent = pStart;
      XMLCh *pEnd     = &fCharBuf[fCharsAvail];
  
  
      while (pCurrent < pEnd)
      {
          if (! XMLReader::isPlainContentChar(*pCurrent++))
              break;
          count++;
      }
  
      if (count > 0)
      {
          fCharIndex += count;
          fCurCol    += count;
          dest.append(pStart, count);
      }
  }
  
  
  
  
  // ---------------------------------------------------------------------------
  //  XMLReader: getNextCharIfNot() method inlined for speed
  // ---------------------------------------------------------------------------
  inline bool XMLReader::getNextCharIfNot(const XMLCh chNotToGet, XMLCh& chGotten)
  {
      //
      //  See if there is at least a char in the buffer. Else, do the buffer
      //  reload logic.
      //
      if (fCharIndex < fCharsAvail)
      {
          // Check the next char
          if (fCharBuf[fCharIndex] == chNotToGet)
              return false;
  
          // Its not the one we want to skip so bump the index
          chGotten = fCharBuf[fCharIndex++];
      }
       else
      {
          // If fNoMore is set, then we have nothing else to give
          if (fNoMore)
              return false;
  
          // If the buffer is empty, then try to refresh
          if (fCharIndex == fCharsAvail)
          {
              if (!refreshCharBuffer())
              {
                  // If still empty, then return false
                  if (fCharIndex == fCharsAvail)
                      return false;
              }
          }
  
          // Check the next char
          if (fCharBuf[fCharIndex] == chNotToGet)
              return false;
  
          // Its not the one we want to skip so bump the index
          chGotten = fCharBuf[fCharIndex++];
      }
  
      // Handle end of line normalization and line/col member maintenance.
      if (chGotten == chCR)
      {
          //
          //  Do the normalization. We return chLF regardless of which was
          //  found. We also eat a chCR followed by an chLF.
          //
          //  We only do this if the content being spooled is not already
          //  internalized.
          //
          if (fSource == Source_External)
          {
              //
              //  See if we have another char left. If not, don't bother.
              //  Else, see if its an chLF to eat. If it is, bump the
              //  index again.
              //
              if (fCharIndex < fCharsAvail)
              {
                  if (fCharBuf[fCharIndex] == chLF
                      || ((fCharBuf[fCharIndex] == chNEL) && fNEL))
                      fCharIndex++;
              }
               else
              {
                  if (refreshCharBuffer())
                  {
                      if (fCharBuf[fCharIndex] == chLF
                          || ((fCharBuf[fCharIndex] == chNEL) && fNEL))
                          fCharIndex++;
                  }
              }
  
              // And return just an chLF
              chGotten = chLF;
          }
  
          // And handle the line/col stuff
          fCurCol = 1;
          fCurLine++;
      }
       else if (chGotten == chLF
                || ((chGotten == chNEL) && fNEL))
      {
          chGotten = chLF;
          fCurLine++;
          fCurCol = 1;
      }
       else if (chGotten)
      {
          //
          //  Only do this is not a null char. Null chars are not part of the
          //  real content. They are just marker characters inserted into
          //  the stream.
          //
          fCurCol++;
      }
      return true;
  }
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/internal/XMLScanner.hpp
  
  Index: XMLScanner.hpp
  ===================================================================
  /*
   * 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/>.
   */
  
  /*
   * $Log: XMLScanner.hpp,v $
   * Revision 1.1  2002/10/23 08:55:11  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:22:03  peiyongz
   * sane_include
   *
   * Revision 1.38  2001/11/30 22:19:15  peiyongz
   * cleanUp function made member function
   * cleanUp object moved to file scope
   *
   * Revision 1.37  2001/11/20 18:51:44  tng
   * Schema: schemaLocation and noNamespaceSchemaLocation to be specified outside the instance document.  New methods setExternalSchemaLocation and setExternalNoNamespaceSchemaLocation are added (for SAX2, two new properties are added).
   *
   * Revision 1.36  2001/11/13 13:27:28  tng
   * Move root element check to XMLScanner.
   *
   * Revision 1.35  2001/11/02 14:20:14  knoaman
   * Add support for identity constraints.
   *
   * Revision 1.34  2001/10/12 20:52:18  tng
   * Schema: Find the attributes see if they should be (un)qualified.
   *
   * Revision 1.33  2001/09/10 15:16:04  tng
   * Store the fGrammarType instead of calling getGrammarType all the time for faster performance.
   *
   * Revision 1.32  2001/09/10 14:06:22  tng
   * Schema: AnyAttribute support in Scanner and Validator.
   *
   * Revision 1.31  2001/08/13 15:06:39  knoaman
   * update <any> validation.
   *
   * Revision 1.30  2001/08/02 16:54:39  tng
   * Reset some Scanner flags in scanReset().
   *
   * Revision 1.29  2001/08/01 19:11:01  tng
   * Add full schema constraint checking flag to the samples and the parser.
   *
   * Revision 1.28  2001/07/24 21:23:39  tng
   * Schema: Use DatatypeValidator for ID/IDREF/ENTITY/ENTITIES/NOTATION.
   *
   * Revision 1.27  2001/07/13 16:56:48  tng
   * ScanId fix.
   *
   * Revision 1.26  2001/07/12 18:50:17  tng
   * Some performance modification regarding standalone check and xml decl check.
   *
   * Revision 1.25  2001/07/10 21:09:31  tng
   * Give proper error messsage when scanning external id.
   *
   * Revision 1.24  2001/07/09 13:42:08  tng
   * Partial Markup in Parameter Entity is validity constraint and thus should be just error, not fatal error.
   *
   * Revision 1.23  2001/07/05 13:12:11  tng
   * Standalone checking is validity constraint and thus should be just error, not fatal error:
   *
   * Revision 1.22  2001/06/22 12:42:33  tng
   * [Bug 2257] 1.5 thinks a <?xml-stylesheet ...> tag is a <?xml ...> tag
   *
   * Revision 1.21  2001/06/04 20:59:29  jberry
   * Add method incrementErrorCount for use by validator. Make sure to reset error count in _both_ the scanReset methods.
   *
   * Revision 1.20  2001/06/03 19:21:40  jberry
   * Add support for tracking error count during parse; enables simple parse without requiring error handler.
   *
   * Revision 1.19  2001/05/28 20:55:02  tng
   * Schema: allocate a fDTDValidator, fSchemaValidator explicitly to avoid wrong cast
   *
   * Revision 1.18  2001/05/11 15:17:28  tng
   * Schema: Nillable fixes.
   *
   * Revision 1.17  2001/05/11 13:26:17  tng
   * Copyright update.
   *
   * Revision 1.16  2001/05/03 20:34:29  tng
   * Schema: SchemaValidator update
   *
   * Revision 1.15  2001/05/03 19:09:09  knoaman
   * Support Warning/Error/FatalError messaging.
   * Validity constraints errors are treated as errors, with the ability by user to set
   * validity constraints as fatal errors.
   *
   * Revision 1.14  2001/04/19 18:16:59  tng
   * Schema: SchemaValidator update, and use QName in Content Model
   *
   * Revision 1.13  2001/03/30 16:46:56  tng
   * Schema: Use setDoSchema instead of setSchemaValidation which makes more sense.
   *
   * Revision 1.12  2001/03/30 16:35:06  tng
   * Schema: Whitespace normalization.
   *
   * Revision 1.11  2001/03/21 21:56:05  tng
   * Schema: Add Schema Grammar, Schema Validator, and split the DTDValidator into DTDValidator, DTDScanner, and DTDGrammar.
   *
   * Revision 1.10  2001/02/15 15:56:27  tng
   * Schema: Add setSchemaValidation and getSchemaValidation for DOMParser and SAXParser.
   * Add feature "http://apache.org/xml/features/validation/schema" for SAX2XMLReader.
   * New data field  fSchemaValidation in XMLScanner as the flag.
   *
   * Revision 1.9  2000/04/12 22:58:28  roddey
   * Added support for 'auto validate' mode.
   *
   * Revision 1.8  2000/03/03 01:29:32  roddey
   * Added a scanReset()/parseReset() method to the scanner and
   * parsers, to allow for reset after early exit from a progressive parse.
   * Added calls to new Terminate() call to all of the samples. Improved
   * documentation in SAX and DOM parsers.
   *
   * Revision 1.7  2000/03/02 19:54:30  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:18:07  abagchi
   * Swat for removing Log from API docs
   *
   * Revision 1.5  2000/02/06 07:47:54  rahulj
   * Year 2K copyright swat.
   *
   * Revision 1.4  2000/01/24 20:40:43  roddey
   * Exposed the APIs to get to the byte offset in the source XML buffer. This stuff
   * is not tested yet, but I wanted to get the API changes in now so that the API
   * can be stablized.
   *
   * Revision 1.3  2000/01/12 23:52:46  roddey
   * These are trivial changes required to get the C++ and Java versions
   * of error messages more into sync. Mostly it was where the Java version
   * was passing out one or more parameter than the C++ version was. In
   * some cases the change just required an extra parameter to get the
   * needed info to the place where the error was issued.
   *
   * Revision 1.2  2000/01/12 00:15:04  roddey
   * Changes to deal with multiply nested, relative pathed, entities and to deal
   * with the new URL class changes.
   *
   * Revision 1.1.1.1  1999/11/09 01:08:23  twl
   * Initial checkin
   *
   * Revision 1.4  1999/11/08 20:44:52  rahul
   * Swat for adding in Product name and CVS comment log variable.
   *
   */
  
  
  #if !defined(XMLSCANNER_HPP)
  #define XMLSCANNER_HPP
  
  #include <xercesc/util/KVStringPair.hpp>
  #include <xercesc/util/RefVectorOf.hpp>
  #include <xercesc/util/XMLString.hpp>
  #include <xercesc/framework/XMLAttr.hpp>
  #include <xercesc/framework/XMLBufferMgr.hpp>
  #include <xercesc/framework/XMLErrorCodes.hpp>
  #include <xercesc/framework/XMLRefInfo.hpp>
  #include <xercesc/framework/XMLPScanToken.hpp>
  #include <xercesc/internal/ElemStack.hpp>
  #include <xercesc/internal/ReaderMgr.hpp>
  #include <xercesc/validators/DTD/DTDEntityDecl.hpp>
  #include <xercesc/validators/DTD/DTDValidator.hpp>
  #include <xercesc/validators/schema/SchemaValidator.hpp>
  
  class InputSource;
  class XMLDocumentHandler;
  class DocTypeHandler;
  class XMLElementDecl;
  class XMLEntityHandler;
  class EntityResolver;
  class XMLErrorReporter;
  class ErrorHandler;
  class XMLMsgLoader;
  class XMLValidator;
  class ValueStoreCache;
  class XPathMatcherStack;
  class FieldActivator;
  class IdentityConstraint;
  
  //
  //  This is the mondo scanner class, which does the vast majority of the
  //  work of parsing. It handles reading in input and spitting out events
  //  to installed handlers.
  //
  class XMLPARSER_EXPORT XMLScanner
  {
  public :
      // -----------------------------------------------------------------------
      //  Public class types
      //
      //  NOTE: These should really be private, but some of the compilers we
      //  have to deal with are too stupid to understand this.
      //
      //  DeclTypes
      //      Used by scanXMLDecl() to know what type of decl it should scan.
      //      Text decls have slightly different rules from XMLDecls.
      //
      //  EntityExpRes
      //      These are the values returned from the entity expansion method,
      //      to indicate how it went.
      //
      //  XMLTokens
      //      These represent the possible types of input we can get while
      //      scanning content.
      //
      //  ValScheme
      //      This indicates what the scanner should do in terms of validation.
      //      'Auto' means if there is any int/ext subset, then validate. Else,
      //      don't.
      // -----------------------------------------------------------------------
      enum DeclTypes
      {
          Decl_Text
          , Decl_XML
      };
  
      enum EntityExpRes
      {
          EntityExp_Pushed
          , EntityExp_Returned
          , EntityExp_Failed
      };
  
      enum XMLTokens
      {
          Token_CData
          , Token_CharData
          , Token_Comment
          , Token_EndTag
          , Token_EOF
          , Token_PI
          , Token_StartTag
          , Token_Unknown
      };
  
      enum ValSchemes
      {
          Val_Never
          , Val_Always
          , Val_Auto
      };
  
  
      // -----------------------------------------------------------------------
      //  Constructors and Destructor
      // -----------------------------------------------------------------------
      XMLScanner
      (
          XMLValidator* const valToAdopt
      );
      XMLScanner
      (
          XMLDocumentHandler* const  docHandler
          , DocTypeHandler* const    docTypeHandler
          , XMLEntityHandler* const  entityHandler
          , XMLErrorReporter* const  errReporter
          , XMLValidator* const      valToAdopt
      );
      ~XMLScanner();
  
  
      // -----------------------------------------------------------------------
      //  Error emitter methods
      // -----------------------------------------------------------------------
      void emitError(const XMLErrs::Codes toEmit);
      void emitError
      (
          const   XMLErrs::Codes    toEmit
          , const XMLCh* const        text1
          , const XMLCh* const        text2 = 0
          , const XMLCh* const        text3 = 0
          , const XMLCh* const        text4 = 0
      );
      void emitError
      (
          const   XMLErrs::Codes    toEmit
          , const char* const         text1
          , const char* const         text2 = 0
          , const char* const         text3 = 0
          , const char* const         text4 = 0
      );
  
  
      // -----------------------------------------------------------------------
      //  Getter methods
      // -----------------------------------------------------------------------
      const XMLDocumentHandler* getDocHandler() const;
      XMLDocumentHandler* getDocHandler();
      const DocTypeHandler* getDocTypeHandler() const;
      DocTypeHandler* getDocTypeHandler();
      bool getDoNamespaces() const;
      ValSchemes getValidationScheme() const;
      bool getDoSchema() const;
      bool getValidationSchemaFullChecking() const;
      const XMLEntityHandler* getEntityHandler() const;
      XMLEntityHandler* getEntityHandler();
      const XMLErrorReporter* getErrorReporter() const;
      XMLErrorReporter* getErrorReporter();
      bool getExitOnFirstFatal() const;
      bool getValidationConstraintFatal() const;
      RefHashTableOf<XMLRefInfo>* getIDRefList();
      const RefHashTableOf<XMLRefInfo>* getIDRefList() const;
      bool getInException() const;
      bool getLastExtLocation
      (
                  XMLCh* const    sysIdToFill
          , const unsigned int    maxSysIdChars
          ,       XMLCh* const    pubIdToFill
          , const unsigned int    maxPubIdChars
          ,       unsigned int&   lineToFill
          ,       unsigned int&   colToFill
      );
      const Locator* getLocator() const;
      unsigned int getSrcOffset() const;
      bool getStandalone() const;
      const XMLValidator* getValidator() const;
      XMLValidator* getValidator();
      int getErrorCount();
      const DTDEntityDecl* getEntityDecl
      (
          const   XMLCh* const    entName
      )   const;
  
      DTDEntityDecl* getEntityDecl
      (
          const   XMLCh* const    entName
      );
      NameIdPoolEnumerator<DTDEntityDecl> getEntityEnumerator() const;
      NameIdPool<DTDEntityDecl>* getEntityDeclPool();
      const NameIdPool<DTDEntityDecl>* getEntityDeclPool() const;
      const XMLStringPool* getURIStringPool() const;
      XMLStringPool* getURIStringPool();
      bool getHasNoDTD() const;
      XMLCh* getExternalSchemaLocation() const;
      XMLCh* getExternalNoNamespaceSchemaLocation() const;
  
      // -----------------------------------------------------------------------
      //  Getter methods
      // -----------------------------------------------------------------------
  
      /**
        * When an attribute name has no prefix, unlike elements, it is not mapped
        * to the global namespace. So, in order to have something to map it to
        * for practical purposes, a id for an empty URL is created and used for
        * such names.
        *
        * @return The URL pool id of the URL for an empty URL "".
        */
      unsigned int getEmptyNamespaceId() const;
  
      /**
        * When a prefix is found that has not been mapped, an error is issued.
        * However, if the parser has been instructed not to stop on the first
        * fatal error, it needs to be able to continue. To do so, it will map
        * that prefix tot his magic unknown namespace id.
        *
        * @return The URL pool id of the URL for the unknown prefix
        *         namespace.
        */
      unsigned int getUnknownNamespaceId() const;
  
      /**
        * The prefix 'xml' is a magic prefix, defined by the XML spec and
        * requiring no prior definition. This method returns the id for the
        * intrinsically defined URL for this prefix.
        *
        * @return The URL pool id of the URL for the 'xml' prefix.
        */
      unsigned int getXMLNamespaceId() const;
  
      /**
        * The prefix 'xmlns' is a magic prefix, defined by the namespace spec
        * and requiring no prior definition. This method returns the id for the
        * intrinsically defined URL for this prefix.
        *
        * @return The URL pool id of the URL for the 'xmlns' prefix.
        */
      unsigned int getXMLNSNamespaceId() const;
  
      /**
        * This method find the passed URI id in its URI pool and
        * copy the text of that URI into the passed buffer.
        */
      bool getURIText
      (
          const   unsigned int    uriId
          ,       XMLBuffer&      uriBufToFill
      )   const;
  
      const XMLCh* getURIText(const   unsigned int    uriId) const;
  
      /**
        * This method separate the passed QName into prefix
        * and local part, and then return the URI id by resolving
        * the prefix.
        *
        * mode: Indicate if this QName comes from an Element or Attribute
        */
      unsigned int resolveQName
      (
          const   XMLCh* const        qName
          ,       XMLBuffer&          nameBufToFill
          ,       XMLBuffer&          prefixBufToFill
          , const ElemStack::MapModes mode
      );
  
      /* tell if the validator comes from user */
      bool isValidatorFromUser();
  
  
      // -----------------------------------------------------------------------
      //  Setter methods
      // -----------------------------------------------------------------------
      void setDocHandler(XMLDocumentHandler* const docHandler);
      void setDocTypeHandler(DocTypeHandler* const docTypeHandler);
      void setDoNamespaces(const bool doNamespaces);
      void setEntityHandler(XMLEntityHandler* const docTypeHandler);
      void setEntityResolver(EntityResolver* const handler);
      void setErrorReporter(XMLErrorReporter* const errHandler);
      void setErrorHandler(ErrorHandler* const handler);
      void setExitOnFirstFatal(const bool newValue);
      void setValidationConstraintFatal(const bool newValue);
      void setValidationScheme(const ValSchemes newScheme);
      void setValidator(XMLValidator* const valToAdopt);
      void setDoSchema(const bool doSchema);
      void setValidationSchemaFullChecking(const bool schemaFullChecking);
      void setHasNoDTD(const bool hasNoDTD);
      void setRootElemName(XMLCh* rootElemName);
      void setExternalSchemaLocation(const XMLCh* const schemaLocation);
      void setExternalNoNamespaceSchemaLocation(const XMLCh* const noNamespaceSchemaLocation);
      void setExternalSchemaLocation(const char* const schemaLocation);
      void setExternalNoNamespaceSchemaLocation(const char* const noNamespaceSchemaLocation);
  
      // -----------------------------------------------------------------------
      //  Mutator methods
      // -----------------------------------------------------------------------
      void incrementErrorCount(void);			// For use by XMLValidator
  
      // -----------------------------------------------------------------------
      //  Deprecated methods as of 3.2.0. Use getValidationScheme() and
      //  setValidationScheme() instead.
      // -----------------------------------------------------------------------
      bool getDoValidation() const;
      void setDoValidation(const bool validate, const bool setValScheme = true);
  
  
      // -----------------------------------------------------------------------
      //  Document scanning methods
      //
      //  scanDocument() does the entire source document. scanFirst(),
      //  scanNext(), and scanReset() support a progressive parse.
      // -----------------------------------------------------------------------
      void scanDocument
      (
          const   InputSource&    src
          , const bool            reuseGrammar = false
      );
      void scanDocument
      (
          const   XMLCh* const    systemId
          , const bool            reuseGrammar = false
      );
      void scanDocument
      (
          const   char* const     systemId
          , const bool            reuseGrammar = false
      );
  
      bool scanFirst
      (
          const   InputSource&    src
          ,       XMLPScanToken&  toFill
          , const bool            reuseGrammar = false
      );
      bool scanFirst
      (
          const   XMLCh* const    systemId
          ,       XMLPScanToken&  toFill
          , const bool            reuseGrammar = false
      );
      bool scanFirst
      (
          const   char* const     systemId
          ,       XMLPScanToken&  toFill
          , const bool            reuseGrammar = false
      );
  
      bool scanNext(XMLPScanToken& toFill);
  
      void scanReset(XMLPScanToken& toFill);
  
      bool checkXMLDecl(bool startWithAngle);
  
      // -----------------------------------------------------------------------
      //  Notification that lazy data has been deleted
      // -----------------------------------------------------------------------
  	static void reinitScannerMutex();
  
  	static void reinitMsgLoader();
  
  private :
      // -----------------------------------------------------------------------
      //  Unimplemented constructors and operators
      // -----------------------------------------------------------------------
      XMLScanner();
      XMLScanner(const XMLScanner&);
      void operator=(const XMLScanner&);
  
  
      // -----------------------------------------------------------------------
      //  Private helper methods
      // -----------------------------------------------------------------------
      void commonInit();
      void initValidator(XMLValidator* theValidator);
      void resetEntityDeclPool();
      void resetURIStringPool();
  
  
      // -----------------------------------------------------------------------
      //  Private helper methods
      //
      //  These are implemented in XMLScanner2.cpp, to keep the main file from
      //  becoming so bloated. We can't have any bloated files.
      // -----------------------------------------------------------------------
      unsigned int buildAttList
      (
          const   RefVectorOf<KVStringPair>&  providedAttrs
          , const unsigned int                attCount
          ,       XMLElementDecl*             elemDecl
          ,       RefVectorOf<XMLAttr>&       toFill
      );
      void checkIDRefs();
      bool isLegalToken(const XMLPScanToken& toCheck);
      bool normalizeAttValue
      (
          const   XMLAttDef* const    attDef
          , const XMLCh* const        value
          ,       XMLBuffer&          toFill
      );
      bool normalizeAttRawValue
      (
          const   XMLCh* const        attrName
          , const XMLCh* const        value
          ,       XMLBuffer&          toFill
      );
  
      unsigned int resolvePrefix
      (
          const   XMLCh* const        prefix
          , const ElemStack::MapModes mode
      );
      unsigned int resolvePrefix
      (
          const   XMLCh* const        prefix
          ,       XMLBuffer&          uriBufToFill
          , const ElemStack::MapModes mode
      );
      void scanReset(const InputSource& src);
      void sendCharData(XMLBuffer& toSend);
      XMLTokens senseNextToken(unsigned int& orgReader);
      void updateNSMap
      (
          const   XMLCh* const    attrName
          , const XMLCh* const    attrValue
      );
      void scanRawAttrListforNameSpaces(const RefVectorOf<KVStringPair>* theRawAttrList, int attCount);
      void parseSchemaLocation(const XMLCh* const schemaLocationStr);
      void resolveSchemaGrammar(const XMLCh* const loc, const XMLCh* const uri);
      bool switchGrammar(unsigned int newGrammarNameSpaceIndex);
      bool switchGrammar(const XMLCh* const newGrammarNameSpace);
      bool laxElementValidation(QName* element, ContentLeafNameTypeVector* cv,
                                const XMLContentModel* const cm,
                                const unsigned int parentElemDepth);
      bool anyAttributeValidation(SchemaAttDef* attWildCard,
                                  unsigned int uriId,
                                  bool& skipThisOne,
                                  bool& laxThisOne);
  
      // -----------------------------------------------------------------------
      //  Private scanning methods
      // -----------------------------------------------------------------------
      bool basicAttrValueScan
      (
          const   XMLCh* const    attrName
          ,       XMLBuffer&      toFill
      );
      bool getQuotedString(XMLBuffer& toFill);
      unsigned int rawAttrScan
      (
          const   XMLCh* const                elemName
          ,       RefVectorOf<KVStringPair>&  toFill
          ,       bool&                       isEmpty
      );
      bool scanAttValue
      (
          const   XMLAttDef* const    attDef
          ,       XMLBuffer&          toFill
      );
      void scanCDSection();
      void scanCharData(XMLBuffer& toToUse);
      bool scanCharRef(XMLCh& toFill, XMLCh& second);
      void scanComment();
      bool scanContent(const bool extEntity);
      void scanEndTag(bool& gotData);
      EntityExpRes scanEntityRef
      (
          const   bool    inAttVal
          ,       XMLCh&  firstCh
          ,       XMLCh&  secondCh
          ,       bool&   escaped
      );
      bool scanEq();
      void scanMiscellaneous();
      void scanPI();
      void scanProlog();
      bool scanStartTag(bool& gotData);
      bool scanStartTagNS(bool& gotData);
      void scanXMLDecl(const DeclTypes type);
      unsigned int scanUpToWSOr
      (
                  XMLBuffer&  toFill
          , const XMLCh       chEndChar
      );
  
      // -----------------------------------------------------------------------
      //  Private helper methods
      // -----------------------------------------------------------------------
      void resizeElemState();
  
      // -----------------------------------------------------------------------
      //  IdentityConstraints Activation methods
      // -----------------------------------------------------------------------
      void activateSelectorFor(IdentityConstraint* const ic);
  
      // -----------------------------------------------------------------------
      //  Data members
      //
      //  fAttrList
      //      Every time we get a new element start tag, we have to pass to
      //      the document handler the attributes found. To make it more
      //      efficient we keep this ref vector of XMLAttr objects around. We
      //      just reuse it over and over, allowing it to grow to meet the
      //      peek need.
      //
      //  fBufMgr
      //      This is a manager for temporary buffers used during scanning.
      //      For efficiency we must use a set of static buffers, but we have
      //      to insure that they are not incorrectly reused. So this manager
      //      provides the smarts to hand out buffers as required.
      //
      //  fDocHandler
      //      The client code's document handler. If zero, then no document
      //      handler callouts are done. We don't adopt it.
      //
      //  fDocTypeHandler
      //      The client code's document type handler (used by DTD Validator).
      //
      //  fDoNamespaces
      //      This flag indicates whether the client code wants us to do
      //      namespaces or not. If the installed validator indicates that it
      //      has to do namespaces, then this is ignored.
      //
      //  fElemStack
      //      This is the element stack that is used to track the elements that
      //      are currently being worked on.
      //
      //  fEntityHandler
      //      The client code's entity handler. If zero, then no entity handler
      //      callouts are done. We don't adopt it.
      //
      //  fEntityResolver
      //      The client code's entity resolver.  Need to store this info for
      //      Schema parse entity resolving.
      //
      //  fErrorReporter
      //      The client code's error reporter. If zero, then no error reporter
      //      callouts are done. We don't adopt it.
      //
      //  fErrorHandler
      //      The client code's error handler.  Need to store this info for
      //      Schema parse error handling.
      //
      //  fExitOnFirstFatal
      //      This indicates whether we bail out on the first fatal XML error
      //      or not. It defaults to true, which is the strict XML way, but it
      //      can be changed.
      //
      //  fValidationConstraintFatal
      //      This indicates whether we treat validation constraint errors as
      //      fatal errors or not. It defaults to false, but it can be changed.
      //
      //  fIDRefList
      //      This is a list of XMLRefInfo objects. This member lets us do all
      //      needed ID-IDREF balancing checks.
      //
      //  fInException
      //      To avoid a circular freakout when we catch an exception and emit
      //      it, which would normally throw again if the 'fail on first error'
      //      flag is one.
      //
      //  fRawAttrList
      //      During the initial scan of the attributes we can only do a raw
      //      scan for key/value pairs. So this vector is used to store them
      //      until they can be processed (and put into fAttrList.)
      //
      //  fReaderMgr
      //      This is the reader manager, from which we get characters. It
      //      manages the reader stack for us, and provides a lot of convenience
      //      methods to do specialized checking for chars, sequences of chars,
      //      skipping chars, etc...
      //
      //  fReuseGrammar
      //      This flag is set on a per-scan basis. So its provided in the
      //      scanDocument() and scanFirst() methods, and applies for that
      //      one pass. It indicates if the Grammar should be reused or not.
      //      If so, then all the Grammar will be ignored.
      //      There cannot be any internal subset.
      //
      //  fScannerId
      //  fSequenceId
      //      These are used for progressive parsing, to make sure that the
      //      client code does the right thing at the right time.
      //
      //  fStandalone
      //      Indicates whether the document is standalone or not. Defaults to
      //      no, but can be overridden in the XMLDecl.
      //
      //  fHasNoDTD
      //      Indicates the document has no DTD or has only an internal DTD subset
      //      which contains no parameter entity references.
      //
      //  fValidate
      //      Indicates whether any validation should be done. This is defined
      //      by the existence of a Grammar together with fValScheme.
      //
      //  fValidator
      //      The installed validator. We look at them via the abstract
      //      validator interface, and don't know what it actual is.
      //      Either point to user's installed validator, or fDTDValidator
      //      or fSchemaValidator.
      //
      //  fDTDValidator
      //      The DTD validator instance.
      //
      //  fSchemaValidator
      //      The Schema validator instance.
      //
      //  fValidatorFromUser
      //      This flag indicates whether the validator was installed from
      //      user.  If false, then the validator was created by the Scanner.
      //
      //  fValScheme
      //      This is the currently set validation scheme. It defaults to
      //      'never', but can be set by the client.
      //
      //  fErrorCount
      //		The number of errors we've encountered.
      //
      //  fDoSchema
      //      This flag indicates whether the client code wants Schema to
      //      be processed or not.
      //
      //  fSchemaFullChecking
      //      This flag indicates whether the client code wants full Schema
      //      constraint checking.
      //
      //  fSeeXsi
      //      This flag indicates a schema has been seen.
      //
      //  fAttName
      //  fAttValue
      //  fCDataBuf
      //  fNameBuf
      //  fQNameBuf
      //  fPrefixBuf
      //      For the most part, buffers are obtained from the fBufMgr object
      //      on the fly. However, for the start tag scan, we have a set of
      //      fixed buffers for performance reasons. These are used a lot and
      //      there are a number of them, so asking the buffer manager each
      //      time for new buffers is a bit too much overhead.
      //
      //  fEmptyNamespaceId
      //      This is the id of the empty namespace URI. This is a special one
      //      because of the xmlns="" type of deal. We have to quickly sense
      //      that its the empty namespace.
      //
      //  fUnknownNamespaceId
      //      This is the id of the namespace URI which is assigned to the
      //      global namespace. Its for debug purposes only, since there is no
      //      real global namespace URI. Its set by the derived class.
      //
      //  fXMLNamespaceId
      //  fXMLNSNamespaceId
      //      These are the ids of the namespace URIs which are assigned to the
      //      'xml' and 'xmlns' special prefixes. The former is officially
      //      defined but the latter is not, so we just provide one for debug
      //      purposes.
      //
      //  fSchemaNamespaceId
      //      This is the id of the schema namespace URI.
      //
      //  fElemState
      //  fElemStateSize
      //      Stores an element next state from DFA content model - used for
      //      wildcard validation
      //
      //  fGrammarResolver
      //      Grammar Pool that stores all the Grammar
      //
      //  fGrammar
      //      Current Grammar used by the Scanner and Validator
      //
      //  fGrammarType
      //      Current Grammar Type.  Store this value instead of calling getGrammarType
      //      all the time for faster performance.
      //
      //  fEntityDeclPool
      //      This is a pool of EntityDecl objects, which contains all of the
      //      general entities that are declared in the DTD subsets, plus the
      //      default entities (such as &gt; &lt; ...) defined by the XML Standard.
      //
      //  fURIStringPool
      //      This is a pool for URIs with unique ids assigned. We use a standard
      //      string pool class.  This pool is going to be shared by all Grammar.
      //      Use only if namespace is turned on.
      //
      //  fMatcherStack
      //      Stack of active XPath matchers for identity constraints. All
      //      active XPath matchers are notified of startElement, characters
      //      and endElement callbacks in order to perform their matches.
      //
      //  fValueStoreCache
      //      Cache of value stores for identity constraint fields.
      //
      //  fFieldActivator
      //      Activates fields within a certain scope when a selector matches
      //      its xpath.
      //
      //  fRootElemName
      //      No matter we are using DTD or Schema Grammar, if a DOCTYPE exists,
      //      we need to verify the root element name.  So store the rootElement
      //      that is used in the DOCTYPE in the Scanner instead of in the DTDGrammar
      //      where it used to
      //
      //  fExternalSchemaLocation
      //      The list of Namespace/SchemaLocation that was specified externally
      //      using setExternalSchemaLocation.
      //
      //  fExternalNoNamespaceSchemaLocation
      //      The no target namespace XML Schema Location that was specified
      //      externally using setExternalNoNamespaceSchemaLocation.
      //
      // -----------------------------------------------------------------------
      bool                        fDoNamespaces;
      bool                        fExitOnFirstFatal;
      bool                        fValidationConstraintFatal;
      bool                        fInException;
      bool                        fReuseGrammar;
      bool                        fStandalone;
      bool                        fHasNoDTD;
      bool                        fValidate;
      bool                        fValidatorFromUser;
      bool                        fDoSchema;
      bool                        fSchemaFullChecking;
      bool                        fSeeXsi;
      int                         fErrorCount;
      unsigned int                fEmptyNamespaceId;
      unsigned int                fUnknownNamespaceId;
      unsigned int                fXMLNamespaceId;
      unsigned int                fXMLNSNamespaceId;
      unsigned int                fSchemaNamespaceId;
      unsigned int                fElemStateSize;
      XMLUInt32                   fScannerId;
      XMLUInt32                   fSequenceId;
      unsigned int*               fElemState;
      RefVectorOf<XMLAttr>*       fAttrList;
      XMLBufferMgr                fBufMgr;
      XMLDocumentHandler*         fDocHandler;
      DocTypeHandler*             fDocTypeHandler;
      ElemStack                   fElemStack;
      XMLEntityHandler*           fEntityHandler;
      EntityResolver*             fEntityResolver;
      XMLErrorReporter*           fErrorReporter;
      ErrorHandler*               fErrorHandler;
      RefHashTableOf<XMLRefInfo>* fIDRefList;
      RefVectorOf<KVStringPair>*  fRawAttrList;
      ReaderMgr                   fReaderMgr;
      XMLValidator*               fValidator;
      DTDValidator*               fDTDValidator;
      SchemaValidator*            fSchemaValidator;
      ValSchemes                  fValScheme;
      XMLBuffer                   fAttNameBuf;
      XMLBuffer                   fAttValueBuf;
      XMLBuffer                   fCDataBuf;
      XMLBuffer                   fNameBuf;
      XMLBuffer                   fQNameBuf;
      XMLBuffer                   fPrefixBuf;
      XMLBuffer                   fURIBuf;
      GrammarResolver*            fGrammarResolver;
      Grammar*                    fGrammar;
      Grammar::GrammarType        fGrammarType;
      NameIdPool<DTDEntityDecl>*  fEntityDeclPool;
      XMLStringPool*              fURIStringPool;
      XPathMatcherStack*          fMatcherStack;
      ValueStoreCache*            fValueStoreCache;
      FieldActivator*             fFieldActivator;
      XMLCh*                      fRootElemName;
      XMLCh*                      fExternalSchemaLocation;
      XMLCh*                      fExternalNoNamespaceSchemaLocation;
  };
  
  
  
  // ---------------------------------------------------------------------------
  //  XMLScanner: Getter methods
  // ---------------------------------------------------------------------------
  inline const XMLDocumentHandler* XMLScanner::getDocHandler() const
  {
      return fDocHandler;
  }
  
  inline XMLDocumentHandler* XMLScanner::getDocHandler()
  {
      return fDocHandler;
  }
  
  inline const DocTypeHandler* XMLScanner::getDocTypeHandler() const
  {
      return fDocTypeHandler;
  }
  
  inline DocTypeHandler* XMLScanner::getDocTypeHandler()
  {
      return fDocTypeHandler;
  }
  
  inline bool XMLScanner::getDoNamespaces() const
  {
      return fDoNamespaces;
  }
  
  inline const XMLEntityHandler* XMLScanner::getEntityHandler() const
  {
      return fEntityHandler;
  }
  
  inline XMLEntityHandler* XMLScanner::getEntityHandler()
  {
      return fEntityHandler;
  }
  
  inline const XMLErrorReporter* XMLScanner::getErrorReporter() const
  {
      return fErrorReporter;
  }
  
  inline XMLErrorReporter* XMLScanner::getErrorReporter()
  {
      return fErrorReporter;
  }
  
  inline bool XMLScanner::getExitOnFirstFatal() const
  {
      return fExitOnFirstFatal;
  }
  
  inline bool XMLScanner::getValidationConstraintFatal() const
  {
      return fValidationConstraintFatal;
  }
  
  inline RefHashTableOf<XMLRefInfo>* XMLScanner::getIDRefList()
  {
      return fIDRefList;
  }
  
  inline bool XMLScanner::getInException() const
  {
      return fInException;
  }
  
  inline const RefHashTableOf<XMLRefInfo>* XMLScanner::getIDRefList() const
  {
      return fIDRefList;
  }
  
  inline const Locator* XMLScanner::getLocator() const
  {
      return &fReaderMgr;
  }
  
  inline unsigned int XMLScanner::getSrcOffset() const
  {
      return fReaderMgr.getSrcOffset();
  }
  
  inline bool XMLScanner::getStandalone() const
  {
      return fStandalone;
  }
  
  inline XMLScanner::ValSchemes XMLScanner::getValidationScheme() const
  {
      return fValScheme;
  }
  
  inline const XMLValidator* XMLScanner::getValidator() const
  {
      return fValidator;
  }
  
  inline XMLValidator* XMLScanner::getValidator()
  {
      return fValidator;
  }
  
  inline bool XMLScanner::getDoSchema() const
  {
      return fDoSchema;
  }
  
  inline bool XMLScanner::getValidationSchemaFullChecking() const
  {
      return fSchemaFullChecking;
  }
  
  inline int XMLScanner::getErrorCount()
  {
      return fErrorCount;
  }
  
  inline bool XMLScanner::isValidatorFromUser()
  {
      return fValidatorFromUser;
  }
  
  inline unsigned int XMLScanner::getEmptyNamespaceId() const
  {
      return fEmptyNamespaceId;
  }
  
  inline unsigned int XMLScanner::getUnknownNamespaceId() const
  {
      return fUnknownNamespaceId;
  }
  
  inline unsigned int XMLScanner::getXMLNamespaceId() const
  {
      return fXMLNamespaceId;
  }
  
  inline unsigned int XMLScanner::getXMLNSNamespaceId() const
  {
      return fXMLNSNamespaceId;
  }
  
  inline NameIdPoolEnumerator<DTDEntityDecl>
  XMLScanner::getEntityEnumerator() const
  {
      return NameIdPoolEnumerator<DTDEntityDecl>(fEntityDeclPool);
  }
  
  inline const DTDEntityDecl* XMLScanner::getEntityDecl(const  XMLCh* const    entName) const
  {
      return fEntityDeclPool->getByKey(entName);
  }
  
  inline DTDEntityDecl* XMLScanner::getEntityDecl(const XMLCh* const entName)
  {
      return fEntityDeclPool->getByKey(entName);
  }
  
  inline NameIdPool<DTDEntityDecl>* XMLScanner::getEntityDeclPool()
  {
      return fEntityDeclPool;
  }
  
  inline const NameIdPool<DTDEntityDecl>* XMLScanner::getEntityDeclPool() const
  {
      return fEntityDeclPool;
  }
  
  inline const XMLStringPool* XMLScanner::getURIStringPool() const
  {
      return fURIStringPool;
  }
  
  inline XMLStringPool* XMLScanner::getURIStringPool()
  {
      return fURIStringPool;
  }
  
  inline bool XMLScanner::getHasNoDTD() const
  {
      return fHasNoDTD;
  }
  
  inline XMLCh* XMLScanner::getExternalSchemaLocation() const
  {
      return fExternalSchemaLocation;
  }
  
  inline XMLCh* XMLScanner::getExternalNoNamespaceSchemaLocation() const
  {
      return fExternalNoNamespaceSchemaLocation;
  }
  
  // ---------------------------------------------------------------------------
  //  XMLScanner: Setter methods
  // ---------------------------------------------------------------------------
  inline void XMLScanner::setDocHandler(XMLDocumentHandler* const docHandler)
  {
      fDocHandler = docHandler;
  }
  
  inline void XMLScanner::setDocTypeHandler(DocTypeHandler* const docTypeHandler)
  {
      fDocTypeHandler = docTypeHandler;
  }
  
  inline void XMLScanner::setDoNamespaces(const bool doNamespaces)
  {
      fDoNamespaces = doNamespaces;
      if (fDoNamespaces) {
          if (!fURIStringPool) {
              fURIStringPool = new XMLStringPool();
              resetURIStringPool();
          }
      }
  }
  
  inline void XMLScanner::setErrorReporter(XMLErrorReporter* const errHandler)
  {
      fErrorReporter = errHandler;
      fDTDValidator->setErrorReporter(fErrorReporter);
      fSchemaValidator->setErrorReporter(fErrorReporter);
  }
  
  inline void XMLScanner::setErrorHandler(ErrorHandler* const handler)
  {
      fErrorHandler = handler;
  }
  
  inline void XMLScanner::setEntityHandler(XMLEntityHandler* const entityHandler)
  {
      fEntityHandler = entityHandler;
      fReaderMgr.setEntityHandler(entityHandler);
  }
  
  inline void XMLScanner::setEntityResolver(EntityResolver* const handler)
  {
      fEntityResolver = handler;
  }
  
  inline void XMLScanner::setExitOnFirstFatal(const bool newValue)
  {
      fExitOnFirstFatal = newValue;
  }
  
  inline void XMLScanner::setValidationConstraintFatal(const bool newValue)
  {
      fValidationConstraintFatal = newValue;
  }
  
  inline void XMLScanner::setValidationScheme(const ValSchemes newScheme)
  {
      fValScheme = newScheme;
  
      // validation flag for Val_Auto is set to false by default,
      //   and will be turned to true if a grammar is seen
      if (fValScheme == Val_Always)
          fValidate = true;
      else
          fValidate = false;
  }
  
  inline void XMLScanner::setValidator(XMLValidator* const valToAdopt)
  {
      if (fValidatorFromUser)
          delete fValidator;
      fValidator = valToAdopt;
      fValidatorFromUser = true;
      initValidator(fValidator);
  }
  
  inline void XMLScanner::setDoSchema(const bool doSchema)
  {
      fDoSchema = doSchema;
  }
  
  inline void XMLScanner::setValidationSchemaFullChecking(const bool schemaFullChecking)
  {
      fSchemaFullChecking = schemaFullChecking;
  }
  
  inline void XMLScanner::setHasNoDTD(const bool hasNoDTD)
  {
      fHasNoDTD = hasNoDTD;
  }
  
  inline void XMLScanner::setRootElemName(XMLCh* rootElemName)
  {
      delete [] fRootElemName;
      fRootElemName = XMLString::replicate(rootElemName);
  }
  
  inline void XMLScanner::setExternalSchemaLocation(const XMLCh* const schemaLocation)
  {
      delete [] fExternalSchemaLocation;
      fExternalSchemaLocation = XMLString::replicate(schemaLocation);
  }
  
  inline void XMLScanner::setExternalNoNamespaceSchemaLocation(const XMLCh* const noNamespaceSchemaLocation)
  {
      delete [] fExternalNoNamespaceSchemaLocation;
      fExternalNoNamespaceSchemaLocation = XMLString::replicate(noNamespaceSchemaLocation);
  }
  
  inline void XMLScanner::setExternalSchemaLocation(const char* const schemaLocation)
  {
      delete [] fExternalSchemaLocation;
      fExternalSchemaLocation = XMLString::transcode(schemaLocation);
  }
  
  inline void XMLScanner::setExternalNoNamespaceSchemaLocation(const char* const noNamespaceSchemaLocation)
  {
      delete [] fExternalNoNamespaceSchemaLocation;
      fExternalNoNamespaceSchemaLocation = XMLString::transcode(noNamespaceSchemaLocation);
  }
  
  
  // ---------------------------------------------------------------------------
  //  XMLScanner: Mutator methods
  // ---------------------------------------------------------------------------
  inline void XMLScanner::incrementErrorCount()
  {
      ++fErrorCount;
  }
  
  
  // ---------------------------------------------------------------------------
  //  XMLScanner: Deprecated methods
  // ---------------------------------------------------------------------------
  inline bool XMLScanner::getDoValidation() const
  {
      return fValidate;
  }
  
  inline void XMLScanner::setDoValidation(const bool validate, const bool setValScheme)
  {
      fValidate = validate;
      if (setValScheme) {
          if (fValidate)
              fValScheme = Val_Always;
          else
              fValScheme = Val_Never;
      }
  }
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/parsers/DOMParser.hpp
  
  Index: DOMParser.hpp
  ===================================================================
  /*
   * 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/>.
   */
  
  /*
   * $Id: DOMParser.hpp,v 1.1 2002/10/23 08:55:11 lilantha Exp $
   *
   */
  
  #if !defined(DOMPARSER_HPP)
  #define DOMPARSER_HPP
  
  
  #include <xercesc/dom/DOM_Document.hpp>
  #include <xercesc/framework/XMLDocumentHandler.hpp>
  #include <xercesc/framework/XMLErrorReporter.hpp>
  #include <xercesc/framework/XMLEntityHandler.hpp>
  #include <xercesc/util/ValueStackOf.hpp>
  
  #include <xercesc/validators/DTD/DocTypeHandler.hpp>
  #include <xercesc/dom/DOM_DocumentType.hpp>
  #include <xercesc/validators/DTD/DTDElementDecl.hpp>
  
  class EntityResolver;
  class ErrorHandler;
  class XMLPScanToken;
  class XMLScanner;
  class XMLValidator;
  
  
  /**
    * This class implements the Document Object Model (DOM) interface.
    * It should be used by applications which choose to parse and
    * process the XML document using the DOM api's. This implementation
    * also allows the applications to install an error and an entitty
    * handler (useful extensions to the DOM specification).
    *
    * <p>It can be used to instantiate a validating or non-validating
    * parser, by setting a member flag.</p>
    */
  class PARSERS_EXPORT DOMParser :
  
      public XMLDocumentHandler
      , public XMLErrorReporter
      , public XMLEntityHandler
      , public DocTypeHandler
  {
  public :
      // -----------------------------------------------------------------------
      //  Class types
      // -----------------------------------------------------------------------
      enum ValSchemes
      {
          Val_Never
          , Val_Always
          , Val_Auto
      };
  
  
      // -----------------------------------------------------------------------
      //  Constructors and Detructor
      // -----------------------------------------------------------------------
  
      /** @name Constructors and Destructor */
      //@{
      /** Construct a DOMParser, with an optional validator
        *
        * Constructor with an instance of validator class to use for
        * validation. If you don't provide a validator, a default one will
        * be created for you in the scanner.
        *
        * @param valToAdopt Pointer to the validator instance to use. The
        *                   parser is responsible for freeing the memory.
        */
      DOMParser(XMLValidator* const valToAdopt = 0);
  
      /**
        * Destructor
        */
      ~DOMParser();
  
      //@}
  
      /** Reset the parser
        *
        * This method resets the state of the DOM driver and makes
        * it ready for a fresh parse run.
        */
      void reset();
  
  
      // -----------------------------------------------------------------------
      //  Getter methods
      // -----------------------------------------------------------------------
  
      /** @name Getter methods */
      //@{
  
      /** Get the DOM document
        *
        * This method returns the DOM_Document object representing the
        * root of the document tree. This object provides the primary
        * access to the document's data.
        *
        * @return The DOM_Document object which represents the entire
        *         XML document.
        */
      DOM_Document getDocument();
  
      /** Get a pointer to the error handler
        *
        * This method returns the installed error handler. If no handler
        * has been installed, then it will be a zero pointer.
        *
        * @return The pointer to the installed error handler object.
        */
      ErrorHandler* getErrorHandler();
  
      /** Get a const pointer to the error handler
        *
        * This method returns the installed error handler.  If no handler
        * has been installed, then it will be a zero pointer.
        *
        * @return A const pointer to the installed error handler object.
        */
      const ErrorHandler* getErrorHandler() const;
  
      /** Get a pointer to the entity resolver
        *
        * This method returns the installed entity resolver.  If no resolver
        * has been installed, then it will be a zero pointer.
        *
        * @return The pointer to the installed entity resolver object.
        */
      EntityResolver* getEntityResolver();
  
      /** Get a const pointer to the entity resolver
        *
        * This method returns the installed entity resolver. If no resolver
        * has been installed, then it will be a zero pointer.
        *
        * @return A const pointer to the installed entity resolver object.
        */
      const EntityResolver* getEntityResolver() const;
  
      /** Get a const reference to the underlying scanner
        *
        * This method returns a reference to the underlying scanner object.
        * It allows read only access to data maintained in the scanner.
        *
        * @return A const reference to the underlying scanner object.
        */
      const XMLScanner& getScanner() const;
  
      /** Get a const reference to the validator
        *
        * This method returns a reference to the parser's installed
        * validator.
        *
        * @return A const reference to the installed validator object.
        */
      const XMLValidator& getValidator() const;
  
      /**
        * This method returns an enumerated value that indicates the current
        * validation scheme set on this parser.
        *
        * @return The ValSchemes value current set on this parser.
        * @see #setValidationScheme
        */
      ValSchemes getValidationScheme() const;
  
      /** Get the 'do schema' flag
        *
        * This method returns the state of the parser's schema processing
        * flag.
        *
        * @return true, if the parser is currently configured to
        *         understand schema, false otherwise.
        *
        * @see #setDoSchema
        */
      bool getDoSchema() const;
  
      /** Get the 'full schema constraint checking' flag
        *
        * This method returns the state of the parser's full schema constraint
        * checking flag.
        *
        * @return true, if the parser is currently configured to
        *         have full schema constraint checking, false otherwise.
        *
        * @see #setValidationSchemaFullChecking
        */
      bool getValidationSchemaFullChecking() const;
  
      /** Get error count from the last parse operation.
        *
        * This method returns the error count from the last parse
        * operation. Note that this count is actually stored in the
        * scanner, so this method simply returns what the
        * scanner reports.
        *
        * @return number of errors encountered during the latest
        *			parse operation.
        *
        */
      int getErrorCount() const;
  
      /** Get the 'do namespaces' flag
        *
        * This method returns the state of the parser's namespace processing
        * flag.
        *
        * @return true, if the parser is currently configured to
        *         understand namespaces, false otherwise.
        *
        * @see #setDoNamespaces
        */
      bool getDoNamespaces() const;
  
      /** Get the 'exit on first error' flag
        *
        * This method returns the state of the parser's
        * exit-on-First-Fatal-Error flag. If this flag is true, then the
        * parse will exit the first time it sees any non-wellformed XML or
        * any validity error. The default state is true.
        *
        * @return true, if the parser is currently configured to
        *         exit on the first fatal error, false otherwise.
        *
        * @see #setExitOnFirstFatalError
        */
      bool getExitOnFirstFatalError() const;
  
      /**
        * This method returns the state of the parser's
        * validation-constraint-fatal flag.
        *
        * @return true, if the parser is currently configured to
        *         set validation constraint errors as fatal, false
        *         otherwise.
        *
        * @see #setValidationContraintFatal
        */
      bool getValidationConstraintFatal() const;
  
      /** Get the 'include entity references' flag
        *
        * This flag  specifies whether the parser is
        * creating entity reference nodes in the DOM tree being produced.
        * When the 'create' flag is
        * true, the DOM tree will contain entity reference nodes.
        * When the 'create' flag is false, no entity reference nodes
        * are included in the DOM tree.
        * <p>The replacement text
        * of the entity is included in either case, either as a
        * child of the Entity Reference node or in place at the location
        * of the reference.
        *
        * @return  The state of the create entity reference node
        *               flag.
        * @see #setCreateEntityReferenceNodes
        */
      bool  getCreateEntityReferenceNodes()const;
  
     /** Get the 'include ignorable whitespace' flag.
        *
        * This method returns the state of the parser's include ignorable
        * whitespace flag.
        *
        * @return 'true' if the include ignorable whitespace flag is set on
        *         the parser, 'false' otherwise.
        *
        * @see #setIncludeIgnorableWhitespace
        */
      bool getIncludeIgnorableWhitespace() const;
  
      /** Get the 'to create MXLDecl node' flag.
        *
        * This method returns the state of the parser's to create XMLDecl
        * DOM Node flag.
        *
        * @return 'true' if the toCreateXMLDeclTypeNode flag is set on
        *         the parser, 'false' otherwise.
        *
        */
      bool getToCreateXMLDeclTypeNode() const;
  
     /** Get the set of Namespace/SchemaLocation that is specified externaly.
        *
        * This method returns the list of Namespace/SchemaLocation that was
        * specified using setExternalSchemaLocation.
        *
        * The parser owns the returned string, and the memory allocated for
        * the returned string will be destroyed when the parser is deleted.
        *
        * To ensure assessiblity of the returned information after the parser
        * is deleted, callers need to copy and store the returned information
        * somewhere else.
        *
        * @return a pointer to the list of Namespace/SchemaLocation that was
        *         specified externally.  The pointer spans the same life-time as
        *         the parser.  A null pointer is returned if nothing
        *         was specified externally.
        *
        * @see #setExternalSchemaLocation(const XMLCh* const)
        */
      XMLCh* getExternalSchemaLocation() const;
  
     /** Get the noNamespace SchemaLocation that is specified externaly.
        *
        * This method returns the no target namespace XML Schema Location
        * that was specified using setExternalNoNamespaceSchemaLocation.
        *
        * The parser owns the returned string, and the memory allocated for
        * the returned string will be destroyed when the parser is deleted.
        *
        * To ensure assessiblity of the returned information after the parser
        * is deleted, callers need to copy and store the returned information
        * somewhere else.
        *
        * @return a pointer to the no target namespace Schema Location that was
        *         specified externally.  The pointer spans the same life-time as
        *         the parser.  A null pointer is returned if nothing
        *         was specified externally.
        *
        * @see #setExternalNoNamespaceSchemaLocation(const XMLCh* const)
        */
      XMLCh* getExternalNoNamespaceSchemaLocation() const;
  
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Setter methods
      // -----------------------------------------------------------------------
  
      /** @name Setter methods */
      //@{
  
      /** Set the error handler
        *
        * This method allows applications to install their own error handler
        * to trap error and warning messages.
        *
        * <i>Any previously set handler is merely dropped, since the parser
        * does not own them.</i>
        *
        * @param handler  A const pointer to the user supplied error
        *                 handler.
        *
        * @see #getErrorHandler
        */
      void setErrorHandler(ErrorHandler* const handler);
  
      /** Set the entity resolver
        *
        * This method allows applications to install their own entity
        * resolver. By installing an entity resolver, the applications
        * can trap and potentially redirect references to external
        * entities.
        *
        * <i>Any previously set resolver is merely dropped, since the parser
        * does not own them.</i>
        *
        * @param handler  A const pointer to the user supplied entity
        *                 resolver.
        *
        * @see #getEntityResolver
        */
      void setEntityResolver(EntityResolver* const handler);
  
      /** Set the 'do namespaces' flag
        *
        * This method allows users to enable or disable the parser's
        * namespace processing. When set to true, parser starts enforcing
        * all the constraints and rules specified by the NameSpace
        * specification.
        *
        * The parser's default state is: false.
        *
        * This flag is ignored by the underlying scanner if the installed
        * validator indicates that namespace constraints should be
        * enforced.
        *
        * @param newState The value specifying whether NameSpace rules should
        *                 be enforced or not.
        *
        * @see #getDoNamespaces
        */
      void setDoNamespaces(const bool newState);
  
      /** Set the 'exit on first error' flag
        *
        * This method allows users to set the parser's behaviour when it
        * encounters the first fatal error. If set to true, the parser
        * will exit at the first fatal error. If false, then it will
        * report the error and continue processing.
        *
        * The default value is 'true' and the parser exits on the
        * first fatal error.
        *
        * @param newState The value specifying whether the parser should
        *                 continue or exit when it encounters the first
        *                 fatal error.
        *
        * @see #getExitOnFirstFatalError
        */
      void setExitOnFirstFatalError(const bool newState);
  
      /**
        * This method allows users to set the parser's behaviour when it
        * encounters a validtion constraint error. If set to true, and the
        * the parser is set to exit when it encounter the first fatal error,
        * the parser will exit at the first encounter. If false, then it will
        * report the error and continue processing.
        *
        * <p>The default value is 'false'.</p>
        *
        * @param newState The value specifying whether the parser should
        *                 continue or exit when it encounters a validation
        *                 constraint error.
        *
        * @see #getValidationConstraintFatal
        */
      void setValidationConstraintFatal(const bool newState);
  
       /** Set the 'include entity references' flag
        *
        * This method allows the user to specify whether the parser should
        * create entity reference nodes in the DOM tree being produced.
        * When the 'create' flag is
        * true, the DOM tree constains entity reference nodes.
        * When the 'create' flag is false, no entity reference nodes
        * are included in the DOM tree.
        * <p>The replacement text
        * of the entity is included in either case, either as a
        * child of the Entity Reference node or in place at the location
        * of the reference.
        *
        * @param create The new state of the create entity reference nodes
        *               flag.
        */
      void setCreateEntityReferenceNodes(const bool create);
  
     /** Set the 'include ignorable whitespace' flag
        *
        * This method allows the user to specify whether a validating parser
        * should include ignorable whitespaces as text nodes.  It has no effect
        * on non-validating parsers which always include non-markup text.
        * <p>When set to true (also the default), ignorable whitespaces will be
        * added to the DOM tree as text nodes.  The method
        * DOM_Text::isIgnorableWhitespace() will return true for those text
        * nodes only.
        * <p>When set to false, all ignorable whitespace will be discarded and
        * no text node is added to the DOM tree.  Note: applications intended
        * to process the "xml:space" attribute should not set this flag to false.
        * And this flag also overrides any schema datateye whitespace facets,
        * that is, all ignorable whitespace will be discarded even though
        * 'preserve' is set in schema datatype whitespace facets.
        *
        * @param include The new state of the include ignorable whitespace
        *                flag.
        *
        * @see #getIncludeIgnorableWhitespace
        */
      void setIncludeIgnorableWhitespace(const bool include);
  
      /**
        * This method allows users to set the validation scheme to be used
        * by this parser. The value is one of the ValSchemes enumerated values
        * defined by this class:
        *
        * <br>  Val_Never  - turn off validation
        * <br>  Val_Always - turn on validation
        * <br>  Val_Auto   - turn on validation if any internal/external
        *                  DTD subset have been seen
        *
        * <p>The parser's default state is: Val_Auto.</p>
        *
        * @param newScheme The new validation scheme to use.
        *
        * @see #getValidationScheme
        */
      void setValidationScheme(const ValSchemes newScheme);
  
      /** Set the 'do schema' flag
        *
        * This method allows users to enable or disable the parser's
        * schema processing. When set to false, parser will not process
        * any schema found.
        *
        * The parser's default state is: false.
        *
        * @param newState The value specifying whether schema support should
        *                 be enforced or not.
        *
        * @see #getDoSchema
        */
      void setDoSchema(const bool newState);
  
      /**
        * This method allows the user to turn full Schema constraint checking on/off.
        * Only takes effect if Schema validation is enabled.
        * If turned off, partial constraint checking is done.
        *
        * Full schema constraint checking includes those checking that may
        * be time-consuming or memory intensive. Currently, particle unique
        * attribution constraint checking and particle derivation resriction checking
        * are controlled by this option.
        *
        * The parser's default state is: false.
        *
        * @param schemaFullChecking True to turn on full schema constraint checking.
        *
        * @see #getValidationSchemaFullChecking
        */
      void setValidationSchemaFullChecking(const bool schemaFullChecking);
  
      /**
        * This method allows users to set the toCreateXMLDeclTypeNode flag
        * by this parser. By setting it to 'true' user can have XMLDecl type
        * nodes attached to the DOM tree.
        *
        * <p>The parser's default state is: false </p>
        *
        * @param create The new to create XMLDecl type node flag
        *
        */
      void setToCreateXMLDeclTypeNode(const bool create);
  
      /**
        * This method allows the user to specify a list of schemas to use.
        * If the targetNamespace of a schema specified using this method matches
        * the targetNamespace of a schema occuring in the instance document in
        * the schemaLocation attribute, or if the targetNamespace matches the
        * namespace attribute of the "import" element, the schema specified by the
        * user using this method will be used (i.e., the schemaLocation attribute
        * in the instance document or on the "import" element will be effectively ignored).
        *
        * If this method is called more than once, only the last one takes effect.
        *
        * The syntax is the same as for schemaLocation attributes in instance
        * documents: e.g, "http://www.example.com file_name.xsd". The user can
        * specify more than one XML Schema in the list.
        *
        * @param schemaLocation the list of schemas to use
        *
        * @see #getExternalSchemaLocation
        */
  
      void setExternalSchemaLocation(const XMLCh* const schemaLocation);
  
      /**
        * This method is same as setExternalSchemaLocation(const XMLCh* const).
        * It takes native char string as parameter
        *
        * @param schemaLocation the list of schemas to use
        *
        * @see #setExternalSchemaLocation(const XMLCh* const)
        */
      void setExternalSchemaLocation(const char* const schemaLocation);
  
      /**
        * This method allows the user to specify the no target namespace XML
        * Schema Location externally.  If specified, the instance document's
        * noNamespaceSchemaLocation attribute will be effectively ignored.
        *
        * If this method is called more than once, only the last one takes effect.
        *
        * The syntax is the same as for the noNamespaceSchemaLocation attribute
        * that may occur in an instance document: e.g."file_name.xsd".
        *
        * @param noNamespaceSchemaLocation the XML Schema Location with no target namespace
        *
        * @see #getExternalNoNamespaceSchemaLocation
        */
      void setExternalNoNamespaceSchemaLocation(const XMLCh* const noNamespaceSchemaLocation);
  
      /**
        * This method is same as setExternalNoNamespaceSchemaLocation(const XMLCh* const).
        * It takes native char string as parameter
        *
        * @param noNamespaceSchemaLocation the XML Schema Location with no target namespace
        *
        * @see #setExternalNoNamespaceSchemaLocation(const XMLCh* const)
        */
      void setExternalNoNamespaceSchemaLocation(const char* const noNamespaceSchemaLocation);
  
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Parsing methods
      // -----------------------------------------------------------------------
  
      /** @name Parsing methods */
      //@{
  
      /** Parse via an input source object
        *
        * This method invokes the parsing process on the XML file specified
        * by the InputSource parameter. This API is borrowed from the
        * SAX Parser interface.
        *
        * @param source A const reference to the InputSource object which
        *               points to the XML file to be parsed.
        * @param reuseGrammar The flag indicating whether the existing Grammar
        *                     should be reused or not for this parsing run.
        *                     If true, there cannot be any internal subset.
        * @exception SAXException Any SAX exception, possibly
        *            wrapping another exception.
        * @exception XMLException An exception from the parser or client
        *            handler code.
        * @exception DOM_DOMException A DOM exception as per DOM spec.
        * @see InputSource#InputSource
        * @see #setEntityResolver
        * @see #setErrorHandler
        */
      void parse(const InputSource& source, const bool reuseGrammar = false);
  
      /** Parse via a file path or URL
        *
        * This method invokes the parsing process on the XML file specified by
        * the Unicode string parameter 'systemId'. This method is borrowed
        * from the SAX Parser interface.
        *
        * @param systemId A const XMLCh pointer to the Unicode string which
        *                 contains the path to the XML file to be parsed.
        * @param reuseGrammar The flag indicating whether the existing Grammar
        *                     should be reused or not for this parsing run.
        *                     If true, there cannot be any internal subset.
        *
        * @exception SAXException Any SAX exception, possibly
        *            wrapping another exception.
        * @exception XMLException An exception from the parser or client
        *            handler code.
        * @exception DOM_DOMException A DOM exception as per DOM spec.
        * @see #parse(InputSource,...)
        */
      void parse(const XMLCh* const systemId, const bool reuseGrammar = false);
  
      /** Parse via a file path or URL (in the local code page)
        *
        * This method invokes the parsing process on the XML file specified by
        * the native char* string parameter 'systemId'.
        *
        * @param systemId A const char pointer to a native string which
        *                 contains the path to the XML file to be parsed.
        * @param reuseGrammar The flag indicating whether the existing Grammar
        *                     should be reused or not for this parsing run.
        *                     If true, there cannot be any internal subset.
        * @exception SAXException Any SAX exception, possibly
        *            wrapping another exception.
        * @exception XMLException An exception from the parser or client
        *            handler code.
        * @exception DOM_DOMException A DOM exception as per DOM spec.
        * @see #parse(InputSource,...)
        */
      void parse(const char* const systemId, const bool reuseGrammar = false);
  
      /** Begin a progressive parse operation
        *
        * This method is used to start a progressive parse on a XML file.
        * To continue parsing, subsequent calls must be to the parseNext
        * method.
        *
        * It scans through the prolog and returns a token to be used on
        * subsequent scanNext() calls. If the return value is true, then the
        * token is legal and ready for further use. If it returns false, then
        * the scan of the prolog failed and the token is not going to work on
        * subsequent scanNext() calls.
        *
        * @param systemId A pointer to a Unicode string represting the path
        *                 to the XML file to be parsed.
        * @param toFill   A token maintaing state information to maintain
        *                 internal consistency between invocation of 'parseNext'
        *                 calls.
        * @param reuseGrammar The flag indicating whether the existing Grammar
        *                     should be reused or not for this parsing process.
        *                     If true, there cannot be any internal subset.
        * @return 'true', if successful in parsing the prolog. It indicates the
        *         user can go ahead with parsing the rest of the file. It
        *         returns 'false' to indicate that the parser could not parse
        *         the prolog.
        *
        * @see #parseNext
        * @see #parseFirst(char*,...)
        * @see #parseFirst(InputSource&,...)
        */
      bool parseFirst
      (
          const   XMLCh* const    systemId
          ,       XMLPScanToken&  toFill
          , const bool            reuseGrammar = false
      );
  
      /** Begin a progressive parse operation
        *
        * This method is used to start a progressive parse on a XML file.
        * To continue parsing, subsequent calls must be to the parseNext
        * method.
        *
        * It scans through the prolog and returns a token to be used on
        * subsequent scanNext() calls. If the return value is true, then the
        * token is legal and ready for further use. If it returns false, then
        * the scan of the prolog failed and the token is not going to work on
        * subsequent scanNext() calls.
        *
        * @param systemId A pointer to a regular native string represting
        *                 the path to the XML file to be parsed.
        * @param toFill   A token maintaing state information to maintain
        *                 internal consistency between invocation of 'parseNext'
        *                 calls.
        * @param reuseGrammar The flag indicating whether the existing Grammar
        *                     should be reused or not for this parsing run.
        *                     If true, there cannot be any internal subset.
        *
        * @return 'true', if successful in parsing the prolog. It indicates the
        *         user can go ahead with parsing the rest of the file. It
        *         returns 'false' to indicate that the parser could not parse
        *         the prolog.
        *
        * @see #parseNext
        * @see #parseFirst(XMLCh*,...)
        * @see #parseFirst(InputSource&,...)
        */
      bool parseFirst
      (
          const   char* const     systemId
          ,       XMLPScanToken&  toFill
          , const bool            reuseGrammar = false
      );
  
      /** Begin a progressive parse operation
        *
        * This method is used to start a progressive parse on a XML file.
        * To continue parsing, subsequent calls must be to the parseNext
        * method.
        *
        * It scans through the prolog and returns a token to be used on
        * subsequent scanNext() calls. If the return value is true, then the
        * token is legal and ready for further use. If it returns false, then
        * the scan of the prolog failed and the token is not going to work on
        * subsequent scanNext() calls.
        *
        * @param source   A const reference to the InputSource object which
        *                 points to the XML file to be parsed.
        * @param toFill   A token maintaing state information to maintain
        *                 internal consistency between invocation of 'parseNext'
        *                 calls.
        * @param reuseGrammar The flag indicating whether the existing Grammar
        *                     should be reused or not for this parsing process.
        *                     If true, there cannot be any internal subset.
        *
        * @return 'true', if successful in parsing the prolog. It indicates the
        *         user can go ahead with parsing the rest of the file. It
        *         returns 'false' to indicate that the parser could not parse
        *         the prolog.
        *
        * @see #parseNext
        * @see #parseFirst(XMLCh*,...)
        * @see #parseFirst(char*,...)
        */
      bool parseFirst
      (
          const   InputSource&    source
          ,       XMLPScanToken&  toFill
          , const bool            reuseGrammar = false
      );
  
      /** Continue a progressive parse operation
        *
        * This method is used to continue with progressive parsing of
        * XML files started by a call to 'parseFirst' method.
        *
        * It parses the XML file and stops as soon as it comes across
        * a XML token (as defined in the XML specification).
        *
        * @param token A token maintaing state information to maintain
        *              internal consistency between invocation of 'parseNext'
        *              calls.
        *
        * @return 'true', if successful in parsing the next XML token.
        *         It indicates the user can go ahead with parsing the rest
        *         of the file. It returns 'false' to indicate that the parser
        *         could not find next token as per the XML specification
        *         production rule.
        *
        * @see #parseFirst(XMLCh*,...)
        * @see #parseFirst(char*,...)
        * @see #parseFirst(InputSource&,...)
        */
      bool parseNext(XMLPScanToken& token);
  
      /** Reset the parser after a progressive parse
        *
        * If a progressive parse loop exits before the end of the document
        * is reached, the parser has no way of knowing this. So it will leave
        * open any files or sockets or memory buffers that were in use at
        * the time that the parse loop exited.
        *
        * The next parse operation will cause these open files and such to
        * be closed, but the next parse operation might occur at some unknown
        * future point. To avoid this problem, you should reset the parser if
        * you exit the loop early.
        *
        * If you exited because of an error, then this cleanup will be done
        * for you. Its only when you exit the file prematurely of your own
        * accord, because you've found what you wanted in the file most
        * likely.
        *
        * @param token A token maintaing state information to maintain
        *              internal consistency between invocation of 'parseNext'
        *              calls.
        *
        * @see #parseFirst(XMLCh*,...)
        * @see #parseFirst(char*,...)
        * @see #parseFirst(InputSource&,...)
        */
      void parseReset(XMLPScanToken& token);
  
      //@}
  
  
  
      // -----------------------------------------------------------------------
      //  Implementation of the XMLErrorReporter interface.
      // -----------------------------------------------------------------------
  
      /** @name Implementation of the XMLErrorReporter interface. */
      //@{
  
      /** Handle errors reported from the parser
        *
        * This method is used to report back errors found while parsing the
        * XML file. This method is also borrowed from the SAX specification.
        * It calls the corresponding user installed Error Handler method:
        * 'fatal', 'error', 'warning' depending on the severity of the error.
        * This classification is defined by the XML specification.
        *
        * @param errCode An integer code for the error.
        * @param msgDomain A const pointer to an Unicode string representing
        *                  the message domain to use.
        * @param errType An enumeration classifying the severity of the error.
        * @param errorText A const pointer to an Unicode string representing
        *                  the text of the error message.
        * @param systemId  A const pointer to an Unicode string representing
        *                  the system id of the XML file where this error
        *                  was discovered.
        * @param publicId  A const pointer to an Unicode string representing
        *                  the public id of the XML file where this error
        *                  was discovered.
        * @param lineNum   The line number where the error occurred.
        * @param colNum    The column number where the error occurred.
        * @see ErrorHandler
        */
      virtual void error
      (
          const   unsigned int                errCode
          , const XMLCh* const                msgDomain
          , const XMLErrorReporter::ErrTypes  errType
          , const XMLCh* const                errorText
          , const XMLCh* const                systemId
          , const XMLCh* const                publicId
          , const unsigned int                lineNum
          , const unsigned int                colNum
      );
  
      /** Reset any error data before a new parse
       *
        * This method allows the user installed Error Handler callback to
        * 'reset' itself.
        *
        * <b><font color="#FF0000">This method is a no-op for this DOM
        * implementation.</font></b>
        */
      virtual void resetErrors();
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Implementation of the XMLEntityHandler interface.
      // -----------------------------------------------------------------------
  
      /** @name Implementation of the XMLEntityHandler interface. */
      //@{
  
      /** Handle an end of input source event
        *
        * This method is used to indicate the end of parsing of an external
        * entity file.
        *
        * <b><font color="#FF0000">This method is a no-op for this DOM
        * implementation.</font></b>
        *
        * @param inputSource A const reference to the InputSource object
        *                    which points to the XML file being parsed.
        * @see InputSource
        */
      virtual void endInputSource(const InputSource& inputSource);
  
      /** Expand a system id
        *
        * This method allows an installed XMLEntityHandler to further
        * process any system id's of enternal entities encountered in
        * the XML file being parsed, such as redirection etc.
        *
        * <b><font color="#FF0000">This method always returns 'false'
        * for this DOM implementation.</font></b>
        *
        * @param systemId  A const pointer to an Unicode string representing
        *                  the system id scanned by the parser.
        * @param toFill    A pointer to a buffer in which the application
        *                  processed system id is stored.
        * @return 'true', if any processing is done, 'false' otherwise.
        */
      virtual bool expandSystemId
      (
          const   XMLCh* const    systemId
          ,       XMLBuffer&      toFill
      );
  
      /** Reset any entity handler information
        *
        * This method allows the installed XMLEntityHandler to reset
        * itself.
        *
        * <b><font color="#FF0000">This method is a no-op for this DOM
        * implementation.</font></b>
        */
      virtual void resetEntities();
  
      /** Resolve a public/system id
        *
        * This method allows a user installed entity handler to further
        * process any pointers to external entities. The applications can
        * implement 'redirection' via this callback. This method is also
        * borrowed from the SAX specification.
        *
        * @param publicId A const pointer to a Unicode string representing the
        *                 public id of the entity just parsed.
        * @param systemId A const pointer to a Unicode string representing the
        *                 system id of the entity just parsed.
        * @return The value returned by the user installed resolveEntity
        *         method or NULL otherwise to indicate no processing was done.
        * @see EntityResolver
        */
      virtual InputSource* resolveEntity
      (
          const   XMLCh* const    publicId
          , const XMLCh* const    systemId
      );
  
      /** Handle a 'start input source' event
        *
        * This method is used to indicate the start of parsing an external
        * entity file.
        *
        * <b><font color="#FF0000">This method is a no-op for this DOM parse
        * implementation.</font></b>
        *
        * @param inputSource A const reference to the InputSource object
        *                    which points to the external entity
        *                    being parsed.
        */
      virtual void startInputSource(const InputSource& inputSource);
  
      //@}
  
  
  
      // -----------------------------------------------------------------------
      //  Implementation of the XMLDocumentHandler interface.
      // -----------------------------------------------------------------------
  
      /** @name Implementation of the XMLDocumentHandler interface. */
      //@{
  
      /** Handle document character events
        *
        * This method is used to report all the characters scanned by the
        * parser. This DOM implementation stores this data in the appropriate
        * DOM node, creating one if necessary.
        *
        * @param chars   A const pointer to a Unicode string representing the
        *                character data.
        * @param length  The length of the Unicode string returned in 'chars'.
        * @param cdataSection  A flag indicating if the characters represent
        *                      content from the CDATA section.
        */
      virtual void docCharacters
      (
          const   XMLCh* const    chars
          , const unsigned int    length
          , const bool            cdataSection
      );
  
      /** Handle a document comment event
        *
        * This method is used to report any comments scanned by the parser.
        * A new comment node is created which stores this data.
        *
        * @param comment A const pointer to a null terminated Unicode
        *                string representing the comment text.
        */
      virtual void docComment
      (
          const   XMLCh* const    comment
      );
  
      /** Handle a document PI event
        *
        * This method is used to report any PI scanned by the parser. A new
        * PI node is created and appended as a child of the current node in
        * the tree.
        *
        * @param target A const pointer to a Unicode string representing the
        *               target of the PI declaration.
        * @param data   A const pointer to a Unicode string representing the
        *               data of the PI declaration. See the PI production rule
        *               in the XML specification for details.
        */
      virtual void docPI
      (
          const   XMLCh* const    target
          , const XMLCh* const    data
      );
  
      /** Handle the end of document event
        *
        * This method is used to indicate the end of the current document.
        */
      virtual void endDocument();
  
      /** Handle and end of element event
        *
        * This method is used to indicate the end tag of an element. The
        * DOMParse pops the current element off the top of the element
        * stack, and make it the new current element.
        *
        * @param elemDecl A const reference to the object containing element
        *                 declaration information.
        * @param urlId    An id referring to the namespace prefix, if
        *                 namespaces setting is switched on.
        * @param isRoot   A flag indicating whether this element was the
        *                 root element.
        */
      virtual void endElement
      (
          const   XMLElementDecl& elemDecl
          , const unsigned int    urlId
          , const bool            isRoot
      );
  
      /** Handle and end of entity reference event
        *
        * This method is used to indicate that an end of an entity reference
        * was just scanned.
        *
        * @param entDecl A const reference to the object containing the
        *                entity declaration information.
        */
      virtual void endEntityReference
      (
          const   XMLEntityDecl&  entDecl
      );
  
      /** Handle an ignorable whitespace vent
        *
        * This method is used to report all the whitespace characters, which
        * are determined to be 'ignorable'. This distinction between characters
        * is only made, if validation is enabled.
        *
        * Any whitespace before content is ignored. If the current node is
        * already of type DOM_Node::TEXT_NODE, then these whitespaces are
        * appended, otherwise a new Text node is created which stores this
        * data. Essentially all contiguous ignorable characters are collected
        * in one node.
        *
        * @param chars   A const pointer to a Unicode string representing the
        *                ignorable whitespace character data.
        * @param length  The length of the Unicode string 'chars'.
        * @param cdataSection  A flag indicating if the characters represent
        *                      content from the CDATA section.
        */
      virtual void ignorableWhitespace
      (
          const   XMLCh* const    chars
          , const unsigned int    length
          , const bool            cdataSection
      );
  
      /** Handle a document reset event
        *
        * This method allows the user installed Document Handler to 'reset'
        * itself, freeing all the memory resources. The scanner calls this
        * method before starting a new parse event.
        */
      virtual void resetDocument();
  
      /** Handle a start document event
        *
        * This method is used to report the start of the parsing process.
        */
      virtual void startDocument();
  
      /** Handle a start element event
        *
        * This method is used to report the start of an element. It is
        * called at the end of the element, by which time all attributes
        * specified are also parsed. A new DOM Element node is created
        * along with as many attribute nodes as required. This new element
        * is added appended as a child of the current node in the tree, and
        * then replaces it as the current node (if the isEmpty flag is false.)
        *
        * @param elemDecl A const reference to the object containing element
        *                 declaration information.
        * @param urlId    An id referring to the namespace prefix, if
        *                 namespaces setting is switched on.
        * @param elemPrefix A const pointer to a Unicode string containing
        *                 the namespace prefix for this element. Applicable
        *                 only when namespace processing is enabled.
        * @param attrList A const reference to the object containing the
        *                 list of attributes just scanned for this element.
        * @param attrCount A count of number of attributes in the list
        *                 specified by the parameter 'attrList'.
        * @param isEmpty  A flag indicating whether this is an empty element
        *                 or not. If empty, then no endElement() call will
        *                 be made.
        * @param isRoot   A flag indicating whether this element was the
        *                 root element.
        * @see DocumentHandler#startElement
        */
      virtual void startElement
      (
          const   XMLElementDecl&         elemDecl
          , const unsigned int            urlId
          , const XMLCh* const            elemPrefix
          , const RefVectorOf<XMLAttr>&   attrList
          , const unsigned int            attrCount
          , const bool                    isEmpty
          , const bool                    isRoot
      );
  
      /** Handle a start entity reference event
        *
        * This method is used to indicate the start of an entity reference.
        * If the expand entity reference flag is true, then a new
        * DOM Entity reference node is created.
        *
        * @param entDecl A const reference to the object containing the
        *                entity declaration information.
        */
      virtual void startEntityReference
      (
          const   XMLEntityDecl&  entDecl
      );
  
      /** Handle an XMLDecl event
        *
        * This method is used to report the XML decl scanned by the parser.
        * Refer to the XML specification to see the meaning of parameters.
        *
        * <b><font color="#FF0000">This method is a no-op for this DOM
        * implementation.</font></b>
        *
        * @param versionStr A const pointer to a Unicode string representing
        *                   version string value.
        * @param encodingStr A const pointer to a Unicode string representing
        *                    the encoding string value.
        * @param standaloneStr A const pointer to a Unicode string
        *                      representing the standalone string value.
        * @param actualEncStr A const pointer to a Unicode string
        *                     representing the actual encoding string
        *                     value.
        */
      virtual void XMLDecl
      (
          const   XMLCh* const    versionStr
          , const XMLCh* const    encodingStr
          , const XMLCh* const    standaloneStr
          , const XMLCh* const    actualEncStr
      );
      //@}
  
  
      /** @name Deprecated Methods */
      //@{
      /** Set the 'expand entity references' flag
        *
        * DEPRECATED.  USE setCreateEntityReferenceNodes instead.
        * This method allows the user to specify whether the parser should
        * expand all entity reference nodes. When the 'do expansion' flag is
        * true, the DOM tree does not have any entity reference nodes. It is
        * replaced by the sub-tree representing the replacement text of the
        * entity. When the 'do expansion' flag is false, the DOM tree
        * contains an extra entity reference node, whose children is the
        * sub tree of the replacement text.
        *
        * @param expand The new state of the expand entity reference
        *               flag.
        */
      void setExpandEntityReferences(const bool expand);
  
      /** Get the 'expand entity references' flag.
        * DEPRECATED Use getCreateEntityReferenceNodes() instead.
        *
        * This method returns the state of the parser's expand entity
        * references flag.
        *
        * @return 'true' if the expand entity reference flag is set on
        *         the parser, 'false' otherwise.
        *
        * @see #setExpandEntityReferences
        */
      bool getExpandEntityReferences() const;
  
      /**
        * DEPRECATED Use getValidationScheme() instead
        *
        * This method returns the state of the parser's validation
        * handling flag which controls whether validation checks
        * are enforced or not.
        *
        * @return true, if the parser is currently configured to
        *         do validation, false otherwise.
        *
        * @see #setDoValidation
        * @see #getValidationScheme
        */
      bool getDoValidation() const;
  
      /**
        * DEPRECATED Use setValidationScheme(const ValSchemes newScheme) instead
        *
        * This method allows users to enable or disable the parser's validation
        * checks.
        *
        * <p>By default, the parser does not to any validation. The default
        * value is false.</p>
        *
        * @param newState The value specifying whether the parser should
        *                 do validity checks or not against the DTD in the
        *                 input XML document.
        *
        * @see #getDoValidation
        * @see #setValidationScheme
        */
      void setDoValidation(const bool newState);
  
      /**
        * Deprecated doctypehandler interfaces
        */
  	virtual void attDef
      (
          const   DTDElementDecl&     elemDecl
          , const DTDAttDef&          attDef
          , const bool                ignoring
      );
  
      virtual void doctypeComment
      (
          const   XMLCh* const    comment
      );
  
      virtual void doctypeDecl
      (
          const   DTDElementDecl& elemDecl
          , const XMLCh* const    publicId
          , const XMLCh* const    systemId
          , const bool            hasIntSubset
      );
  
      virtual void doctypePI
      (
          const   XMLCh* const    target
          , const XMLCh* const    data
      );
  
      virtual void doctypeWhitespace
      (
          const   XMLCh* const    chars
          , const unsigned int    length
      );
  
      virtual void elementDecl
      (
          const   DTDElementDecl& decl
          , const bool            isIgnored
      );
  
      virtual void endAttList
      (
          const   DTDElementDecl& elemDecl
      );
  
      virtual void endIntSubset();
  
      virtual void endExtSubset();
  
      virtual void entityDecl
      (
          const   DTDEntityDecl&  entityDecl
          , const bool            isPEDecl
          , const bool            isIgnored
      );
  
      virtual void resetDocType();
  
      virtual void notationDecl
      (
          const   XMLNotationDecl&    notDecl
          , const bool                isIgnored
      );
  
      virtual void startAttList
      (
          const   DTDElementDecl& elemDecl
      );
  
      virtual void startIntSubset();
  
      virtual void startExtSubset();
  
      virtual void TextDecl
      (
          const   XMLCh* const    versionStr
          , const XMLCh* const    encodingStr
      );
  
  
      //@}
  
  
  protected :
      // -----------------------------------------------------------------------
      //  Protected getter methods
      // -----------------------------------------------------------------------
  
      /** @name Protected getter methods */
      //@{
      /** Get the current DOM node
        *
        * This provides derived classes with access to the current node, i.e.
        * the node to which new nodes are being added.
        */
      DOM_Node getCurrentNode();
  
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Protected setter methods
      // -----------------------------------------------------------------------
  
      /** @name Protected setter methods */
      //@{
  
      /** Set the current DOM node
        *
        * This method sets the current node maintained inside the parser to
        * the one specified.
        *
        * @param toSet The DOM node which will be the current node.
        */
      void setCurrentNode(DOM_Node toSet);
  
      /** Set the document node
        *
        * This method sets the DOM Document node to the one specified.
        *
        * @param toSet The new DOM Document node for this XML document.
        */
      void setDocument(DOM_Document toSet);
      //@}
  
  
  private :
      // -----------------------------------------------------------------------
      //  Private data members
      //
      //  fCurrentNode
      //  fCurrentParent
      //      Used to track the current node during nested element events. Since
      //      the tree must be built from a set of disjoint callbacks, we need
      //      these to keep up with where we currently are.
      //
      //  fDocument
      //      The root document object, filled with the document contents.
      //
      //  fEntityResolver
      //      The installed SAX entity resolver, if any. Null if none.
      //
      //  fErrorHandler
      //      The installed SAX error handler, if any. Null if none.
      //
      //  fCreateEntityReferenceNode
      //      Indicates whether entity reference nodes should be created.
      //
      //  fIncludeIgnorableWhitespace
      //      Indicates whether ignorable whiltespace should be added to
      //      the DOM tree for validating parsers.
      //
      //  fNodeStack
      //      Used to track previous parent nodes during nested element events.
      //
      //  fParseInProgress
      //      Used to prevent multiple entrance to the parser while its doing
      //      a parse.
      //
      //  fScanner
      //      The scanner used for this parser. This is created during the
      //      constructor.
      //
      //  fWithinElement
      //      A flag to indicate that the parser is within at least one level
      //      of element processing.
      //
      //  fDocumentType
      //      Used to store and update the documentType variable information
      //      in fDocument
      //
      //  fToCreateXMLDecTypeNode
      //      A flag to create a DOM_XMLDecl node in the ODM tree if it exists
      //      This is an extension to xerces implementation
      //
      // -----------------------------------------------------------------------
      DOM_Node                fCurrentParent;
      DOM_Node                fCurrentNode;
      DOM_Document            fDocument;
      EntityResolver*         fEntityResolver;
      ErrorHandler*           fErrorHandler;
      bool                    fCreateEntityReferenceNodes;
      bool                    fIncludeIgnorableWhitespace;
      ValueStackOf<DOM_Node>* fNodeStack;
      bool                    fParseInProgress;
      XMLScanner*             fScanner;
      bool                    fWithinElement;
      DocumentTypeImpl*       fDocumentType;
      bool                    fToCreateXMLDeclTypeNode;
  };
  
  
  
  // ---------------------------------------------------------------------------
  //  DOMParser: Handlers for the XMLEntityHandler interface
  // ---------------------------------------------------------------------------
  inline void DOMParser::endInputSource(const InputSource&)
  {
      // The DOM entity resolver doesn't handle this
  }
  
  inline bool DOMParser::expandSystemId(const XMLCh* const, XMLBuffer&)
  {
      // The DOM entity resolver doesn't handle this
      return false;
  }
  
  inline void DOMParser::resetEntities()
  {
      // Nothing to do on this one
  }
  
  inline void DOMParser::startInputSource(const InputSource&)
  {
      // The DOM entity resolver doesn't handle this
  }
  
  
  // ---------------------------------------------------------------------------
  //  DOMParser: Getter methods
  // ---------------------------------------------------------------------------
  inline DOM_Document DOMParser::getDocument()
  {
      return fDocument;
  }
  
  inline ErrorHandler* DOMParser::getErrorHandler()
  {
      return fErrorHandler;
  }
  
  inline const ErrorHandler* DOMParser::getErrorHandler() const
  {
      return fErrorHandler;
  }
  
  inline EntityResolver* DOMParser::getEntityResolver()
  {
      return fEntityResolver;
  }
  
  inline const EntityResolver* DOMParser::getEntityResolver() const
  {
      return fEntityResolver;
  }
  
  inline bool DOMParser::getExpandEntityReferences() const
  {
      return fCreateEntityReferenceNodes;
  }
  inline bool DOMParser::getCreateEntityReferenceNodes() const
  {
      return fCreateEntityReferenceNodes;
  }
  
  inline bool DOMParser::getIncludeIgnorableWhitespace() const
  {
      return fIncludeIgnorableWhitespace;
  }
  
  inline const XMLScanner& DOMParser::getScanner() const
  {
      return *fScanner;
  }
  
  inline bool DOMParser::getToCreateXMLDeclTypeNode() const
  {
      return fToCreateXMLDeclTypeNode;
  }
  
  
  // ---------------------------------------------------------------------------
  //  DOMParser: Setter methods
  // ---------------------------------------------------------------------------
  inline void DOMParser::setExpandEntityReferences(const bool expand)
  {
      fCreateEntityReferenceNodes = expand;
  }
  
  inline void DOMParser::setCreateEntityReferenceNodes(const bool create)
  {
      fCreateEntityReferenceNodes = create;
  }
  
  inline void DOMParser::setIncludeIgnorableWhitespace(const bool include)
  {
      fIncludeIgnorableWhitespace = include;
  }
  
  inline void DOMParser::setToCreateXMLDeclTypeNode(const bool create)
  {
      fToCreateXMLDeclTypeNode = create;
  }
  
  
  // ---------------------------------------------------------------------------
  //  DOMParser: Protected getter methods
  // ---------------------------------------------------------------------------
  inline DOM_Node DOMParser::getCurrentNode()
  {
      return fCurrentNode;
  }
  
  
  // ---------------------------------------------------------------------------
  //  DOMParser: Protected setter methods
  // ---------------------------------------------------------------------------
  inline void DOMParser::setCurrentNode(DOM_Node toSet)
  {
      fCurrentNode = toSet;
  }
  
  inline void DOMParser::setDocument(DOM_Document toSet)
  {
      fDocument = toSet;
  }
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/parsers/IDOMParser.hpp
  
  Index: IDOMParser.hpp
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 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) 2001, International
   * Business Machines, Inc., http://www.ibm.com .  For more information
   * on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  /*
   * $Id: IDOMParser.hpp,v 1.1 2002/10/23 08:55:11 lilantha Exp $
   *
   */
  
  #if !defined(IDOMPARSER_HPP)
  #define IDOMPARSER_HPP
  
  
  #include <xercesc/idom/IDOM_Document.hpp>
  #include <xercesc/framework/XMLDocumentHandler.hpp>
  #include <xercesc/framework/XMLErrorReporter.hpp>
  #include <xercesc/framework/XMLEntityHandler.hpp>
  #include <xercesc/util/ValueStackOf.hpp>
  
  #include <xercesc/validators/DTD/DocTypeHandler.hpp>
  #include <xercesc/idom/IDOM_DocumentType.hpp>
  #include <xercesc/validators/DTD/DTDElementDecl.hpp>
  
  class EntityResolver;
  class ErrorHandler;
  class XMLPScanToken;
  class XMLScanner;
  class XMLValidator;
  class IDDocumentImpl;
  class IDDocumentTypeImpl;
  
  
  /**
    * This class implements the Document Object Model (DOM) interface.
    * It should be used by applications which choose to parse and
    * process the XML document using the DOM api's. This implementation
    * also allows the applications to install an error and an entitty
    * handler (useful extensions to the DOM specification).
    *
    * <p>It can be used to instantiate a validating or non-validating
    * parser, by setting a member flag.</p>
    */
  class PARSERS_EXPORT IDOMParser :
  
      public XMLDocumentHandler
      , public XMLErrorReporter
      , public XMLEntityHandler
      , public DocTypeHandler
  {
  public :
      // -----------------------------------------------------------------------
      //  Class types
      // -----------------------------------------------------------------------
      enum ValSchemes
      {
          Val_Never
          , Val_Always
          , Val_Auto
      };
  
  
      // -----------------------------------------------------------------------
      //  Constructors and Detructor
      // -----------------------------------------------------------------------
  
      /** @name Constructors and Destructor */
      //@{
      /** Construct a IDOMParser, with an optional validator
        *
        * Constructor with an instance of validator class to use for
        * validation. If you don't provide a validator, a default one will
        * be created for you in the scanner.
        *
        * @param valToAdopt Pointer to the validator instance to use. The
        *                   parser is responsible for freeing the memory.
        */
      IDOMParser(XMLValidator* const valToAdopt = 0);
  
      /**
        * Destructor
        */
      ~IDOMParser();
  
      //@}
  
      /** Reset the parser
        *
        * This method resets the state of the IDOM driver and makes
        * it ready for a fresh parse run.
        */
      void reset();
  
      /** Reset the documents vector pool and release all the associated memory
        * back to the system.
        *
        * When parsing a document using an IDOMParser, all memory allocated
        * for a DOM tree is associated to the DOM document.
        *
        * If you do multiple parse using the same IDOMParser instance, then
        * multiple DOM documents will be generated and saved in a vector pool.
        * All these documents (and thus all the allocated memory)
        * won't be deleted until the parser instance is destroyed.
        *
        * If you don't need these DOM documents anymore and don't want to
        * destroy the IDOMParser instance at this moment, then you can call this method
        * to reset the document vector pool and release all the allocated memory
        * back to the system.
        *
        * It is an error to call this method if you are in the middle of a
        * parse (e.g. in the mid of a progressive parse).
        *
        * @exception IOException An exception from the parser if this function
        *            is called when a parse is in progress.
        *
        */
      void resetDocumentPool();
  
  
      // -----------------------------------------------------------------------
      //  Getter methods
      // -----------------------------------------------------------------------
  
      /** @name Getter methods */
      //@{
  
      /** Get the IDOM document
        *
        * This method returns the IDOM_Document object representing the
        * root of the document tree. This object provides the primary
        * access to the document's data.
        *
        * @return The IDOM_Document object which represents the entire
        *         XML document.
        */
      IDOM_Document* getDocument();
  
      /** Get a pointer to the error handler
        *
        * This method returns the installed error handler. If no handler
        * has been installed, then it will be a zero pointer.
        *
        * @return The pointer to the installed error handler object.
        */
      ErrorHandler* getErrorHandler();
  
      /** Get a const pointer to the error handler
        *
        * This method returns the installed error handler.  If no handler
        * has been installed, then it will be a zero pointer.
        *
        * @return A const pointer to the installed error handler object.
        */
      const ErrorHandler* getErrorHandler() const;
  
      /** Get a pointer to the entity resolver
        *
        * This method returns the installed entity resolver.  If no resolver
        * has been installed, then it will be a zero pointer.
        *
        * @return The pointer to the installed entity resolver object.
        */
      EntityResolver* getEntityResolver();
  
      /** Get a const pointer to the entity resolver
        *
        * This method returns the installed entity resolver. If no resolver
        * has been installed, then it will be a zero pointer.
        *
        * @return A const pointer to the installed entity resolver object.
        */
      const EntityResolver* getEntityResolver() const;
  
      /** Get a const reference to the validator
        *
        * This method returns a reference to the parser's installed
        * validator.
        *
        * @return A const reference to the installed validator object.
        */
      const XMLValidator& getValidator() const;
  
      /**
        * This method returns an enumerated value that indicates the current
        * validation scheme set on this parser.
        *
        * @return The ValSchemes value current set on this parser.
        * @see #setValidationScheme
        */
      ValSchemes getValidationScheme() const;
  
      /** Get the 'do schema' flag
        *
        * This method returns the state of the parser's schema processing
        * flag.
        *
        * @return true, if the parser is currently configured to
        *         understand schema, false otherwise.
        *
        * @see #setDoSchema
        */
      bool getDoSchema() const;
  
      /** Get the 'full schema constraint checking' flag
        *
        * This method returns the state of the parser's full schema constraint
        * checking flag.
        *
        * @return true, if the parser is currently configured to
        *         have full schema constraint checking, false otherwise.
        *
        * @see #setValidationSchemaFullChecking
        */
      bool getValidationSchemaFullChecking() const;
  
      /** Get error count from the last parse operation.
        *
        * This method returns the error count from the last parse
        * operation. Note that this count is actually stored in the
        * scanner, so this method simply returns what the
        * scanner reports.
        *
        * @return number of errors encountered during the latest
        *			parse operation.
        *
        */
      int getErrorCount() const;
  
      /** Get the 'do namespaces' flag
        *
        * This method returns the state of the parser's namespace processing
        * flag.
        *
        * @return true, if the parser is currently configured to
        *         understand namespaces, false otherwise.
        *
        * @see #setDoNamespaces
        */
      bool getDoNamespaces() const;
  
      /** Get the 'exit on first error' flag
        *
        * This method returns the state of the parser's
        * exit-on-First-Fatal-Error flag. If this flag is true, then the
        * parse will exit the first time it sees any non-wellformed XML or
        * any validity error. The default state is true.
        *
        * @return true, if the parser is currently configured to
        *         exit on the first fatal error, false otherwise.
        *
        * @see #setExitOnFirstFatalError
        */
      bool getExitOnFirstFatalError() const;
  
      /**
        * This method returns the state of the parser's
        * validation-constraint-fatal flag.
        *
        * @return true, if the parser is currently configured to
        *         set validation constraint errors as fatal, false
        *         otherwise.
        *
        * @see #setValidationContraintFatal
        */
      bool getValidationConstraintFatal() const;
  
      /** Get the 'expand entity references' flag.
        * DEPRECATED Use getCreateEntityReferenceNodes() instead.
        *
        * This method returns the state of the parser's expand entity
        * references flag.
        *
        * @return 'true' if the expand entity reference flag is set on
        *         the parser, 'false' otherwise.
        *
        * @see #setExpandEntityReferences
        */
      bool getExpandEntityReferences() const;
  
      /** Get the 'include entity references' flag
        *
        * This flag  specifies whether the parser is
        * creating entity reference nodes in the DOM tree being produced.
        * When the 'create' flag is
        * true, the DOM tree will contain entity reference nodes.
        * When the 'create' flag is false, no entity reference nodes
        * are included in the DOM tree.
        * <p>The replacement text
        * of the entity is included in either case, either as a
        * child of the Entity Reference node or in place at the location
        * of the reference.
        *
        * @return  The state of the create entity reference node
        *               flag.
        * @see #setCreateEntityReferenceNodes
        */
      bool  getCreateEntityReferenceNodes()const;
  
     /** Get the 'include ignorable whitespace' flag.
        *
        * This method returns the state of the parser's include ignorable
        * whitespace flag.
        *
        * @return 'true' if the include ignorable whitespace flag is set on
        *         the parser, 'false' otherwise.
        *
        * @see #setIncludeIgnorableWhitespace
        */
      bool getIncludeIgnorableWhitespace() const;
  
     /** Get the set of Namespace/SchemaLocation that is specified externaly.
        *
        * This method returns the list of Namespace/SchemaLocation that was
        * specified using setExternalSchemaLocation.
        *
        * The parser owns the returned string, and the memory allocated for
        * the returned string will be destroyed when the parser is deleted.
        *
        * To ensure assessiblity of the returned information after the parser
        * is deleted, callers need to copy and store the returned information
        * somewhere else.
        *
        * @return a pointer to the list of Namespace/SchemaLocation that was
        *         specified externally.  The pointer spans the same life-time as
        *         the parser.  A null pointer is returned if nothing
        *         was specified externally.
        *
        * @see #setExternalSchemaLocation(const XMLCh* const)
        */
      XMLCh* getExternalSchemaLocation() const;
  
     /** Get the noNamespace SchemaLocation that is specified externaly.
        *
        * This method returns the no target namespace XML Schema Location
        * that was specified using setExternalNoNamespaceSchemaLocation.
        *
        * The parser owns the returned string, and the memory allocated for
        * the returned string will be destroyed when the parser is deleted.
        *
        * To ensure assessiblity of the returned information after the parser
        * is deleted, callers need to copy and store the returned information
        * somewhere else.
        *
        * @return a pointer to the no target namespace Schema Location that was
        *         specified externally.  The pointer spans the same life-time as
        *         the parser.  A null pointer is returned if nothing
        *         was specified externally.
        *
        * @see #setExternalNoNamespaceSchemaLocation(const XMLCh* const)
        */
      XMLCh* getExternalNoNamespaceSchemaLocation() const;
  
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Setter methods
      // -----------------------------------------------------------------------
  
      /** @name Setter methods */
      //@{
  
      /** Set the error handler
        *
        * This method allows applications to install their own error handler
        * to trap error and warning messages.
        *
        * <i>Any previously set handler is merely dropped, since the parser
        * does not own them.</i>
        *
        * @param handler  A const pointer to the user supplied error
        *                 handler.
        *
        * @see #getErrorHandler
        */
      void setErrorHandler(ErrorHandler* const handler);
  
      /** Set the entity resolver
        *
        * This method allows applications to install their own entity
        * resolver. By installing an entity resolver, the applications
        * can trap and potentially redirect references to external
        * entities.
        *
        * <i>Any previously set resolver is merely dropped, since the parser
        * does not own them.</i>
        *
        * @param handler  A const pointer to the user supplied entity
        *                 resolver.
        *
        * @see #getEntityResolver
        */
      void setEntityResolver(EntityResolver* const handler);
  
      /** Set the 'do namespaces' flag
        *
        * This method allows users to enable or disable the parser's
        * namespace processing. When set to true, parser starts enforcing
        * all the constraints and rules specified by the NameSpace
        * specification.
        *
        * The parser's default state is: false.
        *
        * This flag is ignored by the underlying scanner if the installed
        * validator indicates that namespace constraints should be
        * enforced.
        *
        * @param newState The value specifying whether NameSpace rules should
        *                 be enforced or not.
        *
        * @see #getDoNamespaces
        */
      void setDoNamespaces(const bool newState);
  
      /** Set the 'exit on first error' flag
        *
        * This method allows users to set the parser's behaviour when it
        * encounters the first fatal error. If set to true, the parser
        * will exit at the first fatal error. If false, then it will
        * report the error and continue processing.
        *
        * The default value is 'true' and the parser exits on the
        * first fatal error.
        *
        * @param newState The value specifying whether the parser should
        *                 continue or exit when it encounters the first
        *                 fatal error.
        *
        * @see #getExitOnFirstFatalError
        */
      void setExitOnFirstFatalError(const bool newState);
  
      /**
        * This method allows users to set the parser's behaviour when it
        * encounters a validtion constraint error. If set to true, and the
        * the parser is set to exit when it encounter the first fatal error,
        * the parser will exit at the first encounter. If false, then it will
        * report the error and continue processing.
        *
        * <p>The default value is 'false'.</p>
        *
        * @param newState The value specifying whether the parser should
        *                 continue or exit when it encounters a validation
        *                 constraint error.
        *
        * @see #getValidationConstraintFatal
        */
      void setValidationConstraintFatal(const bool newState);
  
      /** Set the 'expand entity references' flag
        *
        * DEPRECATED.  USE setCreateEntityReferenceNodes instead.
        * This method allows the user to specify whether the parser should
        * expand all entity reference nodes. When the 'do expansion' flag is
        * true, the DOM tree does not have any entity reference nodes. It is
        * replaced by the sub-tree representing the replacement text of the
        * entity. When the 'do expansion' flag is false, the DOM tree
        * contains an extra entity reference node, whose children is the
        * sub tree of the replacement text.
        *
        * @param expand The new state of the expand entity reference
        *               flag.
        */
      void setExpandEntityReferences(const bool expand);
  
       /** Set the 'include entity references' flag
        *
        * This method allows the user to specify whether the parser should
        * create entity reference nodes in the DOM tree being produced.
        * When the 'create' flag is
        * true, the DOM tree constains entity reference nodes.
        * When the 'create' flag is false, no entity reference nodes
        * are included in the DOM tree.
        * <p>The replacement text
        * of the entity is included in either case, either as a
        * child of the Entity Reference node or in place at the location
        * of the reference.
        *
        * @param create The new state of the create entity reference nodes
        *               flag.
        */
      void setCreateEntityReferenceNodes(const bool create);
  
     /** Set the 'include ignorable whitespace' flag
        *
        * This method allows the user to specify whether a validating parser
        * should include ignorable whitespaces as text nodes.  It has no effect
        * on non-validating parsers which always include non-markup text.
        * <p>When set to true (also the default), ignorable whitespaces will be
        * added to the DOM tree as text nodes.  The method
        * IDOM_Text::isIgnorableWhitespace() will return true for those text
        * nodes only.
        * <p>When set to false, all ignorable whitespace will be discarded and
        * no text node is added to the DOM tree.  Note: applications intended
        * to process the "xml:space" attribute should not set this flag to false.
        * And this flag also overrides any schema datateye whitespace facets,
        * that is, all ignorable whitespace will be discarded even though
        * 'preserve' is set in schema datatype whitespace facets.
        *
        * @param include The new state of the include ignorable whitespace
        *                flag.
        *
        * @see #getIncludeIgnorableWhitespace
        */
      void setIncludeIgnorableWhitespace(const bool include);
  
      /**
        * This method allows users to set the validation scheme to be used
        * by this parser. The value is one of the ValSchemes enumerated values
        * defined by this class:
        *
        * <br>  Val_Never  - turn off validation
        * <br>  Val_Always - turn on validation
        * <br>  Val_Auto   - turn on validation if any internal/external
        *                  DTD subset have been seen
        *
        * <p>The parser's default state is: Val_Auto.</p>
        *
        * @param newScheme The new validation scheme to use.
        *
        * @see #getValidationScheme
        */
      void setValidationScheme(const ValSchemes newScheme);
  
      /** Set the 'do schema' flag
        *
        * This method allows users to enable or disable the parser's
        * schema processing. When set to false, parser will not process
        * any schema found.
        *
        * The parser's default state is: false.
        *
        * @param newState The value specifying whether schema support should
        *                 be enforced or not.
        *
        * @see #getDoSchema
        */
      void setDoSchema(const bool newState);
  
      /**
        * This method allows the user to turn full Schema constraint checking on/off.
        * Only takes effect if Schema validation is enabled.
        * If turned off, partial constraint checking is done.
        *
        * Full schema constraint checking includes those checking that may
        * be time-consuming or memory intensive. Currently, particle unique
        * attribution constraint checking and particle derivation resriction checking
        * are controlled by this option.
        *
        * The parser's default state is: false.
        *
        * @param schemaFullChecking True to turn on full schema constraint checking.
        *
        * @see #getValidationSchemaFullChecking
        */
      void setValidationSchemaFullChecking(const bool schemaFullChecking);
  
      /**
        * This method allows the user to specify a list of schemas to use.
        * If the targetNamespace of a schema specified using this method matches
        * the targetNamespace of a schema occuring in the instance document in
        * the schemaLocation attribute, or if the targetNamespace matches the
        * namespace attribute of the "import" element, the schema specified by the
        * user using this method will be used (i.e., the schemaLocation attribute
        * in the instance document or on the "import" element will be effectively ignored).
        *
        * If this method is called more than once, only the last one takes effect.
        *
        * The syntax is the same as for schemaLocation attributes in instance
        * documents: e.g, "http://www.example.com file_name.xsd". The user can
        * specify more than one XML Schema in the list.
        *
        * @param schemaLocation the list of schemas to use
        *
        * @see #getExternalSchemaLocation
        */
  
      void setExternalSchemaLocation(const XMLCh* const schemaLocation);
  
      /**
        * This method is same as setExternalSchemaLocation(const XMLCh* const).
        * It takes native char string as parameter
        *
        * @param schemaLocation the list of schemas to use
        *
        * @see #setExternalSchemaLocation(const XMLCh* const)
        */
      void setExternalSchemaLocation(const char* const schemaLocation);
  
      /**
        * This method allows the user to specify the no target namespace XML
        * Schema Location externally.  If specified, the instance document's
        * noNamespaceSchemaLocation attribute will be effectively ignored.
        *
        * If this method is called more than once, only the last one takes effect.
        *
        * The syntax is the same as for the noNamespaceSchemaLocation attribute
        * that may occur in an instance document: e.g."file_name.xsd".
        *
        * @param noNamespaceSchemaLocation the XML Schema Location with no target namespace
        *
        * @see #getExternalNoNamespaceSchemaLocation
        */
      void setExternalNoNamespaceSchemaLocation(const XMLCh* const noNamespaceSchemaLocation);
  
      /**
        * This method is same as setExternalNoNamespaceSchemaLocation(const XMLCh* const).
        * It takes native char string as parameter
        *
        * @param noNamespaceSchemaLocation the XML Schema Location with no target namespace
        *
        * @see #setExternalNoNamespaceSchemaLocation(const XMLCh* const)
        */
      void setExternalNoNamespaceSchemaLocation(const char* const noNamespaceSchemaLocation);
  
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Parsing methods
      // -----------------------------------------------------------------------
  
      /** @name Parsing methods */
      //@{
  
      /** Parse via an input source object
        *
        * This method invokes the parsing process on the XML file specified
        * by the InputSource parameter. This API is borrowed from the
        * SAX Parser interface.
        *
        * @param source A const reference to the InputSource object which
        *               points to the XML file to be parsed.
        * @param reuseGrammar The flag indicating whether the existing Grammar
        *                     should be reused or not for this parsing run.
        *                     If true, there cannot be any internal subset.
        * @exception SAXException Any SAX exception, possibly
        *            wrapping another exception.
        * @exception XMLException An exception from the parser or client
        *            handler code.
        * @exception IDOM_DOMException A DOM exception as per DOM spec.
        * @see InputSource#InputSource
        * @see #setEntityResolver
        * @see #setErrorHandler
        */
      void parse(const InputSource& source, const bool reuseGrammar = false);
  
      /** Parse via a file path or URL
        *
        * This method invokes the parsing process on the XML file specified by
        * the Unicode string parameter 'systemId'. This method is borrowed
        * from the SAX Parser interface.
        *
        * @param systemId A const XMLCh pointer to the Unicode string which
        *                 contains the path to the XML file to be parsed.
        * @param reuseGrammar The flag indicating whether the existing Grammar
        *                     should be reused or not for this parsing run.
        *                     If true, there cannot be any internal subset.
        *
        * @exception SAXException Any SAX exception, possibly
        *            wrapping another exception.
        * @exception XMLException An exception from the parser or client
        *            handler code.
        * @exception DOM_DOMException A DOM exception as per DOM spec.
        * @see #parse(InputSource,...)
        */
      void parse(const XMLCh* const systemId, const bool reuseGrammar = false);
  
      /** Parse via a file path or URL (in the local code page)
        *
        * This method invokes the parsing process on the XML file specified by
        * the native char* string parameter 'systemId'.
        *
        * @param systemId A const char pointer to a native string which
        *                 contains the path to the XML file to be parsed.
        * @param reuseGrammar The flag indicating whether the existing Grammar
        *                     should be reused or not for this parsing run.
        *                     If true, there cannot be any internal subset.
        *
        * @exception SAXException Any SAX exception, possibly
        *            wrapping another exception.
        * @exception XMLException An exception from the parser or client
        *            handler code.
        * @exception DOM_DOMException A DOM exception as per DOM spec.
        * @see #parse(InputSource,...)
        */
      void parse(const char* const systemId, const bool reuseGrammar = false);
  
      /** Begin a progressive parse operation
        *
        * This method is used to start a progressive parse on a XML file.
        * To continue parsing, subsequent calls must be to the parseNext
        * method.
        *
        * It scans through the prolog and returns a token to be used on
        * subsequent scanNext() calls. If the return value is true, then the
        * token is legal and ready for further use. If it returns false, then
        * the scan of the prolog failed and the token is not going to work on
        * subsequent scanNext() calls.
        *
        * @param systemId A pointer to a Unicode string represting the path
        *                 to the XML file to be parsed.
        * @param toFill   A token maintaing state information to maintain
        *                 internal consistency between invocation of 'parseNext'
        *                 calls.
        * @param reuseGrammar The flag indicating whether the existing Grammar
        *                     should be reused or not for this parsing process.
        *                     If true, there cannot be any internal subset.
        * @return 'true', if successful in parsing the prolog. It indicates the
        *         user can go ahead with parsing the rest of the file. It
        *         returns 'false' to indicate that the parser could not parse
        *         the prolog.
        *
        * @see #parseNext
        * @see #parseFirst(char*,...)
        * @see #parseFirst(InputSource&,...)
        */
      bool parseFirst
      (
          const   XMLCh* const    systemId
          ,       XMLPScanToken&  toFill
          , const bool            reuseGrammar = false
      );
  
      /** Begin a progressive parse operation
        *
        * This method is used to start a progressive parse on a XML file.
        * To continue parsing, subsequent calls must be to the parseNext
        * method.
        *
        * It scans through the prolog and returns a token to be used on
        * subsequent scanNext() calls. If the return value is true, then the
        * token is legal and ready for further use. If it returns false, then
        * the scan of the prolog failed and the token is not going to work on
        * subsequent scanNext() calls.
        *
        * @param systemId A pointer to a regular native string represting
        *                 the path to the XML file to be parsed.
        * @param toFill   A token maintaing state information to maintain
        *                 internal consistency between invocation of 'parseNext'
        *                 calls.
        * @param reuseGrammar The flag indicating whether the existing Grammar
        *                     should be reused or not for this parsing run.
        *                     If true, there cannot be any internal subset.
        *
        * @return 'true', if successful in parsing the prolog. It indicates the
        *         user can go ahead with parsing the rest of the file. It
        *         returns 'false' to indicate that the parser could not parse
        *         the prolog.
        *
        * @see #parseNext
        * @see #parseFirst(XMLCh*,...)
        * @see #parseFirst(InputSource&,...)
        */
      bool parseFirst
      (
          const   char* const     systemId
          ,       XMLPScanToken&  toFill
          , const bool            reuseGrammar = false
      );
  
      /** Begin a progressive parse operation
        *
        * This method is used to start a progressive parse on a XML file.
        * To continue parsing, subsequent calls must be to the parseNext
        * method.
        *
        * It scans through the prolog and returns a token to be used on
        * subsequent scanNext() calls. If the return value is true, then the
        * token is legal and ready for further use. If it returns false, then
        * the scan of the prolog failed and the token is not going to work on
        * subsequent scanNext() calls.
        *
        * @param source   A const reference to the InputSource object which
        *                 points to the XML file to be parsed.
        * @param toFill   A token maintaing state information to maintain
        *                 internal consistency between invocation of 'parseNext'
        *                 calls.
        * @param reuseGrammar The flag indicating whether the existing Grammar
        *                     should be reused or not for this parsing process.
        *                     If true, there cannot be any internal subset.
        *
        * @return 'true', if successful in parsing the prolog. It indicates the
        *         user can go ahead with parsing the rest of the file. It
        *         returns 'false' to indicate that the parser could not parse
        *         the prolog.
        *
        * @see #parseNext
        * @see #parseFirst(XMLCh*,...)
        * @see #parseFirst(char*,...)
        */
      bool parseFirst
      (
          const   InputSource&    source
          ,       XMLPScanToken&  toFill
          , const bool            reuseGrammar = false
      );
  
      /** Continue a progressive parse operation
        *
        * This method is used to continue with progressive parsing of
        * XML files started by a call to 'parseFirst' method.
        *
        * It parses the XML file and stops as soon as it comes across
        * a XML token (as defined in the XML specification).
        *
        * @param token A token maintaing state information to maintain
        *              internal consistency between invocation of 'parseNext'
        *              calls.
        *
        * @return 'true', if successful in parsing the next XML token.
        *         It indicates the user can go ahead with parsing the rest
        *         of the file. It returns 'false' to indicate that the parser
        *         could not find next token as per the XML specification
        *         production rule.
        *
        * @see #parseFirst(XMLCh*,...)
        * @see #parseFirst(char*,...)
        * @see #parseFirst(InputSource&,...)
        */
      bool parseNext(XMLPScanToken& token);
  
      /** Reset the parser after a progressive parse
        *
        * If a progressive parse loop exits before the end of the document
        * is reached, the parser has no way of knowing this. So it will leave
        * open any files or sockets or memory buffers that were in use at
        * the time that the parse loop exited.
        *
        * The next parse operation will cause these open files and such to
        * be closed, but the next parse operation might occur at some unknown
        * future point. To avoid this problem, you should reset the parser if
        * you exit the loop early.
        *
        * If you exited because of an error, then this cleanup will be done
        * for you. Its only when you exit the file prematurely of your own
        * accord, because you've found what you wanted in the file most
        * likely.
        *
        * @param token A token maintaing state information to maintain
        *              internal consistency between invocation of 'parseNext'
        *              calls.
        *
        * @see #parseFirst(XMLCh*,...)
        * @see #parseFirst(char*,...)
        * @see #parseFirst(InputSource&,...)
        */
      void parseReset(XMLPScanToken& token);
  
      //@}
  
  
  
      // -----------------------------------------------------------------------
      //  Implementation of the XMLErrorReporter interface.
      // -----------------------------------------------------------------------
  
      /** @name Implementation of the XMLErrorReporter interface. */
      //@{
  
      /** Handle errors reported from the parser
        *
        * This method is used to report back errors found while parsing the
        * XML file. This method is also borrowed from the SAX specification.
        * It calls the corresponding user installed Error Handler method:
        * 'fatal', 'error', 'warning' depending on the severity of the error.
        * This classification is defined by the XML specification.
        *
        * @param errCode An integer code for the error.
        * @param msgDomain A const pointer to an Unicode string representing
        *                  the message domain to use.
        * @param errType An enumeration classifying the severity of the error.
        * @param errorText A const pointer to an Unicode string representing
        *                  the text of the error message.
        * @param systemId  A const pointer to an Unicode string representing
        *                  the system id of the XML file where this error
        *                  was discovered.
        * @param publicId  A const pointer to an Unicode string representing
        *                  the public id of the XML file where this error
        *                  was discovered.
        * @param lineNum   The line number where the error occurred.
        * @param colNum    The column number where the error occurred.
        * @see ErrorHandler
        */
      virtual void error
      (
          const   unsigned int                errCode
          , const XMLCh* const                msgDomain
          , const XMLErrorReporter::ErrTypes  errType
          , const XMLCh* const                errorText
          , const XMLCh* const                systemId
          , const XMLCh* const                publicId
          , const unsigned int                lineNum
          , const unsigned int                colNum
      );
  
      /** Reset any error data before a new parse
       *
        * This method allows the user installed Error Handler callback to
        * 'reset' itself.
        *
        * <b><font color="#FF0000">This method is a no-op for this IDOM
        * implementation.</font></b>
        */
      virtual void resetErrors();
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Implementation of the XMLEntityHandler interface.
      // -----------------------------------------------------------------------
  
      /** @name Implementation of the XMLEntityHandler interface. */
      //@{
  
      /** Handle an end of input source event
        *
        * This method is used to indicate the end of parsing of an external
        * entity file.
        *
        * <b><font color="#FF0000">This method is a no-op for this IDOM
        * implementation.</font></b>
        *
        * @param inputSource A const reference to the InputSource object
        *                    which points to the XML file being parsed.
        * @see InputSource
        */
      virtual void endInputSource(const InputSource& inputSource);
  
      /** Expand a system id
        *
        * This method allows an installed XMLEntityHandler to further
        * process any system id's of enternal entities encountered in
        * the XML file being parsed, such as redirection etc.
        *
        * <b><font color="#FF0000">This method always returns 'false'
        * for this IDOM implementation.</font></b>
        *
        * @param systemId  A const pointer to an Unicode string representing
        *                  the system id scanned by the parser.
        * @param toFill    A pointer to a buffer in which the application
        *                  processed system id is stored.
        * @return 'true', if any processing is done, 'false' otherwise.
        */
      virtual bool expandSystemId
      (
          const   XMLCh* const    systemId
          ,       XMLBuffer&      toFill
      );
  
      /** Reset any entity handler information
        *
        * This method allows the installed XMLEntityHandler to reset
        * itself.
        *
        * <b><font color="#FF0000">This method is a no-op for this IDOM
        * implementation.</font></b>
        */
      virtual void resetEntities();
  
      /** Resolve a public/system id
        *
        * This method allows a user installed entity handler to further
        * process any pointers to external entities. The applications can
        * implement 'redirection' via this callback. This method is also
        * borrowed from the SAX specification.
        *
        * @param publicId A const pointer to a Unicode string representing the
        *                 public id of the entity just parsed.
        * @param systemId A const pointer to a Unicode string representing the
        *                 system id of the entity just parsed.
        * @return The value returned by the user installed resolveEntity
        *         method or NULL otherwise to indicate no processing was done.
        * @see EntityResolver
        */
      virtual InputSource* resolveEntity
      (
          const   XMLCh* const    publicId
          , const XMLCh* const    systemId
      );
  
      /** Handle a 'start input source' event
        *
        * This method is used to indicate the start of parsing an external
        * entity file.
        *
        * <b><font color="#FF0000">This method is a no-op for this IDOM parse
        * implementation.</font></b>
        *
        * @param inputSource A const reference to the InputSource object
        *                    which points to the external entity
        *                    being parsed.
        */
      virtual void startInputSource(const InputSource& inputSource);
  
      //@}
  
  
  
      // -----------------------------------------------------------------------
      //  Implementation of the XMLDocumentHandler interface.
      // -----------------------------------------------------------------------
  
      /** @name Implementation of the XMLDocumentHandler interface. */
      //@{
  
      /** Handle document character events
        *
        * This method is used to report all the characters scanned by the
        * parser. This IDOM implementation stores this data in the appropriate
        * IDOM node, creating one if necessary.
        *
        * @param chars   A const pointer to a Unicode string representing the
        *                character data.
        * @param length  The length of the Unicode string returned in 'chars'.
        * @param cdataSection  A flag indicating if the characters represent
        *                      content from the CDATA section.
        */
      virtual void docCharacters
      (
          const   XMLCh* const    chars
          , const unsigned int    length
          , const bool            cdataSection
      );
  
      /** Handle a document comment event
        *
        * This method is used to report any comments scanned by the parser.
        * A new comment node is created which stores this data.
        *
        * @param comment A const pointer to a null terminated Unicode
        *                string representing the comment text.
        */
      virtual void docComment
      (
          const   XMLCh* const    comment
      );
  
      /** Handle a document PI event
        *
        * This method is used to report any PI scanned by the parser. A new
        * PI node is created and appended as a child of the current node in
        * the tree.
        *
        * @param target A const pointer to a Unicode string representing the
        *               target of the PI declaration.
        * @param data   A const pointer to a Unicode string representing the
        *               data of the PI declaration. See the PI production rule
        *               in the XML specification for details.
        */
      virtual void docPI
      (
          const   XMLCh* const    target
          , const XMLCh* const    data
      );
  
      /** Handle the end of document event
        *
        * This method is used to indicate the end of the current document.
        */
      virtual void endDocument();
  
      /** Handle and end of element event
        *
        * This method is used to indicate the end tag of an element. The
        * IDOMParse pops the current element off the top of the element
        * stack, and make it the new current element.
        *
        * @param elemDecl A const reference to the object containing element
        *                 declaration information.
        * @param urlId    An id referring to the namespace prefix, if
        *                 namespaces setting is switched on.
        * @param isRoot   A flag indicating whether this element was the
        *                 root element.
        */
      virtual void endElement
      (
          const   XMLElementDecl& elemDecl
          , const unsigned int    urlId
          , const bool            isRoot
      );
  
      /** Handle and end of entity reference event
        *
        * This method is used to indicate that an end of an entity reference
        * was just scanned.
        *
        * @param entDecl A const reference to the object containing the
        *                entity declaration information.
        */
      virtual void endEntityReference
      (
          const   XMLEntityDecl&  entDecl
      );
  
      /** Handle an ignorable whitespace vent
        *
        * This method is used to report all the whitespace characters, which
        * are determined to be 'ignorable'. This distinction between characters
        * is only made, if validation is enabled.
        *
        * Any whitespace before content is ignored. If the current node is
        * already of type IDOM_Node::TEXT_NODE, then these whitespaces are
        * appended, otherwise a new Text node is created which stores this
        * data. Essentially all contiguous ignorable characters are collected
        * in one node.
        *
        * @param chars   A const pointer to a Unicode string representing the
        *                ignorable whitespace character data.
        * @param length  The length of the Unicode string 'chars'.
        * @param cdataSection  A flag indicating if the characters represent
        *                      content from the CDATA section.
        */
      virtual void ignorableWhitespace
      (
          const   XMLCh* const    chars
          , const unsigned int    length
          , const bool            cdataSection
      );
  
      /** Handle a document reset event
        *
        * This method allows the user installed Document Handler to 'reset'
        * itself, freeing all the memory resources. The scanner calls this
        * method before starting a new parse event.
        */
      virtual void resetDocument();
  
      /** Handle a start document event
        *
        * This method is used to report the start of the parsing process.
        */
      virtual void startDocument();
  
      /** Handle a start element event
        *
        * This method is used to report the start of an element. It is
        * called at the end of the element, by which time all attributes
        * specified are also parsed. A new IDOM Element node is created
        * along with as many attribute nodes as required. This new element
        * is added appended as a child of the current node in the tree, and
        * then replaces it as the current node (if the isEmpty flag is false.)
        *
        * @param elemDecl A const reference to the object containing element
        *                 declaration information.
        * @param urlId    An id referring to the namespace prefix, if
        *                 namespaces setting is switched on.
        * @param elemPrefix A const pointer to a Unicode string containing
        *                 the namespace prefix for this element. Applicable
        *                 only when namespace processing is enabled.
        * @param attrList A const reference to the object containing the
        *                 list of attributes just scanned for this element.
        * @param attrCount A count of number of attributes in the list
        *                 specified by the parameter 'attrList'.
        * @param isEmpty  A flag indicating whether this is an empty element
        *                 or not. If empty, then no endElement() call will
        *                 be made.
        * @param isRoot   A flag indicating whether this element was the
        *                 root element.
        * @see DocumentHandler#startElement
        */
      virtual void startElement
      (
          const   XMLElementDecl&         elemDecl
          , const unsigned int            urlId
          , const XMLCh* const            elemPrefix
          , const RefVectorOf<XMLAttr>&   attrList
          , const unsigned int            attrCount
          , const bool                    isEmpty
          , const bool                    isRoot
      );
  
      /** Handle a start entity reference event
        *
        * This method is used to indicate the start of an entity reference.
        * If the expand entity reference flag is true, then a new
        * IDOM Entity reference node is created.
        *
        * @param entDecl A const reference to the object containing the
        *                entity declaration information.
        */
      virtual void startEntityReference
      (
          const   XMLEntityDecl&  entDecl
      );
  
      /** Handle an XMLDecl event
        *
        * This method is used to report the XML decl scanned by the parser.
        * Refer to the XML specification to see the meaning of parameters.
        *
        * <b><font color="#FF0000">This method is a no-op for this IDOM
        * implementation.</font></b>
        *
        * @param versionStr A const pointer to a Unicode string representing
        *                   version string value.
        * @param encodingStr A const pointer to a Unicode string representing
        *                    the encoding string value.
        * @param standaloneStr A const pointer to a Unicode string
        *                      representing the standalone string value.
        * @param actualEncStr A const pointer to a Unicode string
        *                     representing the actual encoding string
        *                     value.
        */
      virtual void XMLDecl
      (
          const   XMLCh* const    versionStr
          , const XMLCh* const    encodingStr
          , const XMLCh* const    standaloneStr
          , const XMLCh* const    actualEncStr
      );
      //@}
  
  
      /** @name Deprecated Methods */
      //@{
      /**
        * This method returns the state of the parser's validation
        * handling flag which controls whether validation checks
        * are enforced or not.
        *
        * @return true, if the parser is currently configured to
        *         do validation, false otherwise.
        *
        * @see #setDoValidation
        */
      bool getDoValidation() const;
  
      /**
        * This method allows users to enable or disable the parser's validation
        * checks.
        *
        * <p>By default, the parser does not to any validation. The default
        * value is false.</p>
        *
        * @param newState The value specifying whether the parser should
        *                 do validity checks or not against the DTD in the
        *                 input XML document.
        *
        * @see #getDoValidation
        */
      void setDoValidation(const bool newState);
  
      /**
        * Deprecated doctypehandler interfaces
        */
  	virtual void attDef
      (
          const   DTDElementDecl&     elemDecl
          , const DTDAttDef&          attDef
          , const bool                ignoring
      );
  
      virtual void doctypeComment
      (
          const   XMLCh* const    comment
      );
  
      virtual void doctypeDecl
      (
          const   DTDElementDecl& elemDecl
          , const XMLCh* const    publicId
          , const XMLCh* const    systemId
          , const bool            hasIntSubset
      );
  
      virtual void doctypePI
      (
          const   XMLCh* const    target
          , const XMLCh* const    data
      );
  
      virtual void doctypeWhitespace
      (
          const   XMLCh* const    chars
          , const unsigned int    length
      );
  
      virtual void elementDecl
      (
          const   DTDElementDecl& decl
          , const bool            isIgnored
      );
  
      virtual void endAttList
      (
          const   DTDElementDecl& elemDecl
      );
  
      virtual void endIntSubset();
  
      virtual void endExtSubset();
  
      virtual void entityDecl
      (
          const   DTDEntityDecl&  entityDecl
          , const bool            isPEDecl
          , const bool            isIgnored
      );
  
      virtual void resetDocType();
  
      virtual void notationDecl
      (
          const   XMLNotationDecl&    notDecl
          , const bool                isIgnored
      );
  
      virtual void startAttList
      (
          const   DTDElementDecl& elemDecl
      );
  
      virtual void startIntSubset();
  
      virtual void startExtSubset();
  
      virtual void TextDecl
      (
          const   XMLCh* const    versionStr
          , const XMLCh* const    encodingStr
      );
  
  
      //@}
  
  
  protected :
      // -----------------------------------------------------------------------
      //  Protected getter methods
      // -----------------------------------------------------------------------
  
      /** @name Protected getter methods */
      //@{
      /** Get the current IDOM node
        *
        * This provides derived classes with access to the current node, i.e.
        * the node to which new nodes are being added.
        */
      IDOM_Node* getCurrentNode();
  
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Protected setter methods
      // -----------------------------------------------------------------------
  
      /** @name Protected setter methods */
      //@{
  
      /** Set the current IDOM node
        *
        * This method sets the current node maintained inside the parser to
        * the one specified.
        *
        * @param toSet The IDOM node which will be the current node.
        */
      void setCurrentNode(IDOM_Node* toSet);
  
      /** Set the document node
        *
        * This method sets the IDOM Document node to the one specified.
        *
        * @param toSet The new IDOM Document node for this XML document.
        */
      void setDocument(IDOM_Document* toSet);
      //@}
  
  
  private :
      // -----------------------------------------------------------------------
      //  Private data members
      //
      //  fCurrentNode
      //  fCurrentParent
      //      Used to track the current node during nested element events. Since
      //      the tree must be built from a set of disjoint callbacks, we need
      //      these to keep up with where we currently are.
      //
      //  fDocument
      //      The root document object, filled with the document contents.
      //
      //  fEntityResolver
      //      The installed SAX entity resolver, if any. Null if none.
      //
      //  fErrorHandler
      //      The installed SAX error handler, if any. Null if none.
      //
      //  fCreateEntityReferenceNode
      //      Indicates whether entity reference nodes should be created.
      //
      //  fIncludeIgnorableWhitespace
      //      Indicates whether ignorable whiltespace should be added to
      //      the IDOM tree for validating parsers.
      //
      //  fNodeStack
      //      Used to track previous parent nodes during nested element events.
      //
      //  fParseInProgress
      //      Used to prevent multiple entrance to the parser while its doing
      //      a parse.
      //
      //  fScanner
      //      The scanner used for this parser. This is created during the
      //      constructor.
      //
      //  fWithinElement
      //      A flag to indicate that the parser is within at least one level
      //      of element processing.
      //
      //  fDocumentType
      //      Used to store and update the documentType variable information
      //      in fDocument
      //
      //  fDocumentVector
      //      Store all the previous fDocument(s) (thus not the current fDocument)
      //      created in this parser.  It is destroyed when the parser is destructed.
      // -----------------------------------------------------------------------
      IDOM_Node*               fCurrentParent;
      IDOM_Node*               fCurrentNode;
      IDDocumentImpl*          fDocument;
      EntityResolver*          fEntityResolver;
      ErrorHandler*            fErrorHandler;
      bool                     fCreateEntityReferenceNodes;
      bool                     fIncludeIgnorableWhitespace;
      ValueStackOf<IDOM_Node*>* fNodeStack;
      bool                     fParseInProgress;
      XMLScanner*              fScanner;
      bool                     fWithinElement;
      IDDocumentTypeImpl*      fDocumentType;
      RefVectorOf<IDDocumentImpl>* fDocumentVector;
  };
  
  
  
  // ---------------------------------------------------------------------------
  //  IDOMParser: Handlers for the XMLEntityHandler interface
  // ---------------------------------------------------------------------------
  inline void IDOMParser::endInputSource(const InputSource&)
  {
      // The IDOM entity resolver doesn't handle this
  }
  
  inline bool IDOMParser::expandSystemId(const XMLCh* const, XMLBuffer&)
  {
      // The IDOM entity resolver doesn't handle this
      return false;
  }
  
  inline void IDOMParser::resetEntities()
  {
      // Nothing to do on this one
  }
  
  inline void IDOMParser::startInputSource(const InputSource&)
  {
      // The IDOM entity resolver doesn't handle this
  }
  
  
  // ---------------------------------------------------------------------------
  //  IDOMParser: Getter methods
  // ---------------------------------------------------------------------------
  inline ErrorHandler* IDOMParser::getErrorHandler()
  {
      return fErrorHandler;
  }
  
  inline const ErrorHandler* IDOMParser::getErrorHandler() const
  {
      return fErrorHandler;
  }
  
  inline EntityResolver* IDOMParser::getEntityResolver()
  {
      return fEntityResolver;
  }
  
  inline const EntityResolver* IDOMParser::getEntityResolver() const
  {
      return fEntityResolver;
  }
  
  inline bool IDOMParser::getExpandEntityReferences() const
  {
      return fCreateEntityReferenceNodes;
  }
  inline bool IDOMParser::getCreateEntityReferenceNodes() const
  {
      return fCreateEntityReferenceNodes;
  }
  
  inline bool IDOMParser::getIncludeIgnorableWhitespace() const
  {
      return fIncludeIgnorableWhitespace;
  }
  
  
  // ---------------------------------------------------------------------------
  //  IDOMParser: Setter methods
  // ---------------------------------------------------------------------------
  inline void IDOMParser::setExpandEntityReferences(const bool expand)
  {
      fCreateEntityReferenceNodes = expand;
  }
  
  inline void IDOMParser::setCreateEntityReferenceNodes(const bool create)
  {
      fCreateEntityReferenceNodes = create;
  }
  
  inline void IDOMParser::setIncludeIgnorableWhitespace(const bool include)
  {
      fIncludeIgnorableWhitespace = include;
  }
  
  
  // ---------------------------------------------------------------------------
  //  IDOMParser: Protected getter methods
  // ---------------------------------------------------------------------------
  inline IDOM_Node* IDOMParser::getCurrentNode()
  {
      return fCurrentNode;
  }
  
  
  // ---------------------------------------------------------------------------
  //  IDOMParser: Protected setter methods
  // ---------------------------------------------------------------------------
  inline void IDOMParser::setCurrentNode(IDOM_Node* toSet)
  {
      fCurrentNode = toSet;
  }
  
  inline void IDOMParser::setDocument(IDOM_Document* toSet)
  {
      fDocument = (IDDocumentImpl *)toSet;
  }
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/parsers/SAX2XMLReaderImpl.hpp
  
  Index: SAX2XMLReaderImpl.hpp
  ===================================================================
  /*
   * 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/>.
   */
  
  /*
   * $Log: SAX2XMLReaderImpl.hpp,v $
   * Revision 1.1  2002/10/23 08:55:11  lilantha
   * update with new XML parser lib
   *
   * Revision 1.2  2002/02/13 16:09:24  knoaman
   * Move SAX2 features/properties names constants to XMLUni.
   *
   * Revision 1.1.1.1  2002/02/01 22:22:07  peiyongz
   * sane_include
   *
   * Revision 1.21  2002/01/28 18:45:40  knoaman
   * Update documentation for SAX2 feature 'namespace-prefixes'.
   *
   * Revision 1.20  2002/01/28 17:08:47  knoaman
   * SAX2-ext's DeclHandler support.
   *
   * Revision 1.19  2002/01/24 16:30:34  tng
   * [Bug 3111] Problem with LexicalHandler::startDTD() and LexicalHandler::endDTD() .
   *
   * Revision 1.18  2002/01/18 16:31:38  tng
   * Break program.xml which takes too long to load, into program-sax.xml, program-sax2.xml, program-dom.xml, program-idom.xml.
   *
   * Revision 1.17  2002/01/02 15:36:41  tng
   * Some documentation update.
   *
   * Revision 1.16  2001/11/20 18:51:44  tng
   * Schema: schemaLocation and noNamespaceSchemaLocation to be specified outside the instance document.  New methods setExternalSchemaLocation and setExternalNoNamespaceSchemaLocation are added (for SAX2, two new properties are added).
   *
   * Revision 1.15  2001/11/14 14:15:42  tng
   * Update SAX2 feature documentation.
   *
   * Revision 1.14  2001/09/12 13:03:43  tng
   * [Bug 3155] SAX2 does not offer progressive parse.
   *
   * Revision 1.13  2001/08/01 19:11:02  tng
   * Add full schema constraint checking flag to the samples and the parser.
   *
   * Revision 1.12  2001/06/27 17:39:52  knoaman
   * Fix for bug #2353.
   *
   * Revision 1.11  2001/06/19 16:45:08  tng
   * Add installAdvDocHandler to SAX2XMLReader as the code is there already.
   *
   * Revision 1.10  2001/06/04 21:01:49  jberry
   * getErrorCount is virtual in this class reflecting derivation from SAX2XMLReader.
   *
   * Revision 1.9  2001/06/03 19:26:19  jberry
   * Add support for querying error count following parse; enables simple parse without requiring error handler.
   *
   * Revision 1.8  2001/05/11 13:26:21  tng
   * Copyright update.
   *
   * Revision 1.7  2001/03/30 16:46:57  tng
   * Schema: Use setDoSchema instead of setSchemaValidation which makes more sense.
   *
   * Revision 1.6  2001/03/21 21:56:08  tng
   * Schema: Add Schema Grammar, Schema Validator, and split the DTDValidator into DTDValidator, DTDScanner, and DTDGrammar.
   *
   * Revision 1.5  2001/02/15 15:56:29  tng
   * Schema: Add setSchemaValidation and getSchemaValidation for DOMParser and SAXParser.
   * Add feature "http://apache.org/xml/features/validation/schema" for SAX2XMLReader.
   * New data field  fSchemaValidation in XMLScanner as the flag.
   *
   * Revision 1.4  2000/12/22 15:16:53  tng
   * SAX2-ext's LexicalHandler support added by David Bertoni.
   *
   * Revision 1.3  2000/08/09 22:16:13  jpolast
   * many conformance & stability changes:
   *   - ContentHandler::resetDocument() removed
   *   - attrs param of ContentHandler::startDocument() made const
   *   - SAXExceptions thrown now have msgs
   *   - removed duplicate function signatures that had 'const'
   *       [ eg: getContentHander() ]
   *   - changed getFeature and getProperty to apply to const objs
   *   - setProperty now takes a void* instead of const void*
   *   - SAX2XMLReaderImpl does not inherit from SAXParser anymore
   *   - Reuse Validator (http://apache.org/xml/features/reuse-validator) implemented
   *   - Features & Properties now read-only during parse
   *
   * Revision 1.2  2000/08/02 20:46:32  aruna1
   * sax2 changes
   *
   * Revision 1.1  2000/08/02 18:04:41  jpolast
   * initial checkin of sax2 implemenation
   * submitted by Simon Fell (simon@fell.com)
   * and Joe Polastre (jpolast@apache.org)
   *
   *
   */
  
  #if !defined(SAX2XMLReaderImpl_HPP)
  #define SAX2XMLReaderImpl_HPP
  
  #include <xercesc/parsers/SAXParser.hpp>
  #include <xercesc/sax/Parser.hpp>
  #include <xercesc/framework/XMLBuffer.hpp>
  #include <xercesc/internal/VecAttributesImpl.hpp>
  #include <xercesc/sax2/SAX2XMLReader.hpp>
  #include <xercesc/util/RefStackOf.hpp>
  #include <xercesc/util/ValueStackOf.hpp>
  #include <xercesc/framework/XMLBufferMgr.hpp>
  
  class ContentHandler;
  class LexicalHandler;
  class DeclHandler;
  
  /**
    * This class implements the SAX2 'XMLReader' interface and should be
    * used by applications wishing to parse the XML files using SAX2.
    * It allows the client program to install SAX2 handlers for event
    * callbacks.
    *
    * <p>It can be used to instantiate a validating or non-validating
    * parser, by setting a member flag.</p>
    *
    * we basically re-use the existing SAX1 parser code, but provide a
    * new implementation of XMLContentHandler that raises the new
    * SAX2 style events
    *
    */
  
  class PARSERS_EXPORT SAX2XMLReaderImpl :
  	public SAX2XMLReader
  //    , public Parser
      , public XMLDocumentHandler
      , public XMLErrorReporter
      , public XMLEntityHandler
      , public DocTypeHandler
  {
  public :
  	
  	SAX2XMLReaderImpl() ;
  	~SAX2XMLReaderImpl() ;
  
  	// -----------------------------------------------------------------------
      //  Implementation of the XMLDocumentHandler interface
      // -----------------------------------------------------------------------
  
      /** @name Implementation of the XMLDocumentHandler Interface. */
      //@{
      /**
        * This method is used to report all the characters scanned
        * by the parser. The driver will invoke the 'characters'
        * method of the user installed SAX Document Handler.
        *
        * <p>If any advanced callback handlers are installed, the
        * corresponding 'docCharacters' method will also be invoked.</p>
        *
        * @param chars   A const pointer to a Unicode string representing the
        *                character data.
        * @param length  The length of the Unicode string returned in 'chars'.
        * @param cdataSection  A flag indicating if the characters represent
        *                      content from the CDATA section.
        * @see DocumentHandler#characters
        */
      virtual void docCharacters
      (
          const   XMLCh* const    chars
          , const unsigned int    length
          , const bool            cdataSection
      );
  
      /**
        * This method is used to report any comments scanned by the parser.
        * This method is a no-op unless, unless an advanced callback handler
        * is installed, in which case the corresponding 'docComment' method
        * is invoked.
        *
        * @param comment A const pointer to a null terminated Unicode
        *                string representing the comment text.
        */
      virtual void docComment
      (
          const   XMLCh* const    comment
      );
  
      /**
        * This method is used to report any PI scanned by the parser.
        *
        * <p>Any PI's occurring before any 'content' are not reported
        * to any SAX handler as per the specification. However, all
        * PI's within content are reported via the SAX Document Handler's
        * 'processingInstruction' method.
        *
        * <p>If any advanced callback handlers are installed, the
        * corresponding 'docPI' method will be invoked.</p>
        *
        * @param target A const pointer to a Unicode string representing the
        *               target of the PI declaration.
        * @param data   A const pointer to a Unicode string representing the
        *               data of the PI declaration. See the PI production rule
        *               in the XML specification for details.
        *
        * @see DocumentHandler#processingInstruction
        */
      virtual void docPI
      (
          const   XMLCh* const    target
          , const XMLCh* const    data
      );
  
      /**
        * This method is used to indicate the end of root element
        * was just scanned by the parser. Corresponding 'endDocument'
        * method of the user installed SAX Document Handler will also
        * be invoked.
        *
        * <p>In addition, if any advanced callback handlers are installed,
        * the corresponding 'endDocument' method is invoked.</p>
        *
        * @see DocumentHandler#endDocument
        */
      virtual void endDocument();
  
      /**
        * This method is used to indicate the end tag of an element.
        * The driver will invoke the corresponding 'endElement' method of
        * the SAX Document Handler interface.
        *
        * <p>If any advanced callback handlers are installed, the
        * corresponding 'endElement' method is also invoked.</p>
        *
        * @param elemDecl A const reference to the object containing element
        *                 declaration information.
        * @param urlId    An id referring to the namespace prefix, if
        *                 namespaces setting is switched on.
        * @param isRoot   A flag indicating whether this element was the
        *                 root element.
        * @see DocumentHandler#endElement
        */
      virtual void endElement
      (
          const   XMLElementDecl& elemDecl
          , const unsigned int    urlId
          , const bool            isRoot
      );
  
      /**
        * This method is used to indicate that an end of an entity reference
        * was just scanned.
        *
        * <p>If any advanced callback handlers are installed, the
        * corresponding 'endEnityReference' method is invoked.</p>
        *
        * @param entDecl A const reference to the object containing the
        *                entity declaration information.
        */
      virtual void endEntityReference
      (
          const   XMLEntityDecl&  entDecl
      );
  
      /**
        * This method is used to report all the whitespace characters,
        * which are determined to be 'ignorable'. This distinction
        * between characters is only made, if validation is enabled.
        * Corresponding 'ignorableWhitespace' method of the user installed
        * SAX Document Handler interface is called.
        *
        * <p>Any whitespace before content is not reported to the SAX
        * Document Handler method, as per the SAX specification.
        * However, if any advanced callback handlers are installed, the
        * corresponding 'ignorableWhitespace' method is invoked.</p>
        *
        * @param chars   A const pointer to a Unicode string representing the
        *                ignorable whitespace character data.
        * @param length  The length of the Unicode string 'chars'.
        * @param cdataSection  A flag indicating if the characters represent
        *                      content from the CDATA section.
        * @see DocumentHandler#ignorableWhitespace
        */
      virtual void ignorableWhitespace
      (
          const   XMLCh* const    chars
          , const unsigned int    length
          , const bool            cdataSection
      );
  
      /**
        * This method allows the user installed Document Handler and
        * any advanced callback handlers to 'reset' themselves.
        */
      virtual void resetDocument();
  
      /**
        * This method is used to report the start of the parsing process.
        * The corresponding user installed SAX Document Handler's method
        * 'startDocument' is invoked.
        *
        * <p>If any advanced callback handlers are installed, then the
        * corresponding 'startDocument' method is also called.</p>
        *
        * @see DocumentHandler#startDocument
        */
      virtual void startDocument();
  
      /**
        * This method is used to report the start of an element. It is
        * called at the end of the element, by which time all attributes
        * specified are also parsed. The corresponding user installed
        * SAX Document Handler's method 'startElement' is invoked.
        *
        * <p>If any advanced callback handlers are installed, then the
        * corresponding 'startElement' method is also called.</p>
        *
        * @param elemDecl A const reference to the object containing element
        *                 declaration information.
        * @param urlId    An id referring to the namespace prefix, if
        *                 namespaces setting is switched on.
        * @param elemPrefix A const pointer to a Unicode string containing
        *                   the namespace prefix for this element. Applicable
        *                   only when namespace processing is enabled.
        * @param attrList  A const reference to the object containing the
        *                  list of attributes just scanned for this element.
        * @param attrCount A count of number of attributes in the list
        *                  specified by the parameter 'attrList'.
        * @param isEmpty  A flag indicating whether this is an empty element
        *                 or not.
        * @param isRoot   A flag indicating whether this element was the
        *                 root element.
        * @see DocumentHandler#startElement
        */
      virtual void startElement
      (
          const   XMLElementDecl&         elemDecl
          , const unsigned int            urlId
          , const XMLCh* const            elemPrefix
          , const RefVectorOf<XMLAttr>&   attrList
          , const unsigned int            attrCount
          , const bool                    isEmpty
          , const bool                    isRoot
      );
  
      /**
        * This method is used to indicate the start of an entity reference.
        *
        * <p>If any advanced callback handlers are installed, the
        * corresponding 'endEnityReference' method is invoked.</p>
        *
        * @param entDecl A const reference to the object containing the
        *                entity declaration information.
        */
      virtual void startEntityReference
      (
          const   XMLEntityDecl&  entDecl
      );
  
      /**
        * This method is used to report the XML decl scanned by the parser.
        * Refer to the XML specification to see the meaning of parameters.
        *
        * <b><font color="#FF0000">This method is a no-op for this SAX driver
        * implementation.</font></b>
        *
        * @param versionStr A const pointer to a Unicode string representing
        *                   version string value.
        * @param encodingStr A const pointer to a Unicode string representing
        *                    the encoding string value.
        * @param standaloneStr A const pointer to a Unicode string
        *                      representing the standalone string value.
        * @param actualEncodingStr A const pointer to a Unicode string
        *                          representing the actual encoding string
        *                          value.
        */
      virtual void XMLDecl
      (
          const   XMLCh* const    versionStr
          , const XMLCh* const    encodingStr
          , const XMLCh* const    standaloneStr
          , const XMLCh* const    actualEncodingStr
      );
      //@}
  
  	// -----------------------------------------------------------------------
      //  Implementation of the XMLReader interface
      // -----------------------------------------------------------------------
  
      /** @name Getter methods */
      //@{
  
      /** Get error count from the last parse operation.
        *
        * This method returns the error count from the last parse
        * operation. Note that this count is actually stored in the
        * scanner, so this method simply returns what the
        * scanner reports.
        *
        * @return number of errors encountered during the latest
        *			parse operation.
        */
      virtual int getErrorCount() const;
  
      /**
        * This method returns the installed content handler.
        *
        * @return A pointer to the installed content handler object.
        */
      virtual ContentHandler* getContentHandler() const;
  
      /**
        * This method returns the installed DTD handler.
        *
        * @return A pointer to the installed DTD handler object.
        */
      virtual DTDHandler* getDTDHandler() const ;
  
      /**
        * This method returns the installed entity resolver.
        *
        * @return A pointer to the installed entity resolver object.
        */
      virtual EntityResolver* getEntityResolver() const  ;
  
      /**
        * This method returns the installed error handler.
        *
        * @return A pointer to the installed error handler object.
        */
      virtual ErrorHandler* getErrorHandler() const ;
  
      /**
        * This method returns the installed lexical handler.
        *
        * @return A pointer to the installed lexical handler object.
        */
      virtual LexicalHandler* getLexicalHandler() const ;
  
      /**
        * This method returns the installed declaration handler.
        *
        * @return A pointer to the installed declaration handler object.
        */
      virtual DeclHandler* getDeclarationHandler() const ;
  
      /**
        * This method returns the state of the parser's
        * exit-on-First-Fatal-Error flag.
        *
        * @return true, if the parser is currently configured to
        *         exit on the first fatal error, false otherwise.
        *
        * @see #setExitOnFirstFatalError
        */
      virtual bool getExitOnFirstFatalError() const;
  
      /**
        * This method returns the state of the parser's
        * validation-constraint-fatal flag.
        *
        * @return true, if the parser is currently configured to
        *         set validation constraint errors as fatal, false
        *         otherwise.
        *
        * @see #setValidationContraintFatal
        */
      virtual bool getValidationConstraintFatal() const;
  
      /** @name Implementation of SAX 2.0 interface's. */
      //@{
      /**
        * This method invokes the parsing process on the XML file specified
        * by the InputSource parameter.
        *
        * @param source A const reference to the InputSource object which
        *               points to the XML file to be parsed.
        */
      virtual void parse(const InputSource& source);
  
      /**
        * This method invokes the parsing process on the XML file specified by
        * the Unicode string parameter 'systemId'.
        *
        * @param systemId A const XMLCh pointer to the Unicode string which
        *                 contains the path to the XML file to be parsed.
        */
      virtual void parse(const XMLCh* const systemId);
  
      /**
        * This method invokes the parsing process on the XML file specified by
        * the native char* string parameter 'systemId'.
        *
        * @param systemId A const char pointer to a native string which
        *                 contains the path to the XML file to be parsed.
        */
      virtual void parse(const char* const systemId);
  
      /**
        * This method installs the user specified SAX Document Handler
        * callback function on parser.
        *
        * @param handler A pointer to the document handler to be called
        *                when the parser comes across 'document' events
        *                as per the SAX specification.
        */
      virtual void setContentHandler(ContentHandler* const handler);
  
    /**
      * Allow an application to register a DTD event handler.
      *
      * If the application does not register a DTD handler, all DTD
      * events reported by the SAX parser will be silently ignored (this
      * is the default behaviour implemented by HandlerBase).
      *
      * Applications may register a new or different handler in the middle
      * of a parse, and the SAX parser must begin using the new handler
      * immediately.
      *
      * @param handler The DTD handler.
      * @see DTDHandler#DTDHandler
      * @see HandlerBase#HandlerBase
      */
      virtual void setDTDHandler(DTDHandler* const handler) ;
  
    /**
      * Allow an application to register a custom entity resolver.
      *
      * If the application does not register an entity resolver, the
      * SAX parser will resolve system identifiers and open connections
      * to entities itself (this is the default behaviour implemented in
      * DefaultHandler).
      *
      * Applications may register a new or different entity resolver
      * in the middle of a parse, and the SAX parser must begin using
      * the new resolver immediately.
      *
      * @param resolver The object for resolving entities.
      * @see EntityResolver#EntityResolver
      * @see DefaultHandler#DefaultHandler
      */
      virtual void setEntityResolver(EntityResolver* const resolver) ;
  
    /**
      * Allow an application to register an error event handler.
      *
      * If the application does not register an error event handler,
      * all error events reported by the SAX parser will be silently
      * ignored, except for fatalError, which will throw a SAXException
      * (this is the default behaviour implemented by HandlerBase).
      *
      * Applications may register a new or different handler in the
      * middle of a parse, and the SAX parser must begin using the new
      * handler immediately.
      *
      * @param handler The error handler.
      * @see ErrorHandler#ErrorHandler
      * @see SAXException#SAXException
      * @see HandlerBase#HandlerBase
      */
      virtual void setErrorHandler(ErrorHandler* const handler) ;
  
  	/**
      * Allow an application to register a lexical event handler.
      *
      * If the application does not register a lexical handler,
      * all events reported by the SAX parser will be silently
      * ignored. (this is the default behaviour implemented by HandlerBase).
      *
      * Applications may register a new or different handler in the
      * middle of a parse, and the SAX parser must begin using the new
      * handler immediately.
      *
      * @param handler The error handler.
      * @see LexicalHandler#LexicalHandler
      * @see SAXException#SAXException
      * @see HandlerBase#HandlerBase
      */
      virtual void setLexicalHandler(LexicalHandler* const handler) ;
  
     /**
      * Allow an application to register a declaration event handler.
      *
      * If the application does not register a declaration handler,
      * all events reported by the SAX parser will be silently
      * ignored. (this is the default behaviour implemented by DefaultHandler).
      *
      * Applications may register a new or different handler in the
      * middle of a parse, and the SAX parser must begin using the new
      * handler immediately.
      *
      * @param handler The DTD declaration handler.
      * @see DeclHandler#DeclHandler
      * @see SAXException#SAXException
      * @see DefaultHandler#DefaultHandler
      */
      virtual void setDeclarationHandler(DeclHandler* const handler);
  
      /**
        * This method allows users to set the parser's behaviour when it
        * encounters the first fatal error. If set to true, the parser
        * will exit at the first fatal error. If false, then it will
        * report the error and continue processing.
        *
        * <p>The default value is 'true' and the parser exits on the
        * first fatal error.</p>
        *
        * @param newState The value specifying whether the parser should
        *                 continue or exit when it encounters the first
        *                 fatal error.
        *
        * @see #getExitOnFirstFatalError
        */
      virtual void setExitOnFirstFatalError(const bool newState);
  
      /**
        * This method allows users to set the parser's behaviour when it
        * encounters a validtion constraint error. If set to true, and the
        * the parser is set to exit when it encounter the first fatal error,
        * the parser will exit at the first encounter. If false, then it will
        * report the error and continue processing.
        *
        * <p>The default value is 'false'.</p>
        *
        * @param newState The value specifying whether the parser should
        *                 continue or exit when it encounters a validation
        *                 constraint error.
        *
        * @see #getValidationConstraintFatal
        */
      virtual void setValidationConstraintFatal(const bool newState);
  
    /**
      * Set the state of any feature in a SAX2 XMLReader.
      * Supported features in SAX2 for xerces-c are:
      * <br>(See http://xml.apache.org/xerces-c/program-sax2.html#SAX2Features for detail description).
      *
      * <br>http://xml.org/sax/features/validation (default: true)
      * <br>http://xml.org/sax/features/namespaces (default: true)
      * <br>http://xml.org/sax/features/namespace-prefixes (default: false)
      * <br>http://apache.org/xml/features/validation/dynamic (default: false)
      * <br>http://apache.org/xml/features/validation/reuse-grammar (default: false)
      * <br>http://apache.org/xml/features/validation/schema (default: true)
      * <br>http://apache.org/xml/features/validation/schema-full-checking (default: false)
      * <br>http://apache.org/xml/features/validation/reuse-validator (Deprecated) (default: false)
      *
      * @param name The unique identifier (URI) of the feature.
      * @param value The requested state of the feature (true or false).
      * @exception SAXNotRecognizedException If the requested feature is not known.
      * @exception SAXNotSupportedException Feature modification is not supported during parse
      *
      */
  	virtual void setFeature(const XMLCh* const name, const bool value);
  
  	/**
       * Query the current state of any feature in a SAX2 XMLReader.
  	  *
  	  * @param name The unique identifier (URI) of the feature being set.
  	  * @return The current state of the feature.
       * @exception SAXNotRecognizedException If the requested feature is not known.
  	  */
  	virtual bool getFeature(const XMLCh* const name) const;
  
    /**
      * Set the value of any property in a SAX2 XMLReader.
      * Supported properties in SAX2 for xerces-c are:
      * <br>(See http://xml.apache.org/xerces-c/program-sax2.html#SAX2Properties for detail description).
      *
      * <br>http://apache.org/xml/properties/schema/external-schemaLocation
      * <br>http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation.
      *
      * It takes a void pointer as the property value.  Application is required to initialize this void
      * pointer to a correct type.  See http://xml.apache.org/xerces-c/program-sax2.html#SAX2Properties
      * to learn exactly what type of property value each property expects for processing.
      * Passing a void pointer that was initialized with a wrong type will lead to unexpected result.
      * If the same property is set more than once, the last one takes effect.
      *
      * @param name The unique identifier (URI) of the property being set.
      * @param value The requested value for the property.  See
      *            http://xml.apache.org/xerces-c/program-sax2.html#SAX2Properties to learn
      *            exactly what type of property value each property expects for processing.
      *            Passing a void pointer that was initialized with a wrong type will lead
      *            to unexpected result.
      * @exception SAXNotRecognizedException If the requested property is not known.
      * @exception SAXNotSupportedException Property modification is not supported during parse
      */
  	virtual void setProperty(const XMLCh* const name, void* value);
  
  	/**
       * Query the current value of a property in a SAX2 XMLReader.
       *
       * The parser owns the returned pointer.  The memory allocated for
       * the returned pointer will be destroyed when the parser is deleted.
       *
       * To ensure assessiblity of the returned information after the parser
       * is deleted, callers need to copy and store the returned information
       * somewhere else; otherwise you may get unexpected result.  Since the returned
       * pointer is a generic void pointer, see
       * http://xml.apache.org/xerces-c/program-sax2.html#SAX2Properties to learn
       * exactly what type of property value each property returns for replication.
       *
       * @param name The unique identifier (URI) of the property being set.
       * @return     The current value of the property.  The pointer spans the same
       *             life-time as the parser.  A null pointer is returned if nothing
       *             was specified externally.
       * @exception  SAXNotRecognizedException If the requested property is not known.
       */
  	virtual void* getProperty(const XMLCh* const name) const;
  	//@}
  
      // -----------------------------------------------------------------------
      //  Implementation of the XMLErrorReporter interface
      // -----------------------------------------------------------------------
  
      /** @name Implementation of the XMLErrorReporter Interface. */
      //@{
      /**
        * This method is used to report back errors found while parsing the
        * XML file. The driver will call the corresponding user installed
        * SAX Error Handler methods: 'fatal', 'error', 'warning' depending
        * on the severity of the error. This classification is defined by
        * the XML specification.
        *
        * @param errCode An integer code for the error.
        * @param msgDomain A const pointer to an Unicode string representing
        *                  the message domain to use.
        * @param errType An enumeration classifying the severity of the error.
        * @param errorText A const pointer to an Unicode string representing
        *                  the text of the error message.
        * @param systemId  A const pointer to an Unicode string representing
        *                  the system id of the XML file where this error
        *                  was discovered.
        * @param publicId  A const pointer to an Unicode string representing
        *                  the public id of the XML file where this error
        *                  was discovered.
        * @param lineNum   The line number where the error occurred.
        * @param colNum    The column number where the error occurred.
        * @see ErrorHandler
        */
      virtual void error
      (
          const   unsigned int                errCode
          , const XMLCh* const                msgDomain
          , const XMLErrorReporter::ErrTypes  errType
          , const XMLCh* const                errorText
          , const XMLCh* const                systemId
          , const XMLCh* const                publicId
          , const unsigned int                lineNum
          , const unsigned int                colNum
      );
  
      /**
        * This method allows the user installed Error Handler
        * callback to 'reset' itself.
        *
        * <b><font color="#FF0000">This method is a no-op for this SAX driver
        * implementation.</font></b>
        *
        */
      virtual void resetErrors();
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Implementation of the XMLEntityHandler interface
      // -----------------------------------------------------------------------
  
      /** @name Implementation of the XMLEntityHandler Interface. */
      //@{
      /**
        * This method is used to indicate the end of parsing of an external
        * entity file.
        *
        * <b><font color="#FF0000">This method is a no-op for this SAX driver
        * implementation.</font></b>
        *
        * @param inputSource A const reference to the InputSource object
        *                    which points to the XML file being parsed.
        * @see InputSource
        */
      virtual void endInputSource(const InputSource& inputSource);
  
      /**
        * This method allows an installed XMLEntityHandler to further
        * process any system id's of enternal entities encountered in
        * the XML file being parsed, such as redirection etc.
        *
        * <b><font color="#FF0000">This method always returns 'false'
        * for this SAX driver implementation.</font></b>
        *
        * @param systemId  A const pointer to an Unicode string representing
        *                  the system id scanned by the parser.
        * @param toFill    A pointer to a buffer in which the application
        *                  processed system id is stored.
        * @return 'true', if any processing is done, 'false' otherwise.
        */
      virtual bool expandSystemId
      (
          const   XMLCh* const    systemId
          ,       XMLBuffer&      toFill
      );
  
      /**
        * This method allows the installed XMLEntityHandler to reset
        * itself.
        *
        * <b><font color="#FF0000">This method is a no-op for this SAX driver
        * implementation.</font></b>
        */
      virtual void resetEntities();
  
      /**
        * This method allows a user installed entity handler to further
        * process any pointers to external entities. The applications
        * can implement 'redirection' via this callback. The driver
        * should call the SAX EntityHandler 'resolveEntity' method.
        *
        * @param publicId A const pointer to a Unicode string representing the
        *                 public id of the entity just parsed.
        * @param systemId A const pointer to a Unicode string representing the
        *                 system id of the entity just parsed.
        * @return The value returned by the SAX resolveEntity method or
        *         NULL otherwise to indicate no processing was done.
        * @see EntityResolver
        */
      virtual InputSource* resolveEntity
      (
          const   XMLCh* const    publicId
          , const XMLCh* const    systemId
      );
  
      /**
        * This method is used to indicate the start of parsing an
        * external entity file.
        *
        * <b><font color="#FF0000">This method is a no-op for this SAX driver
        * implementation.</font></b>
        *
        * @param inputSource A const reference to the InputSource object
        *                    which points to the external entity
        *                    being parsed.
        */
      virtual void startInputSource(const InputSource& inputSource);
      //@}
  
      // -----------------------------------------------------------------------
      //  Implementation of the DocTypeHandler Interface
      // -----------------------------------------------------------------------
  
      /** @name Implementation of the DocTypeHandler Interface */
      //@{
      /**
        * This method is used to report an attribute definition.
        *
        * <b><font color="#FF0000">This method is a no-op for this SAX
        * driver implementation.</font></b>
        *
        * @param elemDecl A const reference to the object containing information
        *                 about the element whose attribute definition was just
        *                 parsed.
        * @param attDef   A const reference to the object containing information
        *                 attribute definition.
        * @param ignore   The flag indicating whether this attribute definition
        *                 was ignored by the parser or not.
        */
      virtual void attDef
      (
          const   DTDElementDecl& elemDecl
          , const DTDAttDef&      attDef
          , const bool            ignoring
      );
  
      /**
        * This method is used to report a comment occurring within the DTD.
        *
        * <b><font color="#FF0000">This method is a no-op for this SAX driver
        * implementation.</font></b>
        *
        * @param comment  A const pointer to a Unicode string representing the
        *                 text of the comment just parsed.
        */
      virtual void doctypeComment
      (
          const   XMLCh* const    comment
      );
  
      /**
        * This method is used to report the DOCTYPE declaration.
        *
        * <b><font color="#FF0000">This method is a no-op for this SAX driver
        * implementation.</font></b>
        *
        * @param elemDecl A const reference to the object containing information
        *                 about the root element definition declaration of the
        *                 XML document being parsed.
        * @param publicId A const pointer to a Unicode string representing the
        *                 public id of the DTD file.
        * @param systemId A const pointer to a Unicode string representing the
        *                 system id of the DTD file.
        * @param hasIntSubset A flag indicating if this XML file contains any
        *                     internal subset.
        */
      virtual void doctypeDecl
      (
          const   DTDElementDecl& elemDecl
          , const XMLCh* const    publicId
          , const XMLCh* const    systemId
          , const bool            hasIntSubset
      );
  
      /**
        * This method is used to report any PI declarations
        * occurring inside the DTD definition block.
        *
        * <b><font color="#FF0000">This method is a no-op for this SAX driver
        * implementation.</font></b>
        *
        * @param target A const pointer to a Unicode string representing the
        *               target of the PI declaration.
        * @param data   A const pointer to a Unicode string representing the
        *               data of the PI declaration. See the PI production rule
        *               in the XML specification for details.
        */
      virtual void doctypePI
      (
          const   XMLCh* const    target
          , const XMLCh* const    data
      );
  
      /**
        * This method is used to report any whitespaces
        * occurring inside the DTD definition block.
        *
        * <b><font color="#FF0000">This method is a no-op for this SAX driver
        * implementation.</font></b>
        *
        * @param chars  A const pointer to a Unicode string representing the
        *               whitespace characters.
        * @param length The length of the whitespace Unicode string.
        */
      virtual void doctypeWhitespace
      (
          const   XMLCh* const    chars
          , const unsigned int    length
      );
  
      /**
        * This method is used to report an element declarations
        * successfully scanned by the parser.
        *
        * <b><font color="#FF0000">This method is a no-op for this SAX driver
        * implementation.</font></b>
        *
        * @param decl   A const reference to the object containing element
        *               declaration information.
        * @param isIgnored The flag indicating whether this definition was
        *                  ignored by the parser or not.
        */
      virtual void elementDecl
      (
          const   DTDElementDecl& decl
          , const bool            isIgnored
      );
  
      /**
        * This method is used to report the end of an attribute
        * list declaration for an element.
        *
        * <b><font color="#FF0000">This method is a no-op for this SAX driver
        * implementation.</font></b>
        *
        * @param elemDecl A const reference to the object containing element
        *                 declaration information.
        */
      virtual void endAttList
      (
          const   DTDElementDecl& elemDecl
      );
  
      /**
        * This method is used to report the end of the internal subset.
        *
        * <b><font color="#FF0000">This method is a no-op for this SAX driver
        * implementation.</font></b>
        */
      virtual void endIntSubset();
  
      /**
        * This method is used to report the end of the external subset.
        *
        * <b><font color="#FF0000">This method is a no-op for this SAX driver
        * implementation.</font></b>
        */
      virtual void endExtSubset();
  
      /**
        * This method is used to report any entity declarations.
        * For unparsed entities, this driver will invoke the
        * SAX DTDHandler::unparsedEntityDecl callback.
        *
        * @param entityDecl A const reference to the object containing
        *                   the entity declaration information.
        * @param isPEDecl  The flag indicating whether this was a
        *                  parameter entity declaration or not.
        * @param isIgnored The flag indicating whether this definition
        *                  was ignored by the parser or not.
        *
        * @see DTDHandler#unparsedEntityDecl
        */
      virtual void entityDecl
      (
          const   DTDEntityDecl&  entityDecl
          , const bool            isPEDecl
          , const bool            isIgnored
      );
  
      /**
        * This method allows the user installed DTD handler to
        * reset itself.
        */
      virtual void resetDocType();
  
      /**
        * This method is used to report any notation declarations.
        * If there is a user installed DTDHandler, then the driver will
        * invoke the SAX DTDHandler::notationDecl callback.
        *
        * @param notDecl A const reference to the object containing the notation
        *                declaration information.
        * @param isIgnored The flag indicating whether this definition was ignored
        *                  by the parser or not.
        *
        * @see DTDHandler#notationDecl
        */
      virtual void notationDecl
      (
          const   XMLNotationDecl&    notDecl
          , const bool                isIgnored
      );
  
      /**
        * This method is used to indicate the start of an element's attribute
        * list declaration.
        *
        * <b><font color="#FF0000">This method is a no-op for this SAX driver
        * implementation.</font></b>
        *
        * @param elemDecl A const reference to the object containing element
        *                 declaration information.
        */
      virtual void startAttList
      (
          const   DTDElementDecl& elemDecl
      );
  
      /**
        * This method is used indicate the start of the internal subset.
        *
        * <b><font color="#FF0000">This method is a no-op for this SAX driver
        * implementation.</font></b>
        */
      virtual void startIntSubset();
  
      /**
        * This method is used indicate the start of the external subset.
        *
        * <b><font color="#FF0000">This method is a no-op for this SAX driver
        * implementation.</font></b>
        */
      virtual void startExtSubset();
  
      /**
        * This method is used to report the TextDecl. Refer to the XML
        * specification for the syntax of a TextDecl.
        *
        * <b><font color="#FF0000">This method is a no-op for this SAX driver
        * implementation.</font></b>
        *
        * @param versionStr A const pointer to a Unicode string representing
        *                   the version number of the 'version' clause.
        * @param encodingStr A const pointer to a Unicode string representing
        *                    the encoding name of the 'encoding' clause.
        */
      virtual void TextDecl
      (
          const   XMLCh* const    versionStr
          , const XMLCh* const    encodingStr
      );
      //@}
  
      // -----------------------------------------------------------------------
      //  Validator: setters and getters
      // -----------------------------------------------------------------------
      /** @name Validator: setters and getters (Xerces-C specific) */
      //@{
      /**
  	  * This method is used to set a validator.
  	  *
  	  * <b>SAX2XMLReader assumes responsibility for the validator.  It will be
  	  * deleted when the XMLReader is destroyed.</b>
  	  *
  	  * @param valueToAdopt A pointer to the validator that the reader should use.
  	  *
  	  */
  	virtual void setValidator(XMLValidator* valueToAdopt);
  
      /**
  	  * This method is used to get the current validator.
  	  *
  	  * <b>SAX2XMLReader assumes responsibility for the validator.  It will be
  	  * deleted when the XMLReader is destroyed.</b>
  	  *
  	  * @return A pointer to the validator.  An application should not delete
  	  * the object returned.
  	  *
  	  */
  	virtual XMLValidator* getValidator() const;
      //@}
  
      // -----------------------------------------------------------------------
      //  Advanced document handler list maintenance methods
      // -----------------------------------------------------------------------
  
      /** @name Advanced document handler list maintenance methods */
      //@{
      /**
        * This method installs the specified 'advanced' document callback
        * handler, thereby allowing the user to customize the processing,
        * if they choose to do so. Any number of advanced callback handlers
        * maybe installed.
        *
        * <p>The methods in the advanced callback interface represent
        * Xerces-C extensions. There is no specification for this interface.</p>
        *
        * @param toInstall A pointer to the users advanced callback handler.
        *
        * @see #removeAdvDocHandler
        */
      virtual void installAdvDocHandler(XMLDocumentHandler* const toInstall);
  
      /**
        * This method removes the 'advanced' document handler callback from
        * the underlying parser scanner. If no handler is installed, advanced
        * callbacks are not invoked by the scanner.
        * @param toRemove A pointer to the advanced callback handler which
        *                 should be removed.
        *
        * @see #installAdvDocHandler
        */
      virtual bool removeAdvDocHandler(XMLDocumentHandler* const toRemove);
      //@}
  
      // -----------------------------------------------------------------------
      //  Progressive scan methods
      // -----------------------------------------------------------------------
  
      /** @name Progressive scan methods */
      //@{
  
      /** Begin a progressive parse operation
        *
        * This method is used to start a progressive parse on a XML file.
        * To continue parsing, subsequent calls must be to the parseNext
        * method.
        *
        * It scans through the prolog and returns a token to be used on
        * subsequent scanNext() calls. If the return value is true, then the
        * token is legal and ready for further use. If it returns false, then
        * the scan of the prolog failed and the token is not going to work on
        * subsequent scanNext() calls.
        *
        * @param systemId A pointer to a Unicode string represting the path
        *                 to the XML file to be parsed.
        * @param toFill   A token maintaing state information to maintain
        *                 internal consistency between invocation of 'parseNext'
        *                 calls.
        * @param reuseGrammar The flag indicating whether the existing Grammar
        *                     should be reused or not for this parsing run.
        *                     If true, there cannot be any internal subset.
        *
        * @return 'true', if successful in parsing the prolog. It indicates the
        *         user can go ahead with parsing the rest of the file. It
        *         returns 'false' to indicate that the parser could parse the
        *         prolog (which means the token will not be valid.)
        *
        * @see #parseNext
        * @see #parseFirst(char*,...)
        * @see #parseFirst(InputSource&,...)
        */
      virtual bool parseFirst
      (
          const   XMLCh* const    systemId
          ,       XMLPScanToken&  toFill
          , const bool            reuseGrammar = false
      );
  
      /** Begin a progressive parse operation
        *
        * This method is used to start a progressive parse on a XML file.
        * To continue parsing, subsequent calls must be to the parseNext
        * method.
        *
        * It scans through the prolog and returns a token to be used on
        * subsequent scanNext() calls. If the return value is true, then the
        * token is legal and ready for further use. If it returns false, then
        * the scan of the prolog failed and the token is not going to work on
        * subsequent scanNext() calls.
        *
        * @param systemId A pointer to a regular native string represting
        *                 the path to the XML file to be parsed.
        * @param toFill   A token maintaing state information to maintain
        *                 internal consIstency between invocation of 'parseNext'
        *                 calls.
        * @param reuseGrammar The flag indicating whether the existing Grammar
        *                     should be reused or not for this parsing run.
        *                     If true, there cannot be any internal subset.
        *
        * @return 'true', if successful in parsing the prolog. It indicates the
        *         user can go ahead with parsing the rest of the file. It
        *         returns 'false' to indicate that the parser could not parse
        *         the prolog.
        *
        * @see #parseNext
        * @see #parseFirst(XMLCh*,...)
        * @see #parseFirst(InputSource&,...)
        */
      virtual bool parseFirst
      (
          const   char* const     systemId
          ,       XMLPScanToken&  toFill
          , const bool            reuseGrammar = false
      );
  
      /** Begin a progressive parse operation
        *
        * This method is used to start a progressive parse on a XML file.
        * To continue parsing, subsequent calls must be to the parseNext
        * method.
        *
        * It scans through the prolog and returns a token to be used on
        * subsequent scanNext() calls. If the return value is true, then the
        * token is legal and ready for further use. If it returns false, then
        * the scan of the prolog failed and the token is not going to work on
        * subsequent scanNext() calls.
        *
        * @param source   A const reference to the InputSource object which
        *                 points to the XML file to be parsed.
        * @param toFill   A token maintaing state information to maintain
        *                 internal consistency between invocation of 'parseNext'
        *                 calls.
        * @param reuseGrammar The flag indicating whether the existing Grammar
        *                     should be reused or not for this parsing run.
        *                     If true, there cannot be any internal subset.
        *
        * @return 'true', if successful in parsing the prolog. It indicates the
        *         user can go ahead with parsing the rest of the file. It
        *         returns 'false' to indicate that the parser could not parse
        *         the prolog.
        *
        * @see #parseNext
        * @see #parseFirst(XMLCh*,...)
        * @see #parseFirst(char*,...)
        */
      virtual bool parseFirst
      (
          const   InputSource&    source
          ,       XMLPScanToken&  toFill
          , const bool            reuseGrammar = false
      );
  
      /** Continue a progressive parse operation
        *
        * This method is used to continue with progressive parsing of
        * XML files started by a call to 'parseFirst' method.
        *
        * It parses the XML file and stops as soon as it comes across
        * a XML token (as defined in the XML specification). Relevant
        * callback handlers are invoked as required by the SAX
        * specification.
        *
        * @param token A token maintaing state information to maintain
        *              internal consistency between invocation of 'parseNext'
        *              calls.
        *
        * @return 'true', if successful in parsing the next XML token.
        *         It indicates the user can go ahead with parsing the rest
        *         of the file. It returns 'false' to indicate that the parser
        *         could not find next token as per the XML specification
        *         production rule.
        *
        * @see #parseFirst(XMLCh*,...)
        * @see #parseFirst(char*,...)
        * @see #parseFirst(InputSource&,...)
        */
      virtual bool parseNext(XMLPScanToken& token);
  
      /** Reset the parser after a progressive parse
        *
        * If a progressive parse loop exits before the end of the document
        * is reached, the parser has no way of knowing this. So it will leave
        * open any files or sockets or memory buffers that were in use at
        * the time that the parse loop exited.
        *
        * The next parse operation will cause these open files and such to
        * be closed, but the next parse operation might occur at some unknown
        * future point. To avoid this problem, you should reset the parser if
        * you exit the loop early.
        *
        * If you exited because of an error, then this cleanup will be done
        * for you. Its only when you exit the file prematurely of your own
        * accord, because you've found what you wanted in the file most
        * likely.
        *
        * @param token A token maintaing state information to maintain
        *              internal consistency between invocation of 'parseNext'
        *              calls.
        */
      virtual void parseReset(XMLPScanToken& token);
  
      //@}
  
  private :
      // -----------------------------------------------------------------------
      //  Unimplemented constructors and operators
      // -----------------------------------------------------------------------
      SAX2XMLReaderImpl(const SAX2XMLReaderImpl&);
      void operator=(const SAX2XMLReaderImpl&);
  
      // -----------------------------------------------------------------------
      //  Private data members
      //
      //  fAttrList
      //      A temporary implementation of the basic SAX2 Attributes
      //      interface. We use this one over and over on each startElement
      //      event to allow SAX-like access to the element attributes.
      //
      //  fDocHandler
      //      The installed SAX content handler, if any. Null if none.
      //
      //  fnamespacePrefix
      //      Indicates whether the namespace-prefix feature is on or off.
      //
      //  fautoValidation
      //      Indicates whether automatic validation is on or off
      //
      //  fValidation
      //      Indicates whether the 'validation' core features is on or off
      //
      //  fReuseGrammar
      //      Tells the parser whether it should reuse the grammar or not.
      //      If true, there cannot be any internal subset.
      //
      //	fStringBuffers
      //		Any temporary strings we need are pulled out of this pool
      //
      //	fPrefixes
      //		A Stack of the current namespace prefixes that need calls to
      //		endPrefixMapping
      //
      //	fPrefixCounts
      //		A Stack of the number of prefixes that need endPrefixMapping
      //		calls for that element
      //
      //  fDTDHandler
      //      The installed SAX DTD handler, if any. Null if none.
      //
      //  fElemDepth
      //      This is used to track the element nesting depth, so that we can
      //      know when we are inside content. This is so we can ignore char
      //      data outside of content.
      //
      //  fEntityResolver
      //      The installed SAX entity handler, if any. Null if none.
      //
      //  fErrorHandler
      //      The installed SAX error handler, if any. Null if none.
      //
      //  fLexicalHandler
      //      The installed SAX lexical handler, if any.  Null if none.
      //
      //  fDecllHandler
      //      The installed SAX declaration handler, if any.  Null if none.
      //
      //  fAdvDHCount
      //  fAdvDHList
      //  fAdvDHListSize
      //      This is an array of pointers to XMLDocumentHandlers, which is
      //      how we see installed advanced document handlers. There will
      //      usually not be very many at all, so a simple array is used
      //      instead of a collection, for performance. It will grow if needed,
      //      but that is unlikely.
      //
      //      The count is how many handlers are currently installed. The size
      //      is how big the array itself is (for expansion purposes.) When
      //      count == size, is time to expand.
      //
      //  fParseInProgress
      //      This flag is set once a parse starts. It is used to prevent
      //      multiple entrance or reentrance of the parser.
      //
      //  fScanner
      //      The scanner being used by this parser. It is created internally
      //      during construction.
      //
      //  fHasExternalSubset
      //      Indicate if the document has external DTD subset.
      //
      // -----------------------------------------------------------------------
  	VecAttributesImpl		   fAttrList ;
  	ContentHandler*			   fDocHandler ;
  	RefVectorOf<XMLAttr>*      tempAttrVec ;
  
  	bool                       fnamespacePrefix;
  	bool                       fautoValidation;
  	bool                       fValidation;
  	bool                       fReuseGrammar;
  
  	XMLBufferMgr			   fStringBuffers ;
  	RefStackOf<XMLBuffer> *    fPrefixes ;
  	ValueStackOf<unsigned int> * prefixCounts ;
  
      DTDHandler*                fDTDHandler;
      unsigned int               fElemDepth;
      EntityResolver*            fEntityResolver;
      ErrorHandler*              fErrorHandler;
      LexicalHandler*            fLexicalHandler;
      DeclHandler*               fDeclHandler;
      unsigned int               fAdvDHCount;
      XMLDocumentHandler**       fAdvDHList;
      unsigned int               fAdvDHListSize;
      bool                       fParseInProgress;
      XMLScanner*                fScanner;
      bool                       fHasExternalSubset;
  	
      // -----------------------------------------------------------------------
      // internal function used to set the state of validation: always, never, or auto
      // -----------------------------------------------------------------------
      void setValidationScheme(const ValSchemes newScheme);
      void setDoNamespaces(const bool newState);
      bool getDoNamespaces() const;
      void setDoSchema(const bool newState);
      bool getDoSchema() const;
  
  };
  
  
  // ---------------------------------------------------------------------------
  //  SAX2XMLReader: Getter methods
  // ---------------------------------------------------------------------------
  inline ContentHandler* SAX2XMLReaderImpl::getContentHandler() const
  {
      return fDocHandler;
  }
  
  inline DTDHandler* SAX2XMLReaderImpl::getDTDHandler() const
  {
  	return fDTDHandler ;
  }
  
  inline EntityResolver* SAX2XMLReaderImpl::getEntityResolver() const
  {
  	return fEntityResolver;
  }
  
  inline ErrorHandler* SAX2XMLReaderImpl::getErrorHandler() const
  {
  	return fErrorHandler;
  }
  
  inline LexicalHandler* SAX2XMLReaderImpl::getLexicalHandler() const
  {
     return fLexicalHandler;
  }
  
  inline DeclHandler* SAX2XMLReaderImpl::getDeclarationHandler() const
  {
     return fDeclHandler;
  }
  
  inline bool SAX2XMLReaderImpl::getExitOnFirstFatalError() const
  {
      return fScanner->getExitOnFirstFatal();
  }
  
  inline bool SAX2XMLReaderImpl::getValidationConstraintFatal() const
  {
      return fScanner->getValidationConstraintFatal();
  }
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/parsers/SAXParser.hpp
  
  Index: SAXParser.hpp
  ===================================================================
  /*
   * 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/>.
   */
  
  /*
   * $Log: SAXParser.hpp,v $
   * Revision 1.1  2002/10/23 08:55:11  lilantha
   * update with new XML parser lib
   *
   * Revision 1.2  2002/02/20 18:17:01  tng
   * [Bug 5977] Warnings on generating apiDocs.
   *
   * Revision 1.1.1.1  2002/02/01 22:22:07  peiyongz
   * sane_include
   *
   * Revision 1.22  2001/12/05 22:09:02  tng
   * Update documentation for setExternalSchemaLocation and setExternalNoNamespaceSchemaLocation.
   *
   * Revision 1.21  2001/11/20 18:51:44  tng
   * Schema: schemaLocation and noNamespaceSchemaLocation to be specified outside the instance document.  New methods setExternalSchemaLocation and setExternalNoNamespaceSchemaLocation are added (for SAX2, two new properties are added).
   *
   * Revision 1.20  2001/08/01 19:11:02  tng
   * Add full schema constraint checking flag to the samples and the parser.
   *
   * Revision 1.19  2001/07/27 20:24:21  tng
   * put getScanner() back as they were there before, not to break existing apps.
   *
   * Revision 1.18  2001/07/16 12:52:09  tng
   * APIDocs fix: default for schema processing in DOMParser, IDOMParser, and SAXParser should be false.
   *
   * Revision 1.17  2001/06/23 14:13:16  tng
   * Remove getScanner from the Parser headers as this is not needed and Scanner is not internal class.
   *
   * Revision 1.16  2001/06/03 19:26:20  jberry
   * Add support for querying error count following parse; enables simple parse without requiring error handler.
   *
   * Revision 1.15  2001/05/11 13:26:22  tng
   * Copyright update.
   *
   * Revision 1.14  2001/05/03 19:09:25  knoaman
   * Support Warning/Error/FatalError messaging.
   * Validity constraints errors are treated as errors, with the ability by user to set
   * validity constraints as fatal errors.
   *
   * Revision 1.13  2001/03/30 16:46:57  tng
   * Schema: Use setDoSchema instead of setSchemaValidation which makes more sense.
   *
   * Revision 1.12  2001/03/21 21:56:09  tng
   * Schema: Add Schema Grammar, Schema Validator, and split the DTDValidator into DTDValidator, DTDScanner, and DTDGrammar.
   *
   * Revision 1.11  2001/02/15 15:56:29  tng
   * Schema: Add setSchemaValidation and getSchemaValidation for DOMParser and SAXParser.
   * Add feature "http://apache.org/xml/features/validation/schema" for SAX2XMLReader.
   * New data field  fSchemaValidation in XMLScanner as the flag.
   *
   * Revision 1.10  2001/01/12 21:23:41  tng
   * Documentation Enhancement: explain values of Val_Scheme
   *
   * Revision 1.9  2000/08/02 18:05:15  jpolast
   * changes required for sax2
   * (changed private members to protected)
   *
   * Revision 1.8  2000/04/12 22:58:30  roddey
   * Added support for 'auto validate' mode.
   *
   * Revision 1.7  2000/03/03 01:29:34  roddey
   * Added a scanReset()/parseReset() method to the scanner and
   * parsers, to allow for reset after early exit from a progressive parse.
   * Added calls to new Terminate() call to all of the samples. Improved
   * documentation in SAX and DOM parsers.
   *
   * Revision 1.6  2000/02/17 03:54:27  rahulj
   * Added some new getters to query the parser state and
   * clarified the documentation.
   *
   * Revision 1.5  2000/02/16 03:42:58  rahulj
   * Finished documenting the SAX Driver implementation.
   *
   * Revision 1.4  2000/02/15 04:47:37  rahulj
   * Documenting the SAXParser framework. Not done yet.
   *
   * Revision 1.3  2000/02/06 07:47:56  rahulj
   * Year 2K copyright swat.
   *
   * Revision 1.2  1999/12/15 19:57:48  roddey
   * Got rid of redundant 'const' on boolean return value. Some compilers choke
   * on this and its useless.
   *
   * Revision 1.1.1.1  1999/11/09 01:07:51  twl
   * Initial checkin
   *
   * Revision 1.6  1999/11/08 20:44:54  rahul
   * Swat for adding in Product name and CVS comment log variable.
   *
   */
  
  #if !defined(SAXPARSER_HPP)
  #define SAXPARSER_HPP
  
  #include <xercesc/sax/Parser.hpp>
  #include <xercesc/internal/VecAttrListImpl.hpp>
  #include <xercesc/framework/XMLDocumentHandler.hpp>
  #include <xercesc/framework/XMLElementDecl.hpp>
  #include <xercesc/framework/XMLEntityHandler.hpp>
  #include <xercesc/framework/XMLErrorReporter.hpp>
  #include <xercesc/validators/DTD/DocTypeHandler.hpp>
  
  class DocumentHandler;
  class EntityResolver;
  class XMLPScanToken;
  class XMLScanner;
  class XMLValidator;
  
  
  /**
    * This class implements the SAX 'Parser' interface and should be
    * used by applications wishing to parse the XML files using SAX.
    * It allows the client program to install SAX handlers for event
    * callbacks.
    *
    * <p>It can be used to instantiate a validating or non-validating
    * parser, by setting a member flag.</p>
    */
  
  class PARSERS_EXPORT SAXParser :
  
      public Parser
      , public XMLDocumentHandler
      , public XMLErrorReporter
      , public XMLEntityHandler
      , public DocTypeHandler
  {
  public :
      // -----------------------------------------------------------------------
      //  Class types
      // -----------------------------------------------------------------------
      enum ValSchemes
      {
          Val_Never
          , Val_Always
          , Val_Auto
      };
  
  
      // -----------------------------------------------------------------------
      //  Constructors and Destructor
      // -----------------------------------------------------------------------
  
      /** @name Constructors and Destructor */
      //@{
      /** Constructor with an instance of validator class to use for
        * validation.
        * @param valToAdopt Pointer to the validator instance to use. The
        *                   parser is responsible for freeing the memory.
        */
      SAXParser(XMLValidator* const valToAdopt = 0);
  
      /**
        * Destructor
        */
      ~SAXParser();
      //@}
  
  
      /** @name Getter methods */
      //@{
      /**
        * This method returns the installed document handler. Suitable
        * for 'lvalue' usages.
        *
        * @return The pointer to the installed document handler object.
        */
      DocumentHandler* getDocumentHandler();
  
      /**
        * This method returns the installed document handler. Suitable
        * only for 'rvalue' usages.
        *
        * @return A const pointer to the installed document handler object.
        */
      const DocumentHandler* getDocumentHandler() const;
  
      /**
        * This method returns the installed entity resolver. Suitable
        * for 'lvalue' usages.
        *
        * @return The pointer to the installed entity resolver object.
        */
      EntityResolver* getEntityResolver();
  
      /**
        * This method returns the installed entity resolver. Suitable
        * for 'rvalue' usages.
        *
        * @return A const pointer to the installed entity resolver object.
        */
      const EntityResolver* getEntityResolver() const;
  
      /**
        * This method returns the installed error handler. Suitable
        * for 'lvalue' usages.
        *
        * @return The pointer to the installed error handler object.
        */
      ErrorHandler* getErrorHandler();
  
      /**
        * This method returns the installed error handler. Suitable
        * for 'rvalue' usages.
        *
        * @return A const pointer to the installed error handler object.
        */
      const ErrorHandler* getErrorHandler() const;
  
      /**
        * This method returns a reference to the underlying scanner object.
        * It allows read only access to data maintained in the scanner.
        *
        * @return A const reference to the underlying scanner object.
        */
      const XMLScanner& getScanner() const;
  
      /**
        * This method returns a reference to the parser's installed
        * validator.
        *
        * @return A const reference to the installed validator object.
        */
      const XMLValidator& getValidator() const;
  
      /**
        * This method returns an enumerated value that indicates the current
        * validation scheme set on this parser.
        *
        * @return The ValSchemes value current set on this parser.
        * @see #setValidationScheme
        */
      ValSchemes getValidationScheme() const;
  
      /** Get the 'do schema' flag
        *
        * This method returns the state of the parser's schema processing
        * flag.
        *
        * @return true, if the parser is currently configured to
        *         understand schema, false otherwise.
        *
        * @see #setDoSchema
        */
      bool getDoSchema() const;
  
      /** Get the 'full schema constraint checking' flag
        *
        * This method returns the state of the parser's full schema constraint
        * checking flag.
        *
        * @return true, if the parser is currently configured to
        *         have full schema constraint checking, false otherwise.
        *
        * @see #setValidationSchemaFullChecking
        */
      bool getValidationSchemaFullChecking() const;
  
      /** Get error count from the last parse operation.
        *
        * This method returns the error count from the last parse
        * operation. Note that this count is actually stored in the
        * scanner, so this method simply returns what the
        * scanner reports.
        *
        * @return number of errors encountered during the latest
        *			parse operation.
        */
      int getErrorCount() const;
  
      /**
        * This method returns the state of the parser's namespace
        * handling capability.
        *
        * @return true, if the parser is currently configured to
        *         understand namespaces, false otherwise.
        *
        * @see #setDoNamespaces
        */
      bool getDoNamespaces() const;
  
      /**
        * This method returns the state of the parser's
        * exit-on-First-Fatal-Error flag.
        *
        * @return true, if the parser is currently configured to
        *         exit on the first fatal error, false otherwise.
        *
        * @see #setExitOnFirstFatalError
        */
      bool getExitOnFirstFatalError() const;
  
      /**
        * This method returns the state of the parser's
        * validation-constraint-fatal flag.
        *
        * @return true, if the parser is currently configured to
        *         set validation constraint errors as fatal, false
        *         otherwise.
        *
        * @see #setValidationContraintFatal
        */
      bool getValidationConstraintFatal() const;
  
     /** Get the set of Namespace/SchemaLocation that is specified externaly.
        *
        * This method returns the list of Namespace/SchemaLocation that was
        * specified using setExternalSchemaLocation.
        *
        * The parser owns the returned string, and the memory allocated for
        * the returned string will be destroyed when the parser is deleted.
        *
        * To ensure assessiblity of the returned information after the parser
        * is deleted, callers need to copy and store the returned information
        * somewhere else.
        *
        * @return a pointer to the list of Namespace/SchemaLocation that was
        *         specified externally.  The pointer spans the same life-time as
        *         the parser.  A null pointer is returned if nothing
        *         was specified externally.
        *
        * @see #setExternalSchemaLocation(const XMLCh* const)
        */
      XMLCh* getExternalSchemaLocation() const;
  
     /** Get the noNamespace SchemaLocation that is specified externaly.
        *
        * This method returns the no target namespace XML Schema Location
        * that was specified using setExternalNoNamespaceSchemaLocation.
        *
        * The parser owns the returned string, and the memory allocated for
        * the returned string will be destroyed when the parser is deleted.
        *
        * To ensure assessiblity of the returned information after the parser
        * is deleted, callers need to copy and store the returned information
        * somewhere else.
        *
        * @return a pointer to the no target namespace Schema Location that was
        *         specified externally.  The pointer spans the same life-time as
        *         the parser.  A null pointer is returned if nothing
        *         was specified externally.
        *
        * @see #setExternalNoNamespaceSchemaLocation(const XMLCh* const)
        */
      XMLCh* getExternalNoNamespaceSchemaLocation() const;
  
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Setter methods
      // -----------------------------------------------------------------------
  
      /** @name Setter methods */
      //@{
      /**
        * This method allows users to enable or disable the parser's
        * namespace processing. When set to true, parser starts enforcing
        * all the constraints / rules specified by the NameSpace
        * specification.
        *
        * <p>The parser's default state is: false.</p>
        *
        * <p>This flag is ignored by the underlying scanner if the installed
        * validator indicates that namespace constraints should be
        * enforced.</p>
        *
        * @param newState The value specifying whether NameSpace rules should
        *                 be enforced or not.
        *
        * @see #getDoNamespaces
        */
      void setDoNamespaces(const bool newState);
  
      /**
        * This method allows users to set the validation scheme to be used
        * by this parser. The value is one of the ValSchemes enumerated values
        * defined by this class:
        *
        * <br>  Val_Never  - turn off validation
        * <br>  Val_Always - turn on validation
        * <br>  Val_Auto   - turn on validation if any internal/external
        *                  DTD subset have been seen
        *
        * <p>The parser's default state is: Val_Auto.</p>
        *
        * @param newScheme The new validation scheme to use.
        *
        * @see #getValidationScheme
        */
      void setValidationScheme(const ValSchemes newScheme);
  
      /** Set the 'schema support' flag
        *
        * This method allows users to enable or disable the parser's
        * schema processing. When set to false, parser will not process
        * any schema found.
        *
        * The parser's default state is: false.
        *
        * @param newState The value specifying whether schema support should
        *                 be enforced or not.
        *
        * @see #getDoSchema
        */
      void setDoSchema(const bool newState);
  
      /**
        * This method allows the user to turn full Schema constraint checking on/off.
        * Only takes effect if Schema validation is enabled.
        * If turned off, partial constraint checking is done.
        *
        * Full schema constraint checking includes those checking that may
        * be time-consuming or memory intensive. Currently, particle unique
        * attribution constraint checking and particle derivation resriction checking
        * are controlled by this option.
        *
        * The parser's default state is: false.
        *
        * @param schemaFullChecking True to turn on full schema constraint checking.
        *
        * @see #getValidationSchemaFullChecking
        */
      void setValidationSchemaFullChecking(const bool schemaFullChecking);
  
      /**
        * This method allows users to set the parser's behaviour when it
        * encounters the first fatal error. If set to true, the parser
        * will exit at the first fatal error. If false, then it will
        * report the error and continue processing.
        *
        * <p>The default value is 'true' and the parser exits on the
        * first fatal error.</p>
        *
        * @param newState The value specifying whether the parser should
        *                 continue or exit when it encounters the first
        *                 fatal error.
        *
        * @see #getExitOnFirstFatalError
        */
      void setExitOnFirstFatalError(const bool newState);
  
      /**
        * This method allows users to set the parser's behaviour when it
        * encounters a validtion constraint error. If set to true, and the
        * the parser is set to exit when it encounter the first fatal error,
        * the parser will exit at the first encounter. If false, then it will
        * report the error and continue processing.
        *
        * <p>The default value is 'false'.</p>
        *
        * @param newState The value specifying whether the parser should
        *                 continue or exit when it encounters a validation
        *                 constraint error.
        *
        * @see #getValidationConstraintFatal
        */
      void setValidationConstraintFatal(const bool newState);
  
      /**
        * This method allows the user to specify a list of schemas to use.
        * If the targetNamespace of a schema specified using this method matches
        * the targetNamespace of a schema occuring in the instance document in
        * the schemaLocation attribute, or if the targetNamespace matches the
        * namespace attribute of the "import" element, the schema specified by the
        * user using this method will be used (i.e., the schemaLocation attribute
        * in the instance document or on the "import" element will be effectively ignored).
        *
        * If this method is called more than once, only the last one takes effect.
        *
        * The syntax is the same as for schemaLocation attributes in instance
        * documents: e.g, "http://www.example.com file_name.xsd". The user can
        * specify more than one XML Schema in the list.
        *
        * @param schemaLocation the list of schemas to use
        *
        * @see #getExternalSchemaLocation
        */
  
      void setExternalSchemaLocation(const XMLCh* const schemaLocation);
  
      /**
        * This method is same as setExternalSchemaLocation(const XMLCh* const).
        * It takes native char string as parameter
        *
        * @param schemaLocation the list of schemas to use
        *
        * @see #setExternalSchemaLocation(const XMLCh* const)
        */
      void setExternalSchemaLocation(const char* const schemaLocation);
  
      /**
        * This method allows the user to specify the no target namespace XML
        * Schema Location externally.  If specified, the instance document's
        * noNamespaceSchemaLocation attribute will be effectively ignored.
        *
        * If this method is called more than once, only the last one takes effect.
        *
        * The syntax is the same as for the noNamespaceSchemaLocation attribute
        * that may occur in an instance document: e.g."file_name.xsd".
        *
        * @param noNamespaceSchemaLocation the XML Schema Location with no target namespace
        *
        * @see #getExternalNoNamespaceSchemaLocation
        */
      void setExternalNoNamespaceSchemaLocation(const XMLCh* const noNamespaceSchemaLocation);
  
      /**
        * This method is same as setExternalNoNamespaceSchemaLocation(const XMLCh* const).
        * It takes native char string as parameter
        *
        * @param noNamespaceSchemaLocation the XML Schema Location with no target namespace
        *
        * @see #setExternalNoNamespaceSchemaLocation(const XMLCh* const)
        */
      void setExternalNoNamespaceSchemaLocation(const char* const noNamespaceSchemaLocation);
  
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Advanced document handler list maintenance methods
      // -----------------------------------------------------------------------
  
      /** @name Advanced document handler list maintenance methods */
      //@{
      /**
        * This method installs the specified 'advanced' document callback
        * handler, thereby allowing the user to customize the processing,
        * if they choose to do so. Any number of advanced callback handlers
        * maybe installed.
        *
        * <p>The methods in the advanced callback interface represent
        * Xerces-C extensions. There is no specification for this interface.</p>
        *
        * @param toInstall A pointer to the users advanced callback handler.
        *
        * @see #removeAdvDocHandler
        */
      void installAdvDocHandler(XMLDocumentHandler* const toInstall);
  
      /**
        * This method removes the 'advanced' document handler callback from
        * the underlying parser scanner. If no handler is installed, advanced
        * callbacks are not invoked by the scanner.
        * @param toRemove A pointer to the advanced callback handler which
        *                 should be removed.
        *
        * @see #installAdvDocHandler
        */
      bool removeAdvDocHandler(XMLDocumentHandler* const toRemove);
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Implementation of the SAXParser interface
      // -----------------------------------------------------------------------
  
      /** @name Implementation of SAX 1.0 interface's. */
      //@{
      /**
        * This method invokes the parsing process on the XML file specified
        * by the InputSource parameter.
        *
        * @param source A const reference to the InputSource object which
        *               points to the XML file to be parsed.
        * @param reuseGrammar The flag indicating whether the existing Grammar
        *                     should be reused or not for this parsing run.
        *                     If true, there cannot be any internal subset.
        *
        * @see Parser#parse(InputSource)
        */
      virtual void parse(const InputSource& source, const bool reuseGrammar = false);
  
      /**
        * This method invokes the parsing process on the XML file specified by
        * the Unicode string parameter 'systemId'.
        *
        * @param systemId A const XMLCh pointer to the Unicode string which
        *                 contains the path to the XML file to be parsed.
        * @param reuseGrammar The flag indicating whether the existing Grammar
        *                     should be reused or not for this parsing run.
        *                     If true, there cannot be any internal subset.
        *
        * @see Parser#parse(XMLCh*)
        */
      virtual void parse(const XMLCh* const systemId, const bool reuseGrammar = false);
  
      /**
        * This method invokes the parsing process on the XML file specified by
        * the native char* string parameter 'systemId'.
        *
        * @param systemId A const char pointer to a native string which
        *                 contains the path to the XML file to be parsed.
        * @param reuseGrammar The flag indicating whether the existing Grammar
        *                     should be reused or not for this parsing run.
        *                     If true, there cannot be any internal subset.
        */
      virtual void parse(const char* const systemId, const bool reuseGrammar = false);
  
      /**
        * This method installs the user specified SAX Document Handler
        * callback function on parser.
        *
        * @param handler A pointer to the document handler to be called
        *                when the parser comes across 'document' events
        *                as per the SAX specification.
        *
        * @see Parser#parse(char*)
        */
      virtual void setDocumentHandler(DocumentHandler* const handler);
  
      /**
        * This method installs the user specified DTD handler on the parser.
        *
        * @param handler A pointer to the DTD handler to be called
        *                when the parser comes across 'DTD' events
        *                as per the SAX specification.
        *
        * @see Parser#setDTDHandler
        */
      virtual void setDTDHandler(DTDHandler* const handler);
  
      /**
        * This method installs the user specified error handler on
        * the parser.
        *
        * @param handler A pointer to the error handler to be called
        *                when the parser comes across 'error' events
        *                as per the SAX specification.
        *
        * @see Parser#setErrorHandler
        */
      virtual void setErrorHandler(ErrorHandler* const handler);
  
      /**
        * This method installs the user specified entity resolver on the
        * parser. It allows applications to trap and redirect calls to
        * external entities.
        *
        * @param resolver A pointer to the entity resolver to be called
        *                 when the parser comes across references to
        *                 entities in the XML file.
        *
        * @see Parser#setEntityResolver
        */
      virtual void setEntityResolver(EntityResolver* const resolver);
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Progressive scan methods
      // -----------------------------------------------------------------------
  
      /** @name Progressive scan methods */
      //@{
  
      /** Begin a progressive parse operation
        *
        * This method is used to start a progressive parse on a XML file.
        * To continue parsing, subsequent calls must be to the parseNext
        * method.
        *
        * It scans through the prolog and returns a token to be used on
        * subsequent scanNext() calls. If the return value is true, then the
        * token is legal and ready for further use. If it returns false, then
        * the scan of the prolog failed and the token is not going to work on
        * subsequent scanNext() calls.
        *
        * @param systemId A pointer to a Unicode string represting the path
        *                 to the XML file to be parsed.
        * @param toFill   A token maintaing state information to maintain
        *                 internal consistency between invocation of 'parseNext'
        *                 calls.
        * @param reuseGrammar The flag indicating whether the existing Grammar
        *                     should be reused or not for this parsing run.
        *                     If true, there cannot be any internal subset.
        *
        * @return 'true', if successful in parsing the prolog. It indicates the
        *         user can go ahead with parsing the rest of the file. It
        *         returns 'false' to indicate that the parser could parse the
        *         prolog (which means the token will not be valid.)
        *
        * @see #parseNext
        * @see #parseFirst(char*,...)
        * @see #parseFirst(InputSource&,...)
        */
      bool parseFirst
      (
          const   XMLCh* const    systemId
          ,       XMLPScanToken&  toFill
          , const bool            reuseGrammar = false
      );
  
      /** Begin a progressive parse operation
        *
        * This method is used to start a progressive parse on a XML file.
        * To continue parsing, subsequent calls must be to the parseNext
        * method.
        *
        * It scans through the prolog and returns a token to be used on
        * subsequent scanNext() calls. If the return value is true, then the
        * token is legal and ready for further use. If it returns false, then
        * the scan of the prolog failed and the token is not going to work on
        * subsequent scanNext() calls.
        *
        * @param systemId A pointer to a regular native string represting
        *                 the path to the XML file to be parsed.
        * @param toFill   A token maintaing state information to maintain
        *                 internal consIstency between invocation of 'parseNext'
        *                 calls.
        * @param reuseGrammar The flag indicating whether the existing Grammar
        *                     should be reused or not for this parsing run.
        *                     If true, there cannot be any internal subset.
        *
        * @return 'true', if successful in parsing the prolog. It indicates the
        *         user can go ahead with parsing the rest of the file. It
        *         returns 'false' to indicate that the parser could not parse
        *         the prolog.
        *
        * @see #parseNext
        * @see #parseFirst(XMLCh*,...)
        * @see #parseFirst(InputSource&,...)
        */
      bool parseFirst
      (
          const   char* const     systemId
          ,       XMLPScanToken&  toFill
          , const bool            reuseGrammar = false
      );
  
      /** Begin a progressive parse operation
        *
        * This method is used to start a progressive parse on a XML file.
        * To continue parsing, subsequent calls must be to the parseNext
        * method.
        *
        * It scans through the prolog and returns a token to be used on
        * subsequent scanNext() calls. If the return value is true, then the
        * token is legal and ready for further use. If it returns false, then
        * the scan of the prolog failed and the token is not going to work on
        * subsequent scanNext() calls.
        *
        * @param source   A const reference to the InputSource object which
        *                 points to the XML file to be parsed.
        * @param toFill   A token maintaing state information to maintain
        *                 internal consistency between invocation of 'parseNext'
        *                 calls.
        * @param reuseGrammar The flag indicating whether the existing Grammar
        *                     should be reused or not for this parsing run.
        *                     If true, there cannot be any internal subset.
        *
        * @return 'true', if successful in parsing the prolog. It indicates the
        *         user can go ahead with parsing the rest of the file. It
        *         returns 'false' to indicate that the parser could not parse
        *         the prolog.
        *
        * @see #parseNext
        * @see #parseFirst(XMLCh*,...)
        * @see #parseFirst(char*,...)
        */
      bool parseFirst
      (
          const   InputSource&    source
          ,       XMLPScanToken&  toFill
          , const bool            reuseGrammar = false
      );
  
      /** Continue a progressive parse operation
        *
        * This method is used to continue with progressive parsing of
        * XML files started by a call to 'parseFirst' method.
        *
        * It parses the XML file and stops as soon as it comes across
        * a XML token (as defined in the XML specification). Relevant
        * callback handlers are invoked as required by the SAX
        * specification.
        *
        * @param token A token maintaing state information to maintain
        *              internal consistency between invocation of 'parseNext'
        *              calls.
        *
        * @return 'true', if successful in parsing the next XML token.
        *         It indicates the user can go ahead with parsing the rest
        *         of the file. It returns 'false' to indicate that the parser
        *         could not find next token as per the XML specification
        *         production rule.
        *
        * @see #parseFirst(XMLCh*,...)
        * @see #parseFirst(char*,...)
        * @see #parseFirst(InputSource&,...)
        */
      bool parseNext(XMLPScanToken& token);
  
      /** Reset the parser after a progressive parse
        *
        * If a progressive parse loop exits before the end of the document
        * is reached, the parser has no way of knowing this. So it will leave
        * open any files or sockets or memory buffers that were in use at
        * the time that the parse loop exited.
        *
        * The next parse operation will cause these open files and such to
        * be closed, but the next parse operation might occur at some unknown
        * future point. To avoid this problem, you should reset the parser if
        * you exit the loop early.
        *
        * If you exited because of an error, then this cleanup will be done
        * for you. Its only when you exit the file prematurely of your own
        * accord, because you've found what you wanted in the file most
        * likely.
        *
        * @param token A token maintaing state information to maintain
        *              internal consistency between invocation of 'parseNext'
        *              calls.
        */
      void parseReset(XMLPScanToken& token);
  
      //@}
  
  
  
      // -----------------------------------------------------------------------
      //  Implementation of the DocTypeHandler Interface
      // -----------------------------------------------------------------------
  
      /** @name Implementation of the DocTypeHandler Interface */
      //@{
      /**
        * This method is used to report an attribute definition.
        *
        * <b><font color="#FF0000">This method is a no-op for this SAX
        * driver implementation.</font></b>
        *
        * @param elemDecl A const reference to the object containing information
        *                 about the element whose attribute definition was just
        *                 parsed.
        * @param attDef   A const reference to the object containing information
        *                 attribute definition.
        * @param ignore   The flag indicating whether this attribute definition
        *                 was ignored by the parser or not.
        */
      virtual void attDef
      (
          const   DTDElementDecl& elemDecl
          , const DTDAttDef&      attDef
          , const bool            ignore
      );
  
      /**
        * This method is used to report a comment occurring within the DTD.
        *
        * <b><font color="#FF0000">This method is a no-op for this SAX driver
        * implementation.</font></b>
        *
        * @param comment  A const pointer to a Unicode string representing the
        *                 text of the comment just parsed.
        */
      virtual void doctypeComment
      (
          const   XMLCh* const    comment
      );
  
      /**
        * This method is used to report the DOCTYPE declaration.
        *
        * <b><font color="#FF0000">This method is a no-op for this SAX driver
        * implementation.</font></b>
        *
        * @param elemDecl A const reference to the object containing information
        *                 about the root element definition declaration of the
        *                 XML document being parsed.
        * @param publicId A const pointer to a Unicode string representing the
        *                 public id of the DTD file.
        * @param systemId A const pointer to a Unicode string representing the
        *                 system id of the DTD file.
        * @param hasIntSubset A flag indicating if this XML file contains any
        *                     internal subset.
        */
      virtual void doctypeDecl
      (
          const   DTDElementDecl& elemDecl
          , const XMLCh* const    publicId
          , const XMLCh* const    systemId
          , const bool            hasIntSubset
      );
  
      /**
        * This method is used to report any PI declarations
        * occurring inside the DTD definition block.
        *
        * <b><font color="#FF0000">This method is a no-op for this SAX driver
        * implementation.</font></b>
        *
        * @param target A const pointer to a Unicode string representing the
        *               target of the PI declaration.
        * @param data   A const pointer to a Unicode string representing the
        *               data of the PI declaration. See the PI production rule
        *               in the XML specification for details.
        */
      virtual void doctypePI
      (
          const   XMLCh* const    target
          , const XMLCh* const    data
      );
  
      /**
        * This method is used to report any whitespaces
        * occurring inside the DTD definition block.
        *
        * <b><font color="#FF0000">This method is a no-op for this SAX driver
        * implementation.</font></b>
        *
        * @param chars  A const pointer to a Unicode string representing the
        *               whitespace characters.
        * @param length The length of the whitespace Unicode string.
        */
      virtual void doctypeWhitespace
      (
          const   XMLCh* const    chars
          , const unsigned int    length
      );
  
      /**
        * This method is used to report an element declarations
        * successfully scanned by the parser.
        *
        * <b><font color="#FF0000">This method is a no-op for this SAX driver
        * implementation.</font></b>
        *
        * @param decl   A const reference to the object containing element
        *               declaration information.
        * @param isIgnored The flag indicating whether this definition was
        *                  ignored by the parser or not.
        */
      virtual void elementDecl
      (
          const   DTDElementDecl& decl
          , const bool            isIgnored
      );
  
      /**
        * This method is used to report the end of an attribute
        * list declaration for an element.
        *
        * <b><font color="#FF0000">This method is a no-op for this SAX driver
        * implementation.</font></b>
        *
        * @param elemDecl A const reference to the object containing element
        *                 declaration information.
        */
      virtual void endAttList
      (
          const   DTDElementDecl& elemDecl
      );
  
      /**
        * This method is used to report the end of the internal subset.
        *
        * <b><font color="#FF0000">This method is a no-op for this SAX driver
        * implementation.</font></b>
        */
      virtual void endIntSubset();
  
      /**
        * This method is used to report the end of the external subset.
        *
        * <b><font color="#FF0000">This method is a no-op for this SAX driver
        * implementation.</font></b>
        */
      virtual void endExtSubset();
  
      /**
        * This method is used to report any entity declarations.
        * For unparsed entities, this driver will invoke the
        * SAX DTDHandler::unparsedEntityDecl callback.
        *
        * @param entityDecl A const reference to the object containing
        *                   the entity declaration information.
        * @param isPEDecl  The flag indicating whether this was a
        *                  parameter entity declaration or not.
        * @param isIgnored The flag indicating whether this definition
        *                  was ignored by the parser or not.
        *
        * @see DTDHandler#unparsedEntityDecl
        */
      virtual void entityDecl
      (
          const   DTDEntityDecl&  entityDecl
          , const bool            isPEDecl
          , const bool            isIgnored
      );
  
      /**
        * This method allows the user installed DTD handler to
        * reset itself.
        */
      virtual void resetDocType();
  
      /**
        * This method is used to report any notation declarations.
        * If there is a user installed DTDHandler, then the driver will
        * invoke the SAX DTDHandler::notationDecl callback.
        *
        * @param notDecl A const reference to the object containing the notation
        *                declaration information.
        * @param isIgnored The flag indicating whether this definition was ignored
        *                  by the parser or not.
        *
        * @see DTDHandler#notationDecl
        */
      virtual void notationDecl
      (
          const   XMLNotationDecl&    notDecl
          , const bool                isIgnored
      );
  
      /**
        * This method is used to indicate the start of an element's attribute
        * list declaration.
        *
        * <b><font color="#FF0000">This method is a no-op for this SAX driver
        * implementation.</font></b>
        *
        * @param elemDecl A const reference to the object containing element
        *                 declaration information.
        */
      virtual void startAttList
      (
          const   DTDElementDecl& elemDecl
      );
  
      /**
        * This method is used indicate the start of the internal subset.
        *
        * <b><font color="#FF0000">This method is a no-op for this SAX driver
        * implementation.</font></b>
        */
      virtual void startIntSubset();
  
      /**
        * This method is used indicate the start of the external subset.
        *
        * <b><font color="#FF0000">This method is a no-op for this SAX driver
        * implementation.</font></b>
        */
      virtual void startExtSubset();
  
      /**
        * This method is used to report the TextDecl. Refer to the XML
        * specification for the syntax of a TextDecl.
        *
        * <b><font color="#FF0000">This method is a no-op for this SAX driver
        * implementation.</font></b>
        *
        * @param versionStr A const pointer to a Unicode string representing
        *                   the version number of the 'version' clause.
        * @param encodingStr A const pointer to a Unicode string representing
        *                    the encoding name of the 'encoding' clause.
        */
      virtual void TextDecl
      (
          const   XMLCh* const    versionStr
          , const XMLCh* const    encodingStr
      );
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Implementation of the XMLDocumentHandler interface
      // -----------------------------------------------------------------------
  
      /** @name Implementation of the XMLDocumentHandler Interface. */
      //@{
      /**
        * This method is used to report all the characters scanned
        * by the parser. The driver will invoke the 'characters'
        * method of the user installed SAX Document Handler.
        *
        * <p>If any advanced callback handlers are installed, the
        * corresponding 'docCharacters' method will also be invoked.</p>
        *
        * @param chars   A const pointer to a Unicode string representing the
        *                character data.
        * @param length  The length of the Unicode string returned in 'chars'.
        * @param cdataSection  A flag indicating if the characters represent
        *                      content from the CDATA section.
        * @see DocumentHandler#characters
        */
      virtual void docCharacters
      (
          const   XMLCh* const    chars
          , const unsigned int    length
          , const bool            cdataSection
      );
  
      /**
        * This method is used to report any comments scanned by the parser.
        * This method is a no-op unless, unless an advanced callback handler
        * is installed, in which case the corresponding 'docComment' method
        * is invoked.
        *
        * @param comment A const pointer to a null terminated Unicode
        *                string representing the comment text.
        */
      virtual void docComment
      (
          const   XMLCh* const    comment
      );
  
      /**
        * This method is used to report any PI scanned by the parser.
        *
        * <p>Any PI's occurring before any 'content' are not reported
        * to any SAX handler as per the specification. However, all
        * PI's within content are reported via the SAX Document Handler's
        * 'processingInstruction' method.
        *
        * <p>If any advanced callback handlers are installed, the
        * corresponding 'docPI' method will be invoked.</p>
        *
        * @param target A const pointer to a Unicode string representing the
        *               target of the PI declaration.
        * @param data   A const pointer to a Unicode string representing the
        *               data of the PI declaration. See the PI production rule
        *               in the XML specification for details.
        *
        * @see DocumentHandler#processingInstruction
        */
      virtual void docPI
      (
          const   XMLCh* const    target
          , const XMLCh* const    data
      );
  
      /**
        * This method is used to indicate the end of root element
        * was just scanned by the parser. Corresponding 'endDocument'
        * method of the user installed SAX Document Handler will also
        * be invoked.
        *
        * <p>In addition, if any advanced callback handlers are installed,
        * the corresponding 'endDocument' method is invoked.</p>
        *
        * @see DocumentHandler#endDocument
        */
      virtual void endDocument();
  
      /**
        * This method is used to indicate the end tag of an element.
        * The driver will invoke the corresponding 'endElement' method of
        * the SAX Document Handler interface.
        *
        * <p>If any advanced callback handlers are installed, the
        * corresponding 'endElement' method is also invoked.</p>
        *
        * @param elemDecl A const reference to the object containing element
        *                 declaration information.
        * @param urlId    An id referring to the namespace prefix, if
        *                 namespaces setting is switched on.
        * @param isRoot   A flag indicating whether this element was the
        *                 root element.
        * @see DocumentHandler#endElement
        */
      virtual void endElement
      (
          const   XMLElementDecl& elemDecl
          , const unsigned int    urlId
          , const bool            isRoot
      );
  
      /**
        * This method is used to indicate that an end of an entity reference
        * was just scanned.
        *
        * <p>If any advanced callback handlers are installed, the
        * corresponding 'endEnityReference' method is invoked.</p>
        *
        * @param entDecl A const reference to the object containing the
        *                entity declaration information.
        */
      virtual void endEntityReference
      (
          const   XMLEntityDecl&  entDecl
      );
  
      /**
        * This method is used to report all the whitespace characters,
        * which are determined to be 'ignorable'. This distinction
        * between characters is only made, if validation is enabled.
        * Corresponding 'ignorableWhitespace' method of the user installed
        * SAX Document Handler interface is called.
        *
        * <p>Any whitespace before content is not reported to the SAX
        * Document Handler method, as per the SAX specification.
        * However, if any advanced callback handlers are installed, the
        * corresponding 'ignorableWhitespace' method is invoked.</p>
        *
        * @param chars   A const pointer to a Unicode string representing the
        *                ignorable whitespace character data.
        * @param length  The length of the Unicode string 'chars'.
        * @param cdataSection  A flag indicating if the characters represent
        *                      content from the CDATA section.
        * @see DocumentHandler#ignorableWhitespace
        */
      virtual void ignorableWhitespace
      (
          const   XMLCh* const    chars
          , const unsigned int    length
          , const bool            cdataSection
      );
  
      /**
        * This method allows the user installed Document Handler and
        * any advanced callback handlers to 'reset' themselves.
        */
      virtual void resetDocument();
  
      /**
        * This method is used to report the start of the parsing process.
        * The corresponding user installed SAX Document Handler's method
        * 'startDocument' is invoked.
        *
        * <p>If any advanced callback handlers are installed, then the
        * corresponding 'startDocument' method is also called.</p>
        *
        * @see DocumentHandler#startDocument
        */
      virtual void startDocument();
  
      /**
        * This method is used to report the start of an element. It is
        * called at the end of the element, by which time all attributes
        * specified are also parsed. The corresponding user installed
        * SAX Document Handler's method 'startElement' is invoked.
        *
        * <p>If any advanced callback handlers are installed, then the
        * corresponding 'startElement' method is also called.</p>
        *
        * @param elemDecl A const reference to the object containing element
        *                 declaration information.
        * @param urlId    An id referring to the namespace prefix, if
        *                 namespaces setting is switched on.
        * @param elemPrefix A const pointer to a Unicode string containing
        *                   the namespace prefix for this element. Applicable
        *                   only when namespace processing is enabled.
        * @param attrList  A const reference to the object containing the
        *                  list of attributes just scanned for this element.
        * @param attrCount A count of number of attributes in the list
        *                  specified by the parameter 'attrList'.
        * @param isEmpty  A flag indicating whether this is an empty element
        *                 or not.
        * @param isRoot   A flag indicating whether this element was the
        *                 root element.
        * @see DocumentHandler#startElement
        */
      virtual void startElement
      (
          const   XMLElementDecl&         elemDecl
          , const unsigned int            urlId
          , const XMLCh* const            elemPrefix
          , const RefVectorOf<XMLAttr>&   attrList
          , const unsigned int            attrCount
          , const bool                    isEmpty
          , const bool                    isRoot
      );
  
      /**
        * This method is used to indicate the start of an entity reference.
        *
        * <p>If any advanced callback handlers are installed, the
        * corresponding 'endEnityReference' method is invoked.</p>
        *
        * @param entDecl A const reference to the object containing the
        *                entity declaration information.
        */
      virtual void startEntityReference
      (
          const   XMLEntityDecl&  entDecl
      );
  
      /**
        * This method is used to report the XML decl scanned by the parser.
        * Refer to the XML specification to see the meaning of parameters.
        *
        * <b><font color="#FF0000">This method is a no-op for this SAX driver
        * implementation.</font></b>
        *
        * @param versionStr A const pointer to a Unicode string representing
        *                   version string value.
        * @param encodingStr A const pointer to a Unicode string representing
        *                    the encoding string value.
        * @param standaloneStr A const pointer to a Unicode string
        *                      representing the standalone string value.
        * @param actualEncodingStr A const pointer to a Unicode string
        *                          representing the actual encoding string
        *                          value.
        */
      virtual void XMLDecl
      (
          const   XMLCh* const    versionStr
          , const XMLCh* const    encodingStr
          , const XMLCh* const    standaloneStr
          , const XMLCh* const    actualEncodingStr
      );
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Implementation of the XMLErrorReporter interface
      // -----------------------------------------------------------------------
  
      /** @name Implementation of the XMLErrorReporter Interface. */
      //@{
      /**
        * This method is used to report back errors found while parsing the
        * XML file. The driver will call the corresponding user installed
        * SAX Error Handler methods: 'fatal', 'error', 'warning' depending
        * on the severity of the error. This classification is defined by
        * the XML specification.
        *
        * @param errCode An integer code for the error.
        * @param msgDomain A const pointer to an Unicode string representing
        *                  the message domain to use.
        * @param errType An enumeration classifying the severity of the error.
        * @param errorText A const pointer to an Unicode string representing
        *                  the text of the error message.
        * @param systemId  A const pointer to an Unicode string representing
        *                  the system id of the XML file where this error
        *                  was discovered.
        * @param publicId  A const pointer to an Unicode string representing
        *                  the public id of the XML file where this error
        *                  was discovered.
        * @param lineNum   The line number where the error occurred.
        * @param colNum    The column number where the error occurred.
        * @see ErrorHandler
        */
      virtual void error
      (
          const   unsigned int                errCode
          , const XMLCh* const                msgDomain
          , const XMLErrorReporter::ErrTypes  errType
          , const XMLCh* const                errorText
          , const XMLCh* const                systemId
          , const XMLCh* const                publicId
          , const unsigned int                lineNum
          , const unsigned int                colNum
      );
  
      /**
        * This method allows the user installed Error Handler
        * callback to 'reset' itself.
        *
        * <b><font color="#FF0000">This method is a no-op for this SAX driver
        * implementation.</font></b>
        *
        */
      virtual void resetErrors();
      //@}
  
  
      // -----------------------------------------------------------------------
      //  Implementation of the XMLEntityHandler interface
      // -----------------------------------------------------------------------
  
      /** @name Implementation of the XMLEntityHandler Interface. */
      //@{
      /**
        * This method is used to indicate the end of parsing of an external
        * entity file.
        *
        * <b><font color="#FF0000">This method is a no-op for this SAX driver
        * implementation.</font></b>
        *
        * @param inputSource A const reference to the InputSource object
        *                    which points to the XML file being parsed.
        * @see InputSource
        */
      virtual void endInputSource(const InputSource& inputSource);
  
      /**
        * This method allows an installed XMLEntityHandler to further
        * process any system id's of enternal entities encountered in
        * the XML file being parsed, such as redirection etc.
        *
        * <b><font color="#FF0000">This method always returns 'false'
        * for this SAX driver implementation.</font></b>
        *
        * @param systemId  A const pointer to an Unicode string representing
        *                  the system id scanned by the parser.
        * @param toFill    A pointer to a buffer in which the application
        *                  processed system id is stored.
        * @return 'true', if any processing is done, 'false' otherwise.
        */
      virtual bool expandSystemId
      (
          const   XMLCh* const    systemId
          ,       XMLBuffer&      toFill
      );
  
      /**
        * This method allows the installed XMLEntityHandler to reset
        * itself.
        *
        * <b><font color="#FF0000">This method is a no-op for this SAX driver
        * implementation.</font></b>
        */
      virtual void resetEntities();
  
      /**
        * This method allows a user installed entity handler to further
        * process any pointers to external entities. The applications
        * can implement 'redirection' via this callback. The driver
        * should call the SAX EntityHandler 'resolveEntity' method.
        *
        * @param publicId A const pointer to a Unicode string representing the
        *                 public id of the entity just parsed.
        * @param systemId A const pointer to a Unicode string representing the
        *                 system id of the entity just parsed.
        * @return The value returned by the SAX resolveEntity method or
        *         NULL otherwise to indicate no processing was done.
        * @see EntityResolver
        */
      virtual InputSource* resolveEntity
      (
          const   XMLCh* const    publicId
          , const XMLCh* const    systemId
      );
  
      /**
        * This method is used to indicate the start of parsing an
        * external entity file.
        *
        * <b><font color="#FF0000">This method is a no-op for this SAX driver
        * implementation.</font></b>
        *
        * @param inputSource A const reference to the InputSource object
        *                    which points to the external entity
        *                    being parsed.
        */
      virtual void startInputSource(const InputSource& inputSource);
      //@}
  
  
      /** @name Deprecated Methods */
      //@{
      /**
        * This method returns the state of the parser's validation
        * handling flag which controls whether validation checks
        * are enforced or not.
        *
        * @return true, if the parser is currently configured to
        *         do validation, false otherwise.
        *
        * @see #setDoValidation
        */
      bool getDoValidation() const;
  
      /**
        * This method allows users to enable or disable the parser's validation
        * checks.
        *
        * <p>By default, the parser does not to any validation. The default
        * value is false.</p>
        *
        * @param newState The value specifying whether the parser should
        *                 do validity checks or not against the DTD in the
        *                 input XML document.
        *
        * @see #getDoValidation
        */
      void setDoValidation(const bool newState);
      //@}
  
  
  protected :
      // -----------------------------------------------------------------------
      //  Unimplemented constructors and operators
      // -----------------------------------------------------------------------
      SAXParser(const SAXParser&);
      void operator=(const SAXParser&);
  
  
      // -----------------------------------------------------------------------
      //  Private data members
      //
      //  fAttrList
      //      A temporary implementation of the basic SAX attribute list
      //      interface. We use this one over and over on each startElement
      //      event to allow SAX-like access to the element attributes.
      //
      //  fDocHandler
      //      The installed SAX doc handler, if any. Null if none.
      //
      //  fDTDHandler
      //      The installed SAX DTD handler, if any. Null if none.
      //
      //  fElemDepth
      //      This is used to track the element nesting depth, so that we can
      //      know when we are inside content. This is so we can ignore char
      //      data outside of content.
      //
      //  fEntityResolver
      //      The installed SAX entity handler, if any. Null if none.
      //
      //  fErrorHandler
      //      The installed SAX error handler, if any. Null if none.
      //
      //  fAdvDHCount
      //  fAdvDHList
      //  fAdvDHListSize
      //      This is an array of pointers to XMLDocumentHandlers, which is
      //      how we see installed advanced document handlers. There will
      //      usually not be very many at all, so a simple array is used
      //      instead of a collection, for performance. It will grow if needed,
      //      but that is unlikely.
      //
      //      The count is how many handlers are currently installed. The size
      //      is how big the array itself is (for expansion purposes.) When
      //      count == size, is time to expand.
      //
      //  fParseInProgress
      //      This flag is set once a parse starts. It is used to prevent
      //      multiple entrance or reentrance of the parser.
      //
      //  fScanner
      //      The scanner being used by this parser. It is created internally
      //      during construction.
      //
      // -----------------------------------------------------------------------
      VecAttrListImpl         fAttrList;
      DocumentHandler*        fDocHandler;
      DTDHandler*             fDTDHandler;
      unsigned int            fElemDepth;
      EntityResolver*         fEntityResolver;
      ErrorHandler*           fErrorHandler;
      unsigned int            fAdvDHCount;
      XMLDocumentHandler**    fAdvDHList;
      unsigned int            fAdvDHListSize;
      bool                    fParseInProgress;
      XMLScanner*             fScanner;
  };
  
  
  // ---------------------------------------------------------------------------
  //  SAXParser: Getter methods
  // ---------------------------------------------------------------------------
  inline DocumentHandler* SAXParser::getDocumentHandler()
  {
      return fDocHandler;
  }
  
  inline const DocumentHandler* SAXParser::getDocumentHandler() const
  {
      return fDocHandler;
  }
  
  inline EntityResolver* SAXParser::getEntityResolver()
  {
      return fEntityResolver;
  }
  
  inline const EntityResolver* SAXParser::getEntityResolver() const
  {
      return fEntityResolver;
  }
  
  inline ErrorHandler* SAXParser::getErrorHandler()
  {
      return fErrorHandler;
  }
  
  inline const ErrorHandler* SAXParser::getErrorHandler() const
  {
      return fErrorHandler;
  }
  
  inline const XMLScanner& SAXParser::getScanner() const
  {
      return *fScanner;
  }
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/sax/AttributeList.hpp
  
  Index: AttributeList.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: AttributeList.hpp,v $
   * Revision 1.1  2002/10/23 08:55:12  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:22:07  peiyongz
   * sane_include
   *
   * Revision 1.8  2000/03/02 19:54:34  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:12:54  abagchi
   * Swat for removing Log from API docs
   *
   * Revision 1.6  2000/02/12 03:31:55  rahulj
   * Removed duplicate CVS Log entries.
   *
   * Revision 1.5  2000/02/12 01:27:19  aruna1
   * Documentation updated
   *
   * Revision 1.4  2000/02/09 02:12:21  abagchi
   * Added getValue docs
   *
   * Revision 1.3  2000/02/06 07:47:57  rahulj
   * Year 2K copyright swat.
   *
   * Revision 1.2  1999/12/15 19:58:31  roddey
   * Added new convenience version of getValue() that takes a short character
   * string for the attribute name.
   *
   * Revision 1.1.1.1  1999/11/09 01:07:43  twl
   * Initial checkin
   *
   * Revision 1.2  1999/11/08 20:44:54  rahul
   * Swat for adding in Product name and CVS comment log variable.
   *
   */
  
  #ifndef ATTRIBUTELIST_HPP
  #define ATTRIBUTELIST_HPP
  
  #include <xercesc/util/XercesDefs.hpp>
  
  /**
    * Interface for an element's attribute specifications.
    *
    * The SAX parser implements this interface and passes an instance
    * to the SAX application as the second argument of each startElement
    * event.
    *
    * The instance provided will return valid results only during the
    * scope of the startElement invocation (to save it for future
    * use, the application must make a copy: the AttributeListImpl
    * helper class provides a convenient constructor for doing so).
    *
    * An AttributeList includes only attributes that have been
    * specified or defaulted: #IMPLIED attributes will not be included.
    *
    * There are two ways for the SAX application to obtain information
    * from the AttributeList.  First, it can iterate through the entire
    * list:
    *
    * <pre>
    * public void startElement (String name, AttributeList atts) {
    *   for (int i = 0; i < atts.getLength(); i++) {
    *     String name = atts.getName(i);
    *     String type = atts.getType(i);
    *     String value = atts.getValue(i);
    *     [...]
    *   }
    * }
    * </pre>
    *
    * (Note that the result of getLength() will be zero if there
    * are no attributes.)
    *
    * As an alternative, the application can request the value or
    * type of specific attributes:
    *
    * <pre>
    * public void startElement (String name, AttributeList atts) {
    *   String identifier = atts.getValue("id");
    *   String label = atts.getValue("label");
    *   [...]
    * }
    * </pre>
    *
    * The AttributeListImpl helper class provides a convenience 
    * implementation for use by parser or application writers.
    *
    * @see DocumentHandler#startElement 
    * @see AttributeListImpl#AttributeListImpl
    */
  
  class SAX_EXPORT AttributeList
  {
  public:
      // -----------------------------------------------------------------------
      //  Constructors and Destructor
      // -----------------------------------------------------------------------
      /** @name Constructors and Destructor */
      //@{
      /** Default constructor */
      AttributeList()
      {
      }
  
      /** Destructor */
      virtual ~AttributeList()
      {
      }
      //@}
  
      /** @name The virtual attribute list interface */
      //@{
    /**
      * Return the number of attributes in this list.
      *
      * The SAX parser may provide attributes in any
      * arbitrary order, regardless of the order in which they were
      * declared or specified.  The number of attributes may be
      * zero.
      *
      * @return The number of attributes in the list.  
      */
      virtual unsigned int getLength() const = 0;
  
    /**
      * Return the name of an attribute in this list (by position).
      *
      * The names must be unique: the SAX parser shall not include the
      * same attribute twice.  Attributes without values (those declared
      * #IMPLIED without a value specified in the start tag) will be
      * omitted from the list.
      *
      * If the attribute name has a namespace prefix, the prefix
      * will still be attached.
      *
      * @param index The index of the attribute in the list (starting at 0).
      * @return The name of the indexed attribute, or null
      *         if the index is out of range.
      * @see #getLength 
      */
      virtual const XMLCh* getName(const unsigned int index) const = 0;
  
    /**
      * Return the type of an attribute in the list (by position).
      *
      * The attribute type is one of the strings "CDATA", "ID",
      * "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", "ENTITIES",
      * or "NOTATION" (always in upper case).
      *
      * If the parser has not read a declaration for the attribute,
      * or if the parser does not report attribute types, then it must
      * return the value "CDATA" as stated in the XML 1.0 Recommentation
      * (clause 3.3.3, "Attribute-Value Normalization").
      *
      * For an enumerated attribute that is not a notation, the
      * parser will report the type as "NMTOKEN".
      *
      * @param index The index of the attribute in the list (starting at 0).
      * @return The attribute type as a string, or
      *         null if the index is out of range.
      * @see #getLength 
      * @see #getType(String)
      */
      virtual const XMLCh* getType(const unsigned int index) const = 0;
  
    /**
      * Return the value of an attribute in the list (by position).
      *
      * If the attribute value is a list of tokens (IDREFS,
      * ENTITIES, or NMTOKENS), the tokens will be concatenated
      * into a single string separated by whitespace.
      *
      * @param index The index of the attribute in the list (starting at 0).
      * @return The attribute value as a string, or
      *         null if the index is out of range.
      * @see #getLength
      * @see #getValue(XMLCh*)
      * @see #getValue(char *)
      */
      virtual const XMLCh* getValue(const unsigned int index) const = 0;
  
    /**
      * Return the type of an attribute in the list (by name).
      *
      * The return value is the same as the return value for
      * getType(int).
      *
      * If the attribute name has a namespace prefix in the document,
      * the application must include the prefix here.
      *
      * @param name The name of the attribute.
      * @return The attribute type as a string, or null if no
      *         such attribute exists.
      * @see #getType(int)
      */
      virtual const XMLCh* getType(const XMLCh* const name) const = 0;
  
    /**
      * Return the value of an attribute in the list (by name).
      *
      * The return value is the same as the return value for
      * getValue(int).
      *
      * If the attribute name has a namespace prefix in the document,
      * the application must include the prefix here.
      *
      * @param name The name of the attribute in the list.
      * @return The attribute value as a string, or null if
      *         no such attribute exists.
      * @see #getValue(int)
      * @see #getValue(char *)
      */
      virtual const XMLCh* getValue(const XMLCh* const name) const = 0;
  
    /**
      * Return the value of an attribute in the list (by name).
      *
      * The return value is the same as the return value for
      * getValue(int).
      *
      * If the attribute name has a namespace prefix in the document,
      * the application must include the prefix here.
      *
      * @param name The name of the attribute in the list.
      * @return The attribute value as a string, or null if
      *         no such attribute exists.
      * @see #getValue(int)
      * @see #getValue(XMLCh*)
      */
      virtual const XMLCh* getValue(const char* const name) const = 0;
      //@}
  
  private :
      /* Constructors and operators */
      /* Copy constructor */
      AttributeList(const AttributeList&);
      /* Assignment operator */
      void operator=(const AttributeList&);
      
  };
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/sax/DTDHandler.hpp
  
  Index: DTDHandler.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: DTDHandler.hpp,v $
   * Revision 1.1  2002/10/23 08:55:12  lilantha
   * update with new XML parser lib
   *
   * Revision 1.2  2002/02/20 18:17:01  tng
   * [Bug 5977] Warnings on generating apiDocs.
   *
   * Revision 1.1.1.1  2002/02/01 22:22:08  peiyongz
   * sane_include
   *
   * Revision 1.5  2000/02/24 20:12:54  abagchi
   * Swat for removing Log from API docs
   *
   * Revision 1.4  2000/02/12 03:31:55  rahulj
   * Removed duplicate CVS Log entries.
   *
   * Revision 1.3  2000/02/12 01:27:19  aruna1
   * Documentation updated
   *
   * Revision 1.2  2000/02/06 07:47:57  rahulj
   * Year 2K copyright swat.
   *
   * Revision 1.1.1.1  1999/11/09 01:07:44  twl
   * Initial checkin
   *
   * Revision 1.2  1999/11/08 20:44:54  rahul
   * Swat for adding in Product name and CVS comment log variable.
   *
   */
  
  
  #ifndef DTDHANDLER_HPP
  #define DTDHANDLER_HPP
  
  /**
    * Receive notification of basic DTD-related events.
    *
    * <p>If a SAX application needs information about notations and
    * unparsed entities, then the application implements this
    * interface and registers an instance with the SAX parser using
    * the parser's setDTDHandler method.  The parser uses the
    * instance to report notation and unparsed entity declarations to
    * the application.</p>
    *
    * <p>The SAX parser may report these events in any order, regardless
    * of the order in which the notations and unparsed entities were
    * declared; however, all DTD events must be reported after the
    * document handler's startDocument event, and before the first
    * startElement event.</p>
    *
    * <p>It is up to the application to store the information for
    * future use (perhaps in a hash table or object tree).
    * If the application encounters attributes of type "NOTATION",
    * "ENTITY", or "ENTITIES", it can use the information that it
    * obtained through this interface to find the entity and/or
    * notation corresponding with the attribute value.</p>
    *
    * <p>The HandlerBase class provides a default implementation
    * of this interface, which simply ignores the events.</p>
    *
    * @see Parser#setDTDHandler
    * @see HandlerBase#HandlerBase
    */
  
  class SAX_EXPORT DTDHandler
  {
  public:
      /** @name Constructors and Destructor */
      //@{
      /** Default Constructor */
      DTDHandler()
      {
      }
  
      /** Destructor */
      virtual ~DTDHandler()
      {
      }
  
      //@}
  
      /** @name The DTD handler interface */
      //@{
    /**
      * Receive notification of a notation declaration event.
      *
      * <p>It is up to the application to record the notation for later
      * reference, if necessary.</p>
      *
      * <p>If a system identifier is present, and it is a URL, the SAX
      * parser must resolve it fully before passing it to the
      * application.</p>
      *
      * @param name The notation name.
      * @param publicId The notation's public identifier, or null if
      *        none was given.
      * @param systemId The notation's system identifier, or null if
      *        none was given.
      * @exception SAXException Any SAX exception, possibly
      *            wrapping another exception.
      * @see #unparsedEntityDecl
      * @see AttributeList#AttributeList
      */
  	virtual void notationDecl
      (
          const   XMLCh* const    name
          , const XMLCh* const    publicId
          , const XMLCh* const    systemId
      ) = 0;
  
    /**
      * Receive notification of an unparsed entity declaration event.
      *
      * <p>Note that the notation name corresponds to a notation
      * reported by the notationDecl() event.  It is up to the
      * application to record the entity for later reference, if
      * necessary.</p>
      *
      * <p>If the system identifier is a URL, the parser must resolve it
      * fully before passing it to the application.</p>
      *
      * @exception SAXException Any SAX exception, possibly
      *            wrapping another exception.
      * @param name The unparsed entity's name.
      * @param publicId The entity's public identifier, or null if none
      *        was given.
      * @param systemId The entity's system identifier (it must always
      *        have one).
      * @param notationName The name of the associated notation.
      * @see #notationDecl
      * @see AttributeList#AttributeList
      */
      virtual void unparsedEntityDecl
      (
          const   XMLCh* const    name
          , const XMLCh* const    publicId
          , const XMLCh* const    systemId
          , const XMLCh* const    notationName
      ) = 0;
  
      /**
      * Reset the DocType object on its reuse
      *
      * <p>This method helps in reseting the DTD object implementational
      * defaults each time the DTD is begun.</p>
      *
      */
      virtual void resetDocType() = 0;
  
      //@}
  
  private :
      /* Unimplemented constructors and operators */
  
      /* Copy constructor */
      DTDHandler(const DTDHandler&);
  
      /* Assignment operator */
      void operator=(const DTDHandler&);
  
  };
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/sax/DocumentHandler.hpp
  
  Index: DocumentHandler.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: DocumentHandler.hpp,v $
   * Revision 1.1  2002/10/23 08:55:12  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:22:08  peiyongz
   * sane_include
   *
   * Revision 1.6  2000/03/02 19:54:34  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:12:55  abagchi
   * Swat for removing Log from API docs
   *
   * Revision 1.4  2000/02/12 03:31:55  rahulj
   * Removed duplicate CVS Log entries.
   *
   * Revision 1.3  2000/02/12 01:27:19  aruna1
   * Documentation updated
   *
   * Revision 1.2  2000/02/06 07:47:57  rahulj
   * Year 2K copyright swat.
   *
   * Revision 1.1.1.1  1999/11/09 01:07:43  twl
   * Initial checkin
   *
   * Revision 1.2  1999/11/08 20:44:54  rahul
   * Swat for adding in Product name and CVS comment log variable.
   *
   */
  
  
  #ifndef DOCUMENTHANDLER_HPP
  #define DOCUMENTHANDLER_HPP
  
  #include <xercesc/util/XercesDefs.hpp>
  
  class AttributeList;
  class Locator;
  
  /**
    * Receive notification of general document events.
    *
    * <p>This is the main interface that most SAX applications
    * implement: if the application needs to be informed of basic parsing 
    * events, it implements this interface and registers an instance with 
    * the SAX parser using the setDocumentHandler method.  The parser 
    * uses the instance to report basic document-related events like
    * the start and end of elements and character data.</p>
    *
    * <p>The order of events in this interface is very important, and
    * mirrors the order of information in the document itself.  For
    * example, all of an element's content (character data, processing
    * instructions, and/or subelements) will appear, in order, between
    * the startElement event and the corresponding endElement event.</p>
    *
    * <p>Application writers who do not want to implement the entire
    * interface while can derive a class from HandlerBase, which implements
    * the default functionality; parser writers can instantiate
    * HandlerBase to obtain a default handler.  The application can find
    * the location of any document event using the Locator interface
    * supplied by the Parser through the setDocumentLocator method.</p>
    *
    * @see Parser#setDocumentHandler
    * @see Locator#Locator
    * @see HandlerBase#HandlerBase
    */
  
  class SAX_EXPORT DocumentHandler
  {
  public:
      /** @name Constructors and Destructor */
      //@{
      /** Default constructor */
      DocumentHandler()
      {
      }
  
      /** Destructor */
      virtual ~DocumentHandler()
      {
      }
      //@}
  
      /** @name The virtual document handler interface */
      
      //@{
     /**
      * Receive notification of character data.
      *
      * <p>The Parser will call this method to report each chunk of
      * character data.  SAX parsers may return all contiguous character
      * data in a single chunk, or they may split it into several
      * chunks; however, all of the characters in any single event
      * must come from the same external entity, so that the Locator
      * provides useful information.</p>
      *
      * <p>The application must not attempt to read from the array
      * outside of the specified range.</p>
      *
      * <p>Note that some parsers will report whitespace using the
      * ignorableWhitespace() method rather than this one (validating
      * parsers must do so).</p>
      *
      * @param chars The characters from the XML document.
      * @param length The number of characters to read from the array.
      * @exception SAXException Any SAX exception, possibly
      *            wrapping another exception.
      * @see #ignorableWhitespace 
      * @see Locator#Locator
      */
      virtual void characters
      (
          const   XMLCh* const    chars
          , const unsigned int    length
      ) = 0;
  
    /**
      * Receive notification of the end of a document.
      *
      * <p>The SAX parser will invoke this method only once, and it will
      * be the last method invoked during the parse.  The parser shall
      * not invoke this method until it has either abandoned parsing
      * (because of an unrecoverable error) or reached the end of
      * input.</p>
      *
      * @exception SAXException Any SAX exception, possibly
      *            wrapping another exception.
      */
      virtual void endDocument () = 0;
  
    /**
      * Receive notification of the end of an element.
      *
      * <p>The SAX parser will invoke this method at the end of every
      * element in the XML document; there will be a corresponding
      * startElement() event for every endElement() event (even when the
      * element is empty).</p>
      *
      * <p>If the element name has a namespace prefix, the prefix will
      * still be attached to the name.</p>
      *
      * @param name The element type name
      * @exception SAXException Any SAX exception, possibly
      *            wrapping another exception.
      */
      virtual void endElement(const XMLCh* const name) = 0;
  
    /**
      * Receive notification of ignorable whitespace in element content.
      *
      * <p>Validating Parsers must use this method to report each chunk
      * of ignorable whitespace (see the W3C XML 1.0 recommendation,
      * section 2.10): non-validating parsers may also use this method
      * if they are capable of parsing and using content models.</p>
      *
      * <p>SAX parsers may return all contiguous whitespace in a single
      * chunk, or they may split it into several chunks; however, all of
      * the characters in any single event must come from the same
      * external entity, so that the Locator provides useful
      * information.</p>
      *
      * <p>The application must not attempt to read from the array
      * outside of the specified range.</p>
      *
      * @param chars The characters from the XML document.
      * @param length The number of characters to read from the array.
      * @exception SAXException Any SAX exception, possibly
      *            wrapping another exception.
      * @see #characters
      */
      virtual void ignorableWhitespace
      (
          const   XMLCh* const    chars
          , const unsigned int    length
      ) = 0;
  
    /**
      * Receive notification of a processing instruction.
      *
      * <p>The Parser will invoke this method once for each processing
      * instruction found: note that processing instructions may occur
      * before or after the main document element.</p>
      *
      * <p>A SAX parser should never report an XML declaration (XML 1.0,
      * section 2.8) or a text declaration (XML 1.0, section 4.3.1)
      * using this method.</p>
      *
      * @param target The processing instruction target.
      * @param data The processing instruction data, or null if
      *        none was supplied.
      * @exception SAXException Any SAX exception, possibly
      *            wrapping another exception.
      */
      virtual void processingInstruction
      (
          const   XMLCh* const    target
          , const XMLCh* const    data
      ) = 0;
  
      /**
      * Reset the Docuemnt object on its reuse
      *
      * <p>This method helps in reseting the document implementational
      * defaults each time the document is begun.</p>
      *
      */
      virtual void resetDocument() = 0;
  
    /**
      * Receive an object for locating the origin of SAX document events.
      *
      * SAX parsers are strongly encouraged (though not absolutely
      * required) to supply a locator: if it does so, it must supply
      * the locator to the application by invoking this method before
      * invoking any of the other methods in the DocumentHandler
      * interface.
      *
      * The locator allows the application to determine the end
      * position of any document-related event, even if the parser is
      * not reporting an error.  Typically, the application will
      * use this information for reporting its own errors (such as
      * character content that does not match an application's
      * business rules). The information returned by the locator
      * is probably not sufficient for use with a search engine.
      *
      * Note that the locator will return correct information only
      * during the invocation of the events in this interface. The
      * application should not attempt to use it at any other time.
      *
      * @param locator An object that can return the location of
      *                any SAX document event. The object is only
      *                'on loan' to the client code and they are not
      *                to attempt to delete or modify it in any way!
      *
      * @see Locator#Locator
      */
      virtual void setDocumentLocator(const Locator* const locator) = 0;
  
    /**
      * Receive notification of the beginning of a document.
      *
      * <p>The SAX parser will invoke this method only once, before any
      * other methods in this interface or in DTDHandler (except for
      * setDocumentLocator).</p>
      *
      * @exception SAXException Any SAX exception, possibly
      *            wrapping another exception.
      */
      virtual void startDocument() = 0;
  
    /**
      * Receive notification of the beginning of an element.
      *
      * <p>The Parser will invoke this method at the beginning of every
      * element in the XML document; there will be a corresponding
      * endElement() event for every startElement() event (even when the
      * element is empty). All of the element's content will be
      * reported, in order, before the corresponding endElement()
      * event.</p>
      *
      * <p>If the element name has a namespace prefix, the prefix will
      * still be attached.  Note that the attribute list provided will
      * contain only attributes with explicit values (specified or
      * defaulted): #IMPLIED attributes will be omitted.</p>
      *
      * @param name The element type name.
      * @param attrs The attributes attached to the element, if any.
      * @exception SAXException Any SAX exception, possibly
      *            wrapping another exception.
      * @see #endElement
      * @see AttributeList#AttributeList 
      */
      virtual void startElement
      (
          const   XMLCh* const    name
          ,       AttributeList&  attrs
      ) = 0;
  
      //@}
  
  private :
      /* Unimplemented Constructors and operators */
      /* Copy constructor */
      DocumentHandler(const DocumentHandler&);
      /** Assignment operator */
      void operator=(const DocumentHandler&);
  };
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/sax/EntityResolver.hpp
  
  Index: EntityResolver.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: EntityResolver.hpp,v $
   * Revision 1.1  2002/10/23 08:55:12  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:22:08  peiyongz
   * sane_include
   *
   * Revision 1.6  2000/03/02 19:54:34  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:12:55  abagchi
   * Swat for removing Log from API docs
   *
   * Revision 1.4  2000/02/12 03:31:55  rahulj
   * Removed duplicate CVS Log entries.
   *
   * Revision 1.3  2000/02/12 01:27:19  aruna1
   * Documentation updated
   *
   * Revision 1.2  2000/02/06 07:47:57  rahulj
   * Year 2K copyright swat.
   *
   * Revision 1.1.1.1  1999/11/09 01:07:44  twl
   * Initial checkin
   *
   * Revision 1.3  1999/11/08 20:44:56  rahul
   * Swat for adding in Product name and CVS comment log variable.
   *
   */
  
  
  #ifndef ENTITYRESOLVER_HPP
  #define ENTITYRESOLVER_HPP
  
  #include <xercesc/util/XercesDefs.hpp>
  
  class InputSource;
  
  /**
    * Basic interface for resolving entities.
    *
    * <p>If a SAX application needs to implement customized handling
    * for external entities, it must implement this interface and
    * register an instance with the SAX parser using the parser's
    * setEntityResolver method.</p>
    *
    * <p>The parser will then allow the application to intercept any
    * external entities (including the external DTD subset and external
    * parameter entities, if any) before including them.</p>
    *
    * <p>Many SAX applications will not need to implement this interface,
    * but it will be especially useful for applications that build
    * XML documents from databases or other specialised input sources,
    * or for applications that use URI types other than URLs.</p>
    *
    * <p>The following resolver would provide the application
    * with a special character stream for the entity with the system
    * identifier "http://www.myhost.com/today":</p>
    *
    *<pre>
    *#include <xercesc/sax/EntityResolver.hpp>
    *#include <xercesc/sax/InputSource.hpp>
    *
    *class MyResolver : public EntityResolver {
    *  public:
    *    InputSource resolveEntity (const XMLCh* const publicId, 
    *                               const XMLCh* const systemId);
    *   ...
    *   };
    *
    *  MyResolver::resolveEntity {
    *    if (XMLString::compareString(systemId, "http://www.myhost.com/today")) {
    *      MyReader* reader = new MyReader();
    *      return new InputSource(reader);
    *    } else {
    *      return null;
    *    }
    *  }
    *
    *</pre>
    *
    * <p>The application can also use this interface to redirect system
    * identifiers to local URIs or to look up replacements in a catalog
    * (possibly by using the public identifier).</p>
    *
    * <p>The HandlerBase class implements the default behaviour for
    * this interface, which is simply always to return null (to request
    * that the parser use the default system identifier).</p>
    *
    * @see Parser#setEntityResolver
    * @see InputSource#InputSource
    * @see HandlerBase#HandlerBase 
    */
  class SAX_EXPORT EntityResolver
  {
  public:
      /** @name Constructors and Destructor */
      //@{
  
      /** Default Constructor */
      EntityResolver()
      {
      }
  
      /** Destructor */
      virtual ~EntityResolver()
      {
      }
  
      //@}
  
      /** @name The EntityResolver interface */
      //@{
  
    /**
      * Allow the application to resolve external entities.
      *
      * <p>The Parser will call this method before opening any external
      * entity except the top-level document entity (including the
      * external DTD subset, external entities referenced within the
      * DTD, and external entities referenced within the document
      * element): the application may request that the parser resolve
      * the entity itself, that it use an alternative URI, or that it
      * use an entirely different input source.</p>
      *
      * <p>Application writers can use this method to redirect external
      * system identifiers to secure and/or local URIs, to look up
      * public identifiers in a catalogue, or to read an entity from a
      * database or other input source (including, for example, a dialog
      * box).</p>
      *
      * <p>If the system identifier is a URL, the SAX parser must
      * resolve it fully before reporting it to the application.</p>
      *
      * @param publicId The public identifier of the external entity
      *        being referenced, or null if none was supplied.
      * @param systemId The system identifier of the external entity
      *        being referenced.
      * @return An InputSource object describing the new input source,
      *         or null to request that the parser open a regular
      *         URI connection to the system identifier.
      * @exception SAXException Any SAX exception, possibly
      *            wrapping another exception.
      * @exception IOException An IO exception,
      *            possibly the result of creating a new InputStream
      *            or Reader for the InputSource.
      * @see InputSource#InputSource
      */
      virtual InputSource* resolveEntity
      (
          const   XMLCh* const    publicId
          , const XMLCh* const    systemId
      ) = 0;
  
      //@}
  
  private :
      /* Unimplemented constructors and operators */
  
      
      /* Copy constructor */
      EntityResolver(const EntityResolver&);
  
      /* Assignment operator */
      void operator=(const EntityResolver&);
  
  };
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/sax/ErrorHandler.hpp
  
  Index: ErrorHandler.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: ErrorHandler.hpp,v $
   * Revision 1.1  2002/10/23 08:55:12  lilantha
   * update with new XML parser lib
   *
   * Revision 1.1.1.1  2002/02/01 22:22:08  peiyongz
   * sane_include
   *
   * Revision 1.6  2000/04/27 19:33:15  rahulj
   * Included <util/XercesDefs.hpp> as suggested by David N Bertoni.
   *
   * Revision 1.5  2000/02/24 20:12:55  abagchi
   * Swat for removing Log from API docs
   *
   * Revision 1.4  2000/02/12 03:31:55  rahulj
   * Removed duplicate CVS Log entries.
   *
   * Revision 1.3  2000/02/12 01:27:19  aruna1
   * Documentation updated
   *
   * Revision 1.2  2000/02/06 07:47:57  rahulj
   * Year 2K copyright swat.
   *
   * Revision 1.1.1.1  1999/11/09 01:07:45  twl
   * Initial checkin
   *
   * Revision 1.2  1999/11/08 20:45:00  rahul
   * Swat for adding in Product name and CVS comment log variable.
   *
   */
  
  
  #ifndef ERRORHANDLER_HPP
  #define ERRORHANDLER_HPP
  
  #include <xercesc/util/XercesDefs.hpp>
  
  class SAXParseException;
  
  
  /**
    * Basic interface for SAX error handlers.
    *
    * <p>If a SAX application needs to implement customized error
    * handling, it must implement this interface and then register an
    * instance with the SAX parser using the parser's setErrorHandler
    * method.  The parser will then report all errors and warnings
    * through this interface.</p>
    *
    * <p> The parser shall use this interface instead of throwing an
    * exception: it is up to the application whether to throw an
    * exception for different types of errors and warnings.  Note,
    * however, that there is no requirement that the parser continue to
    * provide useful information after a call to fatalError (in other
    * words, a SAX driver class could catch an exception and report a
    * fatalError).</p>
    *
    * <p>The HandlerBase class provides a default implementation of this
    * interface, ignoring warnings and recoverable errors and throwing a
    * SAXParseException for fatal errors.  An application may extend
    * that class rather than implementing the complete interface
    * itself.</p>
    *
    * @see Parser#setErrorHandler
    * @see SAXParseException#SAXParseException 
    * @see HandlerBase#HandlerBase
    */
  
  class SAX_EXPORT ErrorHandler
  {
  public:
      /** @name Constructors and Destructor */
      //@{
      /** Default constructor */
      ErrorHandler()
      {
      }
  
      /** Desctructor */
      virtual ~ErrorHandler()
      {
      }
      //@}
  
      /** @name The error handler interface */
      //@{
     /**
      * Receive notification of a warning.
      *
      * <p>SAX parsers will use this method to report conditions that
      * are not errors or fatal errors as defined by the XML 1.0
      * recommendation.  The default behaviour is to take no action.</p>
      *
      * <p>The SAX parser must continue to provide normal parsing events
      * after invoking this method: it should still be possible for the
      * application to process the document through to the end.</p>
      *
      * @param exception The warning information encapsulated in a
      *                  SAX parse exception.
      * @exception SAXException Any SAX exception, possibly
      *            wrapping another exception.
      * @see SAXParseException#SAXParseException 
      */
      virtual void warning(const SAXParseException& exception) = 0;
  
    /**
      * Receive notification of a recoverable error.
      *
      * <p>This corresponds to the definition of "error" in section 1.2
      * of the W3C XML 1.0 Recommendation.  For example, a validating
      * parser would use this callback to report the violation of a
      * validity constraint.  The default behaviour is to take no
      * action.</p>
      *
      * <p>The SAX parser must continue to provide normal parsing events
      * after invoking this method: it should still be possible for the
      * application to process the document through to the end.  If the
      * application cannot do so, then the parser should report a fatal
      * error even if the XML 1.0 recommendation does not require it to
      * do so.</p>
      *
      * @param exception The error information encapsulated in a
      *                  SAX parse exception.
      * @exception SAXException Any SAX exception, possibly
      *            wrapping another exception.
      * @see SAXParseException#SAXParseException 
      */
      virtual void error(const SAXParseException& exception) = 0;
  
    /**
      * Receive notification of a non-recoverable error.
      *
      * <p>This corresponds to the definition of "fatal error" in
      * section 1.2 of the W3C XML 1.0 Recommendation.  For example, a
      * parser would use this callback to report the violation of a
      * well-formedness constraint.</p>
      *
      * <p>The application must assume that the document is unusable
      * after the parser has invoked this method, and should continue
      * (if at all) only for the sake of collecting addition error
      * messages: in fact, SAX parsers are free to stop reporting any
      * other events once this method has been invoked.</p>
      *
      * @param exception The error information encapsulated in a
      *                  SAX parse exception.  
      * @exception SAXException Any SAX exception, possibly
      *            wrapping another exception.
      * @see SAXParseException#SAXParseException
      */
      virtual void fatalError(const SAXParseException& exception) = 0;
      
      /**
      * Reset the Error handler object on its reuse
      *
      * <p>This method helps in reseting the Error handler object
      * implementational defaults each time the Error handler is begun.</p>
      *
      */
      virtual void resetErrors() = 0;
  
  
      //@}
  
  private :
      /* Unimplemented constructors and operators */
      
      /* Copy constructor */
      ErrorHandler(const ErrorHandler&);
  
      /* Assignment operator */
      void operator=(const ErrorHandler&);
      
  };
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/sax/HandlerBase.hpp
  
  Index: HandlerBase.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: HandlerBase.hpp,v $
   * Revision 1.1  2002/10/23 08:55:12  lilantha
   * update with new XML parser lib
   *
   * Revision 1.2  2002/02/20 18:17:01  tng
   * [Bug 5977] Warnings on generating apiDocs.
   *
   * Revision 1.1.1.1  2002/02/01 22:22:08  peiyongz
   * sane_include
   *
   * Revision 1.6  2000/03/02 19:54:35  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:12:55  abagchi
   * Swat for removing Log from API docs
   *
   * Revision 1.4  2000/02/12 03:31:55  rahulj
   * Removed duplicate CVS Log entries.
   *
   * Revision 1.3  2000/02/12 01:27:19  aruna1
   * Documentation updated
   *
   * Revision 1.2  2000/02/06 07:47:57  rahulj
   * Year 2K copyright swat.
   *
   * Revision 1.1.1.1  1999/11/09 01:07:45  twl
   * Initial checkin
   *
   * Revision 1.2  1999/11/08 20:45:00  rahul
   * Swat for adding in Product name and CVS comment log variable.
   *
   */
  
  
  #ifndef HANDLERBASE_HPP
  #define HANDLERBASE_HPP
  
  #include <xercesc/sax/DocumentHandler.hpp>
  #include <xercesc/sax/DTDHandler.hpp>
  #include <xercesc/sax/EntityResolver.hpp>
  #include <xercesc/sax/ErrorHandler.hpp>
  #include <xercesc/sax/SAXParseException.hpp>
  
  class Locator;
  class AttributeList;
  
  /**
    * Default base class for handlers.
    *
    * <p>This class implements the default behaviour for four SAX
    * interfaces: EntityResolver, DTDHandler, DocumentHandler,
    * and ErrorHandler.</p>
    *
    * <p>Application writers can extend this class when they need to
    * implement only part of an interface; parser writers can
    * instantiate this class to provide default handlers when the
    * application has not supplied its own.</p>
    *
    * <p>Note that the use of this class is optional.</p>
    *
    * @see EntityResolver#EntityResolver
    * @see DTDHandler#DTDHandler
    * @see DocumentHandler#DocumentHandler
    * @see ErrorHandler#ErrorHandler
    */
  
  class SAX_EXPORT HandlerBase :
  
      public EntityResolver, public DTDHandler, public DocumentHandler
      , public ErrorHandler
  {
  public:
      /** @name Default handlers for the DocumentHandler interface */
      //@{
    /**
      * Receive notification of character data inside an element.
      *
      * <p>By default, do nothing.  Application writers may override this
      * method to take specific actions for each chunk of character data
      * (such as adding the data to a node or buffer, or printing it to
      * a file).</p>
      *
      * @param chars The characters.
      * @param length The number of characters to use from the
      *               character array.
      * @exception SAXException Any SAX exception, possibly
      *            wrapping another exception.
      * @see DocumentHandler#characters
      */
      virtual void characters
      (
          const   XMLCh* const    chars
          , const unsigned int    length
      );
  
    /**
      * Receive notification of the end of the document.
      *
      * <p>By default, do nothing.  Application writers may override this
      * method in a subclass to take specific actions at the beginning
      * of a document (such as finalising a tree or closing an output
      * file).</p>
      *
      * @exception SAXException Any SAX exception, possibly
      *            wrapping another exception.
      * @see DocumentHandler#endDocument
      */
      virtual void endDocument();
  
    /**
      * Receive notification of the end of an element.
      *
      * <p>By default, do nothing.  Application writers may override this
      * method in a subclass to take specific actions at the end of
      * each element (such as finalising a tree node or writing
      * output to a file).</p>
      *
      * @param name The element type name.
      * @exception SAXException Any SAX exception, possibly
      *            wrapping another exception.
      * @see DocumentHandler#endElement
      */
      virtual void endElement(const XMLCh* const name);
  
    /**
      * Receive notification of ignorable whitespace in element content.
      *
      * <p>By default, do nothing.  Application writers may override this
      * method to take specific actions for each chunk of ignorable
      * whitespace (such as adding data to a node or buffer, or printing
      * it to a file).</p>
      *
      * @param chars The whitespace characters.
      * @param length The number of characters to use from the
      *               character array.
      * @exception SAXException Any SAX exception, possibly
      *            wrapping another exception.
      * @see DocumentHandler#ignorableWhitespace
      */
      virtual void ignorableWhitespace
      (
          const   XMLCh* const    chars
          , const unsigned int    length
      );
  
    /**
      * Receive notification of a processing instruction.
      *
      * <p>By default, do nothing.  Application writers may override this
      * method in a subclass to take specific actions for each
      * processing instruction, such as setting status variables or
      * invoking other methods.</p>
      *
      * @param target The processing instruction target.
      * @param data The processing instruction data, or null if
      *             none is supplied.
      * @exception SAXException Any SAX exception, possibly
      *            wrapping another exception.
      * @see DocumentHandler#processingInstruction
      */
      virtual void processingInstruction
      (
          const   XMLCh* const    target
          , const XMLCh* const    data
      );
  
      /**
      * Reset the Docuemnt object on its reuse
      *
      * @see DocumentHandler#resetDocument
      */
      virtual void resetDocument();
      //@}
  
      /** @name Default implementation of DocumentHandler interface */
  
      //@{
    /**
      * Receive a Locator object for document events.
      *
      * <p>By default, do nothing.  Application writers may override this
      * method in a subclass if they wish to store the locator for use
      * with other document events.</p>
      *
      * @param locator A locator for all SAX document events.
      * @see DocumentHandler#setDocumentLocator
      * @see Locator
      */
      virtual void setDocumentLocator(const Locator* const locator);
  
    /**
      * Receive notification of the beginning of the document.
      *
      * <p>By default, do nothing.  Application writers may override this
      * method in a subclass to take specific actions at the beginning
      * of a document (such as allocating the root node of a tree or
      * creating an output file).</p>
      *
      * @exception SAXException Any SAX exception, possibly
      *            wrapping another exception.
      * @see DocumentHandler#startDocument
      */
      virtual void startDocument();
  
    /**
      * Receive notification of the start of an element.
      *
      * <p>By default, do nothing.  Application writers may override this
      * method in a subclass to take specific actions at the start of
      * each element (such as allocating a new tree node or writing
      * output to a file).</p>
      *
      * @param name The element type name.
      * @param attributes The specified or defaulted attributes.
      * @exception SAXException Any SAX exception, possibly
      *            wrapping another exception.
      * @see DocumentHandler#startElement
      */
      virtual void startElement
      (
          const   XMLCh* const    name
          ,       AttributeList&  attributes
      );
  
      //@}
  
      /** @name Default implementation of the EntityResolver interface. */
  
      //@{
    /**
      * Resolve an external entity.
      *
      * <p>Always return null, so that the parser will use the system
      * identifier provided in the XML document.  This method implements
      * the SAX default behaviour: application writers can override it
      * in a subclass to do special translations such as catalog lookups
      * or URI redirection.</p>
      *
      * @param publicId The public identifer, or null if none is
      *                 available.
      * @param systemId The system identifier provided in the XML
      *                 document.
      * @return The new input source, or null to require the
      *         default behaviour.
      * @exception SAXException Any SAX exception, possibly
      *            wrapping another exception.
      * @see EntityResolver#resolveEntity
      */
      virtual InputSource* resolveEntity
      (
          const   XMLCh* const    publicId
          , const XMLCh* const    systemId
      );
  
      //@}
  
      /** @name Default implementation of the ErrorHandler interface */
      //@{
     /**
      * Receive notification of a recoverable parser error.
      *
      * <p>The default implementation does nothing.  Application writers
      * may override this method in a subclass to take specific actions
      * for each error, such as inserting the message in a log file or
      * printing it to the console.</p>
      *
      * @param exception The warning information encoded as an exception.
      * @exception SAXException Any SAX exception, possibly
      *            wrapping another exception.
      * @see ErrorHandler#warning
      * @see SAXParseException#SAXParseException
      */
      virtual void error(const SAXParseException& exception);
  
    /**
      * Report a fatal XML parsing error.
      *
      * <p>The default implementation throws a SAXParseException.
      * Application writers may override this method in a subclass if
      * they need to take specific actions for each fatal error (such as
      * collecting all of the errors into a single report): in any case,
      * the application must stop all regular processing when this
      * method is invoked, since the document is no longer reliable, and
      * the parser may no longer report parsing events.</p>
      *
      * @param exception The error information encoded as an exception.
      * @exception SAXException Any SAX exception, possibly
      *            wrapping another exception.
      * @see ErrorHandler#fatalError
      * @see SAXParseException#SAXParseException
      */
      virtual void fatalError(const SAXParseException& exception);
  
    /**
      * Receive notification of a parser warning.
      *
      * <p>The default implementation does nothing.  Application writers
      * may override this method in a subclass to take specific actions
      * for each warning, such as inserting the message in a log file or
      * printing it to the console.</p>
      *
      * @param exception The warning information encoded as an exception.
      * @exception SAXException Any SAX exception, possibly
      *            wrapping another exception.
      * @see ErrorHandler#warning
      * @see SAXParseException#SAXParseException
      */
      virtual void warning(const SAXParseException& exception);
  
      /**
      * Reset the Error handler object on its reuse
      *
      * @see ErrorHandler#resetErrors
      */
      virtual void resetErrors();
  
      //@}
  
  
      /** @name Default implementation of DTDHandler interface. */
      //@{
  
    /**
      * Receive notification of a notation declaration.
      *
      * <p>By default, do nothing.  Application writers may override this
      * method in a subclass if they wish to keep track of the notations
      * declared in a document.</p>
      *
      * @param name The notation name.
      * @param publicId The notation public identifier, or null if not
      *                 available.
      * @param systemId The notation system identifier.
      * @see DTDHandler#notationDecl
      */
      virtual void notationDecl
      (
          const   XMLCh* const    name
          , const XMLCh* const    publicId
          , const XMLCh* const    systemId
      );
  
      /**
      * Reset the DTD object on its reuse
      *
      * @see DTDHandler#resetDocType
      */
      virtual void resetDocType();
  
    /**
      * Receive notification of an unparsed entity declaration.
      *
      * <p>By default, do nothing.  Application writers may override this
      * method in a subclass to keep track of the unparsed entities
      * declared in a document.</p>
      *
      * @param name The entity name.
      * @param publicId The entity public identifier, or null if not
      *                 available.
      * @param systemId The entity system identifier.
      * @param notationName The name of the associated notation.
      * @see DTDHandler#unparsedEntityDecl
      */
      virtual void unparsedEntityDecl
      (
          const   XMLCh* const    name
          , const XMLCh* const    publicId
          , const XMLCh* const    systemId
          , const XMLCh* const    notationName
      );
      //@}
  };
  
  
  // ---------------------------------------------------------------------------
  //  HandlerBase: Inline default implementations
  // ---------------------------------------------------------------------------
  inline void HandlerBase::characters(const   XMLCh* const    chars
                                      , const unsigned int    length)
  {
  }
  
  inline void HandlerBase::endDocument()
  {
  }
  
  inline void HandlerBase::endElement(const XMLCh* const name)
  {
  }
  
  inline void HandlerBase::error(const SAXParseException& exception)
  {
  }
  
  inline void HandlerBase::fatalError(const SAXParseException& exception)
  {
      throw exception;
  }
  
  inline void
  HandlerBase::ignorableWhitespace(   const   XMLCh* const chars
                                      , const unsigned int length)
  {
  }
  
  inline void HandlerBase::notationDecl(  const   XMLCh* const name
                                          , const XMLCh* const publicId
                                          , const XMLCh* const systemId)
  {
  }
  
  inline void
  HandlerBase::processingInstruction( const   XMLCh* const target
                                      , const XMLCh* const data)
  {
  }
  
  inline void HandlerBase::resetErrors()
  {
  }
  
  inline void HandlerBase::resetDocument()
  {
  }
  
  inline void HandlerBase::resetDocType()
  {
  }
  
  inline InputSource*
  HandlerBase::resolveEntity( const   XMLCh* const publicId
                              , const XMLCh* const systemId)
  {
      return 0;
  }
  
  inline void
  HandlerBase::unparsedEntityDecl(const   XMLCh* const name
                                  , const XMLCh* const publicId
                                  , const XMLCh* const systemId
                                  , const XMLCh* const notationName)
  {
  }
  
  inline void HandlerBase::setDocumentLocator(const Locator* const locator)
  {
  }
  
  inline void HandlerBase::startDocument()
  {
  }
  
  inline void
  HandlerBase::startElement(  const   XMLCh* const    name
                              ,       AttributeList&  attributes)
  {
  }
  
  inline void HandlerBase::warning(const SAXParseException& exception)
  {
  }
  
  #endif
  
  
  
  1.1                  xml-axis/contrib/Axis-C++/xerces-c/include/xercesc/sax/InputSource.hpp
  
  Index: InputSource.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: InputSource.hpp,v $
   * Revision 1.1  2002/10/23 08:55:12  lilantha
   * update with new XML parser lib
   *
   * Revision 1.2  2002/02/20 18:17:01  tng
   * [Bug 5977] Warnings on generating apiDocs.
   *
   * Revision 1.1.1.1  2002/02/01 22:22:08  peiyongz
   * sane_include
   *
   * Revision 1.10  2001/11/21 16:14:32  tng
   * Schema: New method InputSource::get/setIssueFatalErrorIfNotFound to tell the parser whether to issue fatal error or not if cannot find it (the InputSource).  This is required for schema processing as it shouldn't be a fatal error if the schema is not found.
   *
   * Revision 1.9  2000/03/02 19:54:35  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.8  2000/02/24 20:12:55  abagchi
   * Swat for removing Log from API docs
   *
   * Revision 1.7  2000/02/12 03:42:21  rahulj
   * Fixed DOC++ documentation formatting errors.
   *
   * Revision 1.6  2000/02/12 03:31:55  rahulj
   * Removed duplicate CVS Log entries.
   *
   * Revision 1.5  2000/02/12 01:27:19  aruna1
   * Documentation updated
   *
   * Revision 1.4  2000/02/09 02:15:28  abagchi
   * Documented destructor
   *
   * Revision 1.3  2000/02/06 07:47:58  rahulj
   * Year 2K copyright swat.
   *
   * Revision 1.2  2000/01/12 00:15:39  roddey
   * Changes to deal with multiply nested, relative pathed, entities and to deal
   * with the new URL class changes.
   *
   * Revision 1.1.1.1  1999/11/09 01:07:46  twl
   * Initial checkin
   *
   * Revision 1.2  1999/11/08 20:45:01  rahul
   * Swat for adding in Product name and CVS comment log variable.
   *
   */
  
  
  #ifndef INPUTSOURCE_HPP
  #define INPUTSOURCE_HPP
  
  #include <xercesc/util/XercesDefs.hpp>
  
  class BinInputStream;
  
  
  /**
    * A single input source for an XML entity.
    *
    * <p>This class encapsulates information about an input source in a
    * single object, which may include a public identifier or a system
    * identifier</p>
    *
    * <p>There are two places that the application will deliver this input
    * source to the parser: as the argument to the Parser::parse method, or as
    * the return value of the EntityResolver::resolveEntity method.</p>
    *
    * <p>InputSource is never used directly, but is the base class for a number
    * of derived classes for particular types of input sources. Derivatives are
    * provided (in the internal/ directory) for URL input sources, memory buffer
    * input sources, and so on.</p>
    *
    * <p>When it is time to parse the input described by an input source, it
    * will be asked to create a binary stream for that source. That stream will
    * be used to input the data of the source. The derived class provides the
    * implementation of the makeStream() method, and provides a type of stream
    * of the correct type for the input source it represents.
    *
    * <p>An InputSource object belongs to the application: the parser never
    * modifies them in any way. They are always passed by const reference so
    * the parser will make a copy of any input sources that it must keep
    * around beyond the call.</p>
    *
    * @see Parser#parse
    * @see EntityResolver#resolveEntity
    */
  class SAX_EXPORT InputSource
  {
  public:
      // -----------------------------------------------------------------------
      //  All constructors are hidden, just the destructor is available
      // -----------------------------------------------------------------------
      /** @name Destructor */
      //@{
    /**
      * Destructor
      *
      */
      virtual ~InputSource();
      //@}
  
  
      // -----------------------------------------------------------------------
      /** @name Virtual input source interface */
      //@{
    /**
      * Makes the byte stream for this input source.
      *
      * <p>The derived class must create and return a binary input stream of an
      * appropriate type for its kind of data source. The returned stream must
      * be dynamically allocated and becomes the parser's property.
      * </p>
      *
      * @see BinInputStream
      */
      virtual BinInputStream* makeStream() const = 0;
  
      //@}
  
  
      // -----------------------------------------------------------------------
      /** @name Getter methods */
      //@{
    /**
      * An input source can be set to force the parser to assume a particular
      * encoding for the data that input source reprsents, via the setEncoding()
      * method. This method returns name of the encoding that is to be forced.
      * If the encoding has never been forced, it returns a null pointer.
      *
      * @return The forced encoding, or null if none was supplied.
      * @see #setEncoding
      */
      const XMLCh* getEncoding() const;
  
  
    /**
      * Get the public identifier for this input source.
      *
      * @return The public identifier, or null if none was supplied.
      * @see #setPublicId
      */
      const XMLCh* getPublicId() const;
  
  
    /**
      * Get the system identifier for this input source.
      *
      * <p>If the system ID is a URL, it will be fully resolved.</p>
      *
      * @return The system identifier.
      * @see #setSystemId
      */
      const XMLCh* getSystemId() const;
  
    /**
      * Get the flag that indicates if the parser should issue fatal error if this input source
      * is not found.
      *
      * @return True if the parser should issue fatal error if this input source is not found.
      *         False if the parser issue warning message instead.
      * @see #setIssueFatalErrorIfNotFound
      */
      const bool getIssueFatalErrorIfNotFound() const;
  
      //@}
  
  
      // -----------------------------------------------------------------------
      /** @name Setter methods */
      //@{
  
    /**
      * Set the encoding which will be required for use with the XML text read
      * via a stream opened by this input source.
      *
      * <p>This is usually not set, allowing the encoding to be sensed in the
      * usual XML way. However, in some cases, the encoding in the file is known
      * to be incorrect because of intermediate transcoding, for instance
      * encapsulation within a MIME document.
      *
      * @param encodingStr The name of the encoding to force.
      */
      void setEncoding(const XMLCh* const encodingStr);
  
  
    /**
      * Set the public identifier for this input source.
      *
      * <p>The public identifier is always optional: if the application writer
      * includes one, it will be provided as part of the location information.</p>
      *
      * @param publicId The public identifier as a string.
      * @see Locator#getPublicId
      * @see SAXParseException#getPublicId
      * @see #getPublicId
      */
      void setPublicId(const XMLCh* const publicId);
  
    /**
      * Set the system identifier for this input source.
      *
      * <p>Set the system identifier for this input source.
      *
      * </p>The system id is always required. The public id may be used to map
      * to another system id, but the system id must always be present as a fall
      * back.
      *
      * <p>If the system ID is a URL, it must be fully resolved.</p>
      *
      * @param systemId The system identifier as a string.
      * @see #getSystemId
      * @see Locator#getSystemId
      * @see SAXParseException#getSystemId
      */
      void setSystemId(const XMLCh* const systemId);
  
    /**
      * Indicates if the parser should issue fatal error if this input source
      * is not found.  If set to false, the parser issue warning message instead.
      *
      * @param  flag True if the parser should issue fatal error if this input source is not found.
      *               If set to false, the parser issue warning message instead.  (Default: true)
      *
      * @see #getIssueFatalErrorIfNotFound
      */
      void setIssueFatalErrorIfNotFound(const bool flag);
  
      //@}
  
  
  protected :
      // -----------------------------------------------------------------------
      //  Hidden constructors
      // -----------------------------------------------------------------------
      /** @name Constructors and Destructor */
      //@{
      /** Default constructor */
      InputSource();
  
      /** Constructor with a system identifier as XMLCh type.
        * @param systemId The system identifier (URI).
        */
      InputSource(const XMLCh* const systemId);
  
      /** Constructor with a system and public identifiers
        * @param systemId The system identifier (URI).
        * @param publicId The public identifier as in the entity definition.
        */
      InputSource
      (
          const   XMLCh* const    systemId
          , const XMLCh* const    publicId
      );
  
      /** Constructor witha system identifier as string
        * @param systemId The system identifier (URI).
        */
      InputSource(const char* const systemId);
  
      /** Constructor witha system and public identifiers. Both as string
        * @param systemId The system identifier (URI).
        * @param publicId The public identifier as in the entity definition.
        */
      InputSource
      (
          const   char* const systemId
          , const char* const publicId
      );
  
      //@}
  
  
  
  
  
  private:
      // -----------------------------------------------------------------------
      //  Unimplemented constructors and operators
      // -----------------------------------------------------------------------
      InputSource(const InputSource&);
      void operator=(const InputSource&);
  
  
      // -----------------------------------------------------------------------
      //  Private data members
      //
      //  fEncoding
      //      This is the encoding to use. Usually this is null, which means
      //      to use the information found in the file itself. But, if set,
      //      this encoding will be used without question.
      //
      //  fPublicId
      //      This is the optional public id for the input source. It can be
      //      null if none is desired.
      //
      //  fSystemId
      //      This is the system id for the input source. This is what is
      //      actually used to open the source.
      //
      //  fFatalErrorIfNotFound
      // -----------------------------------------------------------------------
      XMLCh*  fEncoding;
      XMLCh*  fPublicId;
      XMLCh*  fSystemId;
      bool    fFatalErrorIfNotFound;
  };
  
  
  // ---------------------------------------------------------------------------
  //  InputSource: Getter methods
  // ---------------------------------------------------------------------------
  inline const XMLCh* InputSource::getEncoding() const
  {
      return fEncoding;
  }
  
  inline const XMLCh* InputSource::getPublicId() const
  {
      return fPublicId;
  }
  
  inline const XMLCh* InputSource::getSystemId() const
  {
      return fSystemId;
  }
  
  inline const bool InputSource::getIssueFatalErrorIfNotFound() const
  {
      return fFatalErrorIfNotFound;
  }
  
  // --------------------------------------------------------------