dbertoni    01/06/29 11:41:48

  Modified:    c/src/PlatformSupport FormatterListener.hpp
  Added:       c/src/PlatformSupport PrefixResolver.cpp PrefixResolver.hpp
  Log:
  Added PrefixResolver to FormatterListener.
  
  Revision  Changes    Path
  1.2       +32 -2     xml-xalan/c/src/PlatformSupport/FormatterListener.hpp
  
  Index: FormatterListener.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/PlatformSupport/FormatterListener.hpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FormatterListener.hpp     2001/05/02 15:40:21     1.1
  +++ FormatterListener.hpp     2001/06/29 18:41:45     1.2
  @@ -58,7 +58,7 @@
   #define FORMATTERLISTENER_HEADER_GUARD_1357924680
   
   /**
  - * $Id: FormatterListener.hpp,v 1.1 2001/05/02 15:40:21 dbertoni Exp $
  + * $Id: FormatterListener.hpp,v 1.2 2001/06/29 18:41:45 dbertoni Exp $
    * 
    * $State: Exp $
    * 
  @@ -80,6 +80,10 @@
   
   
   
  +class PrefixResolver;
  +
  +
  +
   /**
    * A SAX-based formatter interface for the XSL processor.  This interface 
    * will be called as result tree elements are constructed.
  @@ -124,6 +128,28 @@
        }
   
        /**
  +      * Get the PrefixResolver for the FormatterListener
  +      *
  +      * @return A pointer to the PrefixResolver, if any.
  +      */
  +     const PrefixResolver*
  +     getPrefixResolver() const
  +     {
  +             return m_prefixResolver;
  +     }
  +
  +     /**
  +      * Set the PrefixResolver for the FormatterListener
  +      *
  +      * @param thePrefixResolver A pointer to the PrefixResolver, if any.
  +      */
  +     void
  +     setPrefixResolver(const PrefixResolver*         thePrefixResolver)
  +     {
  +             m_prefixResolver = thePrefixResolver;
  +     }
  +
  +     /**
         * Receive notification of character data. If available, when the
         * disable-output-escaping attribute is used, output raw text without
         * escaping.
  @@ -226,9 +252,13 @@
   
        static const XalanDOMString&    s_formatterListenerString;
   
  +protected:
  +
  +     const PrefixResolver*   m_prefixResolver;
  +
   private:
   
  -     const eFormat   m_outputFormat;
  +     const eFormat                   m_outputFormat;
   };
   
   
  
  
  
  1.1                  xml-xalan/c/src/PlatformSupport/PrefixResolver.cpp
  
  Index: PrefixResolver.cpp
  ===================================================================
  /*
   * 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 "Xalan" 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 [EMAIL PROTECTED]
   *
   * 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/>.
   */
  // Class header file...
  #include "PrefixResolver.hpp"
  
  
  
  PrefixResolver::PrefixResolver()
  {
  }
  
  
  
  PrefixResolver::PrefixResolver(const PrefixResolver&)
  {
  }
  
  
  
  PrefixResolver::~PrefixResolver()
  {
  }
  
  
  
  1.1                  xml-xalan/c/src/PlatformSupport/PrefixResolver.hpp
  
  Index: PrefixResolver.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 "Xalan" 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 [EMAIL PROTECTED]
   *
   * 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/>.
   */
  #if !defined(PREFIXRESOLVER_HEADER_GUARD_1357924680)
  #define PREFIXRESOLVER_HEADER_GUARD_1357924680
  
  
  
  // Base include file.  Must be first.
  #include <PlatformSupport/PlatformSupportDefinitions.hpp>
  
  
  
  #include <XalanDOM/XalanDOMString.hpp>
  
  
  
  /**
   * This class defines an interface for classes that resolve namespace prefixes
   * to their URIs 
   */
  class XALAN_PLATFORMSUPPORT_EXPORT PrefixResolver
  {
  public:
  
        PrefixResolver();
  
        PrefixResolver(const PrefixResolver&);
  
        virtual
        ~PrefixResolver();
  
        /**
         * Retrieve a namespace corresponding to a prefix.  This assumes that 
         * the PrevixResolver hold's its own namespace context, or is a namespace
         * context itself.
         *
         * @param prefix Prefix to resolve
         * @return namespace that prefix resolves to, or null if prefix is not found
         */
        virtual const XalanDOMString*
        getNamespaceForPrefix(const XalanDOMString&             prefix) const = 0;
  
        /**
         * Retrieve the base URI for the resolver.
         * 
         * @return URI string
         */
        virtual const XalanDOMString&
        getURI() const = 0;
  };
  
  
  
  #endif        // PREFIXRESOLVER_HEADER_GUARD_1357924680
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to