Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Private Attributes
nsXPathEvaluator::ParseContextImpl Class Reference
Inheritance diagram for nsXPathEvaluator::ParseContextImpl:
Inheritance graph
[legend]
Collaboration diagram for nsXPathEvaluator::ParseContextImpl:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ParseContextImpl (nsIDOMXPathNSResolver *aResolver, PRBool aIsCaseSensitive)
 ~ParseContextImpl ()
nsresult getError ()
nsresult resolveNamespacePrefix (nsIAtom *aPrefix, PRInt32 &aID)
nsresult resolveFunctionCall (nsIAtom *aName, PRInt32 aID, FunctionCall *&aFunction)
PRBool caseInsensitiveNameTests ()
 Should nametests parsed in this context be case-sensitive.
void SetErrorOffset (PRUint32 aOffset)

Private Attributes

nsIDOMXPathNSResolvermResolver
nsresult mLastError
PRBool mIsCaseSensitive

Detailed Description

Definition at line 72 of file nsXPathEvaluator.h.


Constructor & Destructor Documentation

nsXPathEvaluator::ParseContextImpl::ParseContextImpl ( nsIDOMXPathNSResolver aResolver,
PRBool  aIsCaseSensitive 
) [inline]

Definition at line 75 of file nsXPathEvaluator.h.

            : mResolver(aResolver), mLastError(NS_OK),
              mIsCaseSensitive(aIsCaseSensitive)
        {
        }

Definition at line 82 of file nsXPathEvaluator.h.

        {
        }

Member Function Documentation

Should nametests parsed in this context be case-sensitive.

Implements txIParseContext.

Definition at line 202 of file nsXPathEvaluator.cpp.

{
    return !mIsCaseSensitive;
}

Definition at line 86 of file nsXPathEvaluator.h.

        {
            return mLastError;
        }

Implements txIParseContext.

Definition at line 195 of file nsXPathEvaluator.cpp.

Implements txIParseContext.

Definition at line 163 of file nsXPathEvaluator.cpp.

{
    aID = kNameSpaceID_Unknown;

    if (!mResolver) {
        return NS_ERROR_DOM_NAMESPACE_ERR;
    }

    nsAutoString prefix;
    if (aPrefix) {
        aPrefix->ToString(prefix);
    }

    nsVoidableString ns;
    nsresult rv = mResolver->LookupNamespaceURI(prefix, ns);
    NS_ENSURE_SUCCESS(rv, rv);

    if (DOMStringIsNull(ns)) {
        return NS_ERROR_DOM_NAMESPACE_ERR;
    }

    if (ns.IsEmpty()) {
        aID = kNameSpaceID_None;

        return NS_OK;
    }

    // get the namespaceID for the URI
    return gTxNameSpaceManager->RegisterNameSpace(ns, aID);
}

Here is the call graph for this function:

Implements txIParseContext.

Definition at line 208 of file nsXPathEvaluator.cpp.

{
}

Member Data Documentation

Definition at line 100 of file nsXPathEvaluator.h.

Definition at line 99 of file nsXPathEvaluator.h.

Definition at line 98 of file nsXPathEvaluator.h.


The documentation for this class was generated from the following files: