xml/xmldomandxpath/src/xmlenginedom/xmlengnodecontextnamespaceresolver.h
changeset 0 e35f40988205
equal deleted inserted replaced
-1:000000000000 0:e35f40988205
       
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 
       
    17 
       
    18 /**
       
    19  @file
       
    20  @internalComponent
       
    21  @released
       
    22 */
       
    23 
       
    24 #ifndef XMLENGNODECTXTNAMESPACERESOLVER_H
       
    25 #define XMLENGNODECTXTNAMESPACERESOLVER_H
       
    26 
       
    27 #include <xml/dom/xmlengnamespaceresolver.h>
       
    28 #include <xml/dom/xmlengelement.h>
       
    29 
       
    30 /**
       
    31  * Implementation of namespace resolver for XPath
       
    32  *
       
    33  */
       
    34 class CXmlEngNodeContextNamespaceResolver: public CBase, public MXmlEngNamespaceResolver
       
    35 {
       
    36 public:
       
    37 	/**
       
    38 	 * Constructor
       
    39 	 *
       
    40 	 * @param aContextNode Node in which looking for namespace starts
       
    41 	 */
       
    42     IMPORT_C CXmlEngNodeContextNamespaceResolver(const TXmlEngNode& aContextNode);
       
    43 
       
    44 	/**
       
    45 	 * Destructor
       
    46 	 *
       
    47 	 */
       
    48     IMPORT_C ~CXmlEngNodeContextNamespaceResolver();
       
    49 	
       
    50 	/**
       
    51      * Searches the prefix that is bound to the given aNamespaceUri and
       
    52      * applicable in the scope of this TXmlEngNode.
       
    53      *
       
    54      * @param aNamespaceUri Namespace Uri that should be found
       
    55      * @return A sought prefix or NULL if not found or aNamespaceUri is the default namespace
       
    56      */
       
    57     IMPORT_C TPtrC8 LookupPrefixL(const TDesC8& aNamespaceUri) const;
       
    58 
       
    59 	/**
       
    60      * Searches the namespace URI that is bound to the given prefix.
       
    61      *
       
    62      * @param aPrefix Namespace prefix that should be found
       
    63      * @return A sought URI or NULL if the prefix is not bound
       
    64      */
       
    65     IMPORT_C TPtrC8 LookupNamespaceUriL(const TDesC8& aPrefix) const;
       
    66     /** @} **/
       
    67 private:
       
    68 	/** Namespace resolver context */
       
    69     TXmlEngElement iContextElement;
       
    70 };   
       
    71 
       
    72 #endif /* XMLENGNODECTXTNAMESPACERESOLVER_H */