Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:14:51

0001 /*
0002  * Licensed to the Apache Software Foundation (ASF) under one or more
0003  * contributor license agreements.  See the NOTICE file distributed with
0004  * this work for additional information regarding copyright ownership.
0005  * The ASF licenses this file to You under the Apache License, Version 2.0
0006  * (the "License"); you may not use this file except in compliance with
0007  * the License.  You may obtain a copy of the License at
0008  *
0009  *      http://www.apache.org/licenses/LICENSE-2.0
0010  *
0011  * Unless required by applicable law or agreed to in writing, software
0012  * distributed under the License is distributed on an "AS IS" BASIS,
0013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0014  * See the License for the specific language governing permissions and
0015  * limitations under the License.
0016  */
0017 
0018 /*
0019  * $Id$
0020  */
0021 
0022 #if !defined(XERCESC_INCLUDE_GUARD_DOMXPATHNSRESOLVER_HPP)
0023 #define XERCESC_INCLUDE_GUARD_DOMXPATHNSRESOLVER_HPP
0024 
0025 #include <xercesc/util/XercesDefs.hpp>
0026 
0027 XERCES_CPP_NAMESPACE_BEGIN
0028 /**
0029  * The <code>DOMXPathNSResolver</code> interface permit prefix strings
0030  * in the expression to be properly bound to namespaceURI strings.
0031  * <code>DOMXPathEvaluator</code> can construct an implementation of
0032  * <code>DOMXPathNSResolver</code> from a node, or the interface may be
0033  * implemented by any application.
0034  * @since DOM Level 3
0035  */
0036 class CDOM_EXPORT DOMXPathNSResolver
0037 {
0038 
0039 protected:
0040     // -----------------------------------------------------------------------
0041     //  Hidden constructors
0042     // -----------------------------------------------------------------------
0043     /** @name Hidden constructors */
0044     //@{
0045     DOMXPathNSResolver() {};
0046     //@}
0047 
0048 private:
0049     // -----------------------------------------------------------------------
0050     // Unimplemented constructors and operators
0051     // -----------------------------------------------------------------------
0052     /** @name Unimplemented constructors and operators */
0053     //@{
0054     DOMXPathNSResolver(const DOMXPathNSResolver &);
0055     DOMXPathNSResolver& operator = (const  DOMXPathNSResolver&);
0056     //@}
0057 
0058 public:
0059     // -----------------------------------------------------------------------
0060     //  All constructors are hidden, just the destructor is available
0061     // -----------------------------------------------------------------------
0062     /** @name Destructor */
0063     //@{
0064     /**
0065      * Destructor
0066      *
0067      */
0068     virtual ~DOMXPathNSResolver() {};
0069     //@}
0070 
0071     // -----------------------------------------------------------------------
0072     // Virtual DOMDocument interface
0073     // -----------------------------------------------------------------------
0074     /** @name Functions introduced in DOM Level 3 */
0075     //@{
0076 
0077     /** Look up the namespace URI associated to the given namespace prefix.
0078      *
0079      * @param prefix of type XMLCh - The prefix to look for. An empty or
0080      * null string denotes the default namespace.
0081      * @return the associated namespace URI or null if none is found.
0082      */
0083     virtual const XMLCh*          lookupNamespaceURI(const XMLCh* prefix) const = 0;
0084     //@}
0085 
0086 
0087     // -----------------------------------------------------------------------
0088     // Non-standard extension
0089     // -----------------------------------------------------------------------
0090     /** @name Non-standard extension */
0091     //@{
0092 
0093     /**
0094      * Non-standard extension
0095      *
0096      * XPath2 implementations require a reverse lookup in the static context.
0097      * Look up the prefix associated with the namespace URI
0098      * @param URI of type XMLCh - The namespace to look for.
0099      * @return the associated prefix which can be an empty string if this
0100      * is a default namespace or null if none is found.
0101      */
0102     virtual const XMLCh*          lookupPrefix(const XMLCh* URI) const = 0;
0103 
0104     /**
0105      * Non-standard extension
0106      *
0107      * Associate the given namespace prefix to the namespace URI.
0108      * @param prefix of type XMLCh - The namespace prefix to bind. An empty
0109      * or null string denotes the default namespace.
0110      * @param uri of type XMLCh - The associated namespace URI. If this
0111      * argument is null or an empty string then the existing binding for this
0112      * prefix is removed.
0113      */
0114     virtual void addNamespaceBinding(const XMLCh* prefix, const XMLCh* uri) = 0;
0115 
0116     /**
0117      * Called to indicate that this object (and its associated children) is no longer in use
0118      * and that the implementation may relinquish any resources associated with it and
0119      * its associated children.
0120      *
0121      * Access to a released object will lead to unexpected result.
0122      */
0123     virtual void release() = 0;
0124 
0125     //@}
0126 };
0127 
0128 XERCES_CPP_NAMESPACE_END
0129 
0130 #endif