Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Functions | Variables
txStylesheetCompileHandlers.cpp File Reference
#include "txStylesheetCompiler.h"
#include "txStylesheetCompileHandlers.h"
#include "txTokenizer.h"
#include "txInstructions.h"
#include "txAtoms.h"
#include "txCore.h"
#include "txStringUtils.h"
#include "txStylesheet.h"
#include "txToplevelItems.h"
#include "txPatternParser.h"
#include "txNamespaceMap.h"
#include "txURIUtils.h"
#include "XSLTFunctions.h"

Go to the source code of this file.

Classes

struct  txHandlerTableData
 Table Datas. More...

Defines

#define TX_RETURN_IF_WHITESPACE(_str, _state)
#define INIT_HANDLER(_name)
#define INIT_HANDLER_WITH_ELEMENT_HANDLERS(_name)
#define SHUTDOWN_HANDLER(_name)

Functions

nsresult txFnStartLRE (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
 Template Handlers.
nsresult txFnEndLRE (txStylesheetCompilerState &aState)
nsresult getStyleAttr (txStylesheetAttr *aAttributes, PRInt32 aAttrCount, PRInt32 aNamespace, nsIAtom *aName, PRBool aRequired, txStylesheetAttr **aAttr)
nsresult parseUseAttrSets (txStylesheetAttr *aAttributes, PRInt32 aAttrCount, PRBool aInXSLTNS, txStylesheetCompilerState &aState)
nsresult getQNameAttr (txStylesheetAttr *aAttributes, PRInt32 aAttrCount, nsIAtom *aName, PRBool aRequired, txStylesheetCompilerState &aState, txExpandedName &aExpName)
nsresult getExprAttr (txStylesheetAttr *aAttributes, PRInt32 aAttrCount, nsIAtom *aName, PRBool aRequired, txStylesheetCompilerState &aState, nsAutoPtr< Expr > &aExpr)
nsresult getAVTAttr (txStylesheetAttr *aAttributes, PRInt32 aAttrCount, nsIAtom *aName, PRBool aRequired, txStylesheetCompilerState &aState, nsAutoPtr< Expr > &aAVT)
nsresult getPatternAttr (txStylesheetAttr *aAttributes, PRInt32 aAttrCount, nsIAtom *aName, PRBool aRequired, txStylesheetCompilerState &aState, nsAutoPtr< txPattern > &aPattern)
nsresult getNumberAttr (txStylesheetAttr *aAttributes, PRInt32 aAttrCount, nsIAtom *aName, PRBool aRequired, txStylesheetCompilerState &aState, double &aNumber)
nsresult getAtomAttr (txStylesheetAttr *aAttributes, PRInt32 aAttrCount, nsIAtom *aName, PRBool aRequired, txStylesheetCompilerState &aState, nsIAtom **aAtom)
nsresult getYesNoAttr (txStylesheetAttr *aAttributes, PRInt32 aAttrCount, nsIAtom *aName, PRBool aRequired, txStylesheetCompilerState &aState, txThreeState &aRes)
nsresult getCharAttr (txStylesheetAttr *aAttributes, PRInt32 aAttrCount, nsIAtom *aName, PRBool aRequired, txStylesheetCompilerState &aState, PRUnichar &aChar)
nsresult txFnTextIgnore (const nsAString &aStr, txStylesheetCompilerState &aState)
 Ignore and error handlers.
nsresult txFnTextError (const nsAString &aStr, txStylesheetCompilerState &aState)
nsresult txFnStartElementIgnore (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndElementIgnore (txStylesheetCompilerState &aState)
nsresult txFnStartElementSetIgnore (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndElementSetIgnore (txStylesheetCompilerState &aState)
nsresult txFnStartElementError (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndElementError (txStylesheetCompilerState &aState)
nsresult txFnStartStylesheet (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
 Root handlers.
nsresult txFnEndStylesheet (txStylesheetCompilerState &aState)
nsresult txFnStartElementContinueTopLevel (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnStartLREStylesheet (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndLREStylesheet (txStylesheetCompilerState &aState)
nsresult txFnStartEmbed (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndEmbed (txStylesheetCompilerState &aState)
nsresult txFnStartOtherTop (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
 Top handlers.
nsresult txFnEndOtherTop (txStylesheetCompilerState &aState)
nsresult txFnStartAttributeSet (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndAttributeSet (txStylesheetCompilerState &aState)
nsresult txFnStartDecimalFormat (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndDecimalFormat (txStylesheetCompilerState &aState)
nsresult txFnStartImport (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndImport (txStylesheetCompilerState &aState)
nsresult txFnStartInclude (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndInclude (txStylesheetCompilerState &aState)
nsresult txFnStartKey (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndKey (txStylesheetCompilerState &aState)
nsresult txFnStartOutput (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndOutput (txStylesheetCompilerState &aState)
nsresult txFnStartStripSpace (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndStripSpace (txStylesheetCompilerState &aState)
nsresult txFnStartTemplate (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndTemplate (txStylesheetCompilerState &aState)
nsresult txFnStartTopVariable (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndTopVariable (txStylesheetCompilerState &aState)
nsresult txFnStartElementStartTopVar (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnTextStartTopVar (const nsAString &aStr, txStylesheetCompilerState &aState)
nsresult txFnText (const nsAString &aStr, txStylesheetCompilerState &aState)
nsresult txFnStartApplyImports (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndApplyImports (txStylesheetCompilerState &aState)
nsresult txFnStartApplyTemplates (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndApplyTemplates (txStylesheetCompilerState &aState)
nsresult txFnStartAttribute (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndAttribute (txStylesheetCompilerState &aState)
nsresult txFnStartCallTemplate (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndCallTemplate (txStylesheetCompilerState &aState)
nsresult txFnStartChoose (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndChoose (txStylesheetCompilerState &aState)
nsresult txFnStartComment (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndComment (txStylesheetCompilerState &aState)
nsresult txFnStartCopy (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndCopy (txStylesheetCompilerState &aState)
nsresult txFnStartCopyOf (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndCopyOf (txStylesheetCompilerState &aState)
nsresult txFnStartElement (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndElement (txStylesheetCompilerState &aState)
nsresult txFnStartFallback (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndFallback (txStylesheetCompilerState &aState)
nsresult txFnStartForEach (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndForEach (txStylesheetCompilerState &aState)
nsresult txFnStartElementContinueTemplate (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnTextContinueTemplate (const nsAString &aStr, txStylesheetCompilerState &aState)
nsresult txFnStartIf (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndIf (txStylesheetCompilerState &aState)
nsresult txFnStartMessage (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndMessage (txStylesheetCompilerState &aState)
nsresult txFnStartNumber (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndNumber (txStylesheetCompilerState &aState)
nsresult txFnStartOtherwise (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndOtherwise (txStylesheetCompilerState &aState)
nsresult txFnStartParam (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndParam (txStylesheetCompilerState &aState)
nsresult txFnStartPI (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndPI (txStylesheetCompilerState &aState)
nsresult txFnStartSort (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndSort (txStylesheetCompilerState &aState)
nsresult txFnStartText (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndText (txStylesheetCompilerState &aState)
nsresult txFnTextText (const nsAString &aStr, txStylesheetCompilerState &aState)
nsresult txFnStartValueOf (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndValueOf (txStylesheetCompilerState &aState)
nsresult txFnStartVariable (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndVariable (txStylesheetCompilerState &aState)
nsresult txFnStartElementStartRTF (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnTextStartRTF (const nsAString &aStr, txStylesheetCompilerState &aState)
nsresult txFnStartWhen (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndWhen (txStylesheetCompilerState &aState)
nsresult txFnStartWithParam (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndWithParam (txStylesheetCompilerState &aState)
nsresult txFnStartUnknownInstruction (PRInt32 aNamespaceID, nsIAtom *aLocalName, nsIAtom *aPrefix, txStylesheetAttr *aAttributes, PRInt32 aAttrCount, txStylesheetCompilerState &aState)
nsresult txFnEndUnknownInstruction (txStylesheetCompilerState &aState)

Variables

txHandlerTablegTxIgnoreHandler = 0
txHandlerTablegTxRootHandler = 0
txHandlerTablegTxEmbedHandler = 0
txHandlerTablegTxTopHandler = 0
txHandlerTablegTxTemplateHandler = 0
txHandlerTablegTxTextHandler = 0
txHandlerTablegTxApplyTemplatesHandler = 0
txHandlerTablegTxCallTemplateHandler = 0
txHandlerTablegTxVariableHandler = 0
txHandlerTablegTxForEachHandler = 0
txHandlerTablegTxTopVariableHandler = 0
txHandlerTablegTxChooseHandler = 0
txHandlerTablegTxParamHandler = 0
txHandlerTablegTxImportHandler = 0
txHandlerTablegTxAttributeSetHandler = 0
txHandlerTablegTxFallbackHandler = 0
const txHandlerTableData gTxIgnoreTableData
const txElementHandler gTxRootElementHandlers []
const txHandlerTableData gTxRootTableData
const txHandlerTableData gTxEmbedTableData
const txElementHandler gTxTopElementHandlers []
const txHandlerTableData gTxTopTableData
const txElementHandler gTxTemplateElementHandlers []
const txHandlerTableData gTxTemplateTableData
const txHandlerTableData gTxTextTableData
const txElementHandler gTxApplyTemplatesElementHandlers []
const txHandlerTableData gTxApplyTemplatesTableData
const txElementHandler gTxCallTemplateElementHandlers []
const txHandlerTableData gTxCallTemplateTableData
const txHandlerTableData gTxVariableTableData
const txElementHandler gTxForEachElementHandlers []
const txHandlerTableData gTxForEachTableData
const txHandlerTableData gTxTopVariableTableData
const txElementHandler gTxChooseElementHandlers []
const txHandlerTableData gTxChooseTableData
const txElementHandler gTxParamElementHandlers []
const txHandlerTableData gTxParamTableData
const txElementHandler gTxImportElementHandlers []
const txHandlerTableData gTxImportTableData
const txElementHandler gTxAttributeSetElementHandlers []
const txHandlerTableData gTxAttributeSetTableData
const txElementHandler gTxFallbackElementHandlers []
const txHandlerTableData gTxFallbackTableData

Class Documentation

struct txHandlerTableData

Table Datas.

Definition at line 2649 of file txStylesheetCompileHandlers.cpp.

Collaboration diagram for txHandlerTableData:
Class Members
txElementHandler mLREHandler
txElementHandler mOtherHandler
HandleTextFn mTextHandler

Define Documentation

#define INIT_HANDLER (   _name)
Value:
gTx##_name##Handler =                                            \
        new txHandlerTable(gTx##_name##TableData.mTextHandler,       \
                           &gTx##_name##TableData.mLREHandler,       \
                           &gTx##_name##TableData.mOtherHandler);    \
    if (!gTx##_name##Handler)                                        \
        return PR_FALSE

Definition at line 2918 of file txStylesheetCompileHandlers.cpp.

Value:
INIT_HANDLER(_name);                                             \
                                                                     \
    rv = gTx##_name##Handler->init(gTx##_name##ElementHandlers,      \
                                   NS_ARRAY_LENGTH(gTx##_name##ElementHandlers)); \
    if (NS_FAILED(rv))                                               \
        return PR_FALSE

Definition at line 2926 of file txStylesheetCompileHandlers.cpp.

#define SHUTDOWN_HANDLER (   _name)
Value:
delete gTx##_name##Handler;                                      \
    gTx##_name##Handler = nsnull

Definition at line 2934 of file txStylesheetCompileHandlers.cpp.

#define TX_RETURN_IF_WHITESPACE (   _str,
  _state 
)
Value:
do {                                                                    \
      if (!_state.mElementContext->mPreserveWhitespace &&                   \
          XMLUtils::isWhitespace(PromiseFlatString(_str))) {                \
          return NS_OK;                                                     \
      }                                                                     \
    } while(0)

Definition at line 81 of file txStylesheetCompileHandlers.cpp.


Function Documentation

nsresult getAtomAttr ( txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
nsIAtom aName,
PRBool  aRequired,
txStylesheetCompilerState aState,
nsIAtom **  aAtom 
)

Definition at line 300 of file txStylesheetCompileHandlers.cpp.

{
    *aAtom = nsnull;
    txStylesheetAttr* attr = nsnull;
    nsresult rv = getStyleAttr(aAttributes, aAttrCount, kNameSpaceID_None,
                               aName, aRequired, &attr);
    if (!attr) {
        return rv;
    }

    *aAtom = NS_NewAtom(attr->mValue);
    NS_ENSURE_TRUE(*aAtom, NS_ERROR_OUT_OF_MEMORY);

    return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult getAVTAttr ( txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
nsIAtom aName,
PRBool  aRequired,
txStylesheetCompilerState aState,
nsAutoPtr< Expr > &  aAVT 
)

Definition at line 214 of file txStylesheetCompileHandlers.cpp.

{
    aAVT = nsnull;
    txStylesheetAttr* attr = nsnull;
    nsresult rv = getStyleAttr(aAttributes, aAttrCount, kNameSpaceID_None,
                               aName, aRequired, &attr);
    if (!attr) {
        return rv;
    }

    aAVT = txExprParser::createAttributeValueTemplate(attr->mValue, &aState);
    if (!aAVT) {
        if (!aState.fcp()) {
            // XXX ErrorReport: XPath parse failure
            return NS_ERROR_XPATH_PARSE_FAILURE;
        }

        if (aRequired) {
            aAVT = new txErrorExpr(
#ifdef TX_TO_STRING
                                   attr->mValue
#endif
                                   );
            NS_ENSURE_TRUE(aAVT, NS_ERROR_OUT_OF_MEMORY);
        }
    }

    return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult getCharAttr ( txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
nsIAtom aName,
PRBool  aRequired,
txStylesheetCompilerState aState,
PRUnichar aChar 
)

Definition at line 352 of file txStylesheetCompileHandlers.cpp.

{
    // Don't reset aChar since it contains the default value
    txStylesheetAttr* attr = nsnull;
    nsresult rv = getStyleAttr(aAttributes, aAttrCount, kNameSpaceID_None,
                               aName, aRequired, &attr);
    if (!attr) {
        return rv;
    }

    if (attr->mValue.Length() == 1) {
        aChar = attr->mValue.CharAt(0);
    }
    else if (aRequired || !aState.fcp()) {
        // XXX ErrorReport: not a character
        return NS_ERROR_XSLT_PARSE_FAILURE;
    }

    return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult getExprAttr ( txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
nsIAtom aName,
PRBool  aRequired,
txStylesheetCompilerState aState,
nsAutoPtr< Expr > &  aExpr 
)

Definition at line 177 of file txStylesheetCompileHandlers.cpp.

{
    aExpr = nsnull;
    txStylesheetAttr* attr = nsnull;
    nsresult rv = getStyleAttr(aAttributes, aAttrCount, kNameSpaceID_None,
                               aName, aRequired, &attr);
    if (!attr) {
        return rv;
    }

    rv = txExprParser::createExpr(attr->mValue, &aState,
                                  getter_Transfers(aExpr));
    if (NS_FAILED(rv) && aState.fcp()) {
        // use default value in fcp for not required exprs
        if (aRequired) {
            aExpr = new txErrorExpr(
#ifdef TX_TO_STRING
                                    attr->mValue
#endif
                                    );
            NS_ENSURE_TRUE(aExpr, NS_ERROR_OUT_OF_MEMORY);
        }
        else {
            aExpr = nsnull;
        }
        return NS_OK;
    }

    return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult getNumberAttr ( txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
nsIAtom aName,
PRBool  aRequired,
txStylesheetCompilerState aState,
double &  aNumber 
)

Definition at line 275 of file txStylesheetCompileHandlers.cpp.

{
    aNumber = Double::NaN;
    txStylesheetAttr* attr = nsnull;
    nsresult rv = getStyleAttr(aAttributes, aAttrCount, kNameSpaceID_None,
                               aName, aRequired, &attr);
    if (!attr) {
        return rv;
    }

    aNumber = Double::toDouble(attr->mValue);
    if (Double::isNaN(aNumber) && (aRequired || !aState.fcp())) {
        // XXX ErrorReport: number parse failure
        return NS_ERROR_XSLT_PARSE_FAILURE;
    }

    return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult getPatternAttr ( txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
nsIAtom aName,
PRBool  aRequired,
txStylesheetCompilerState aState,
nsAutoPtr< txPattern > &  aPattern 
)

Definition at line 250 of file txStylesheetCompileHandlers.cpp.

{
    aPattern = nsnull;
    txStylesheetAttr* attr = nsnull;
    nsresult rv = getStyleAttr(aAttributes, aAttrCount, kNameSpaceID_None,
                               aName, aRequired, &attr);
    if (!attr) {
        return rv;
    }

    aPattern = txPatternParser::createPattern(attr->mValue, &aState);
    if (!aPattern && (aRequired || !aState.fcp())) {
        // XXX ErrorReport: XSLT-Pattern parse failure
        return NS_ERROR_XPATH_PARSE_FAILURE;
    }

    return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult getQNameAttr ( txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
nsIAtom aName,
PRBool  aRequired,
txStylesheetCompilerState aState,
txExpandedName aExpName 
)

Definition at line 151 of file txStylesheetCompileHandlers.cpp.

{
    aExpName.reset();
    txStylesheetAttr* attr = nsnull;
    nsresult rv = getStyleAttr(aAttributes, aAttrCount, kNameSpaceID_None,
                               aName, aRequired, &attr);
    if (!attr) {
        return rv;
    }

    rv = aExpName.init(attr->mValue, aState.mElementContext->mMappings,
                       PR_FALSE);
    if (!aRequired && NS_FAILED(rv) && aState.fcp()) {
        aExpName.reset();
        rv = NS_OK;
    }

    return rv;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult getStyleAttr ( txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
PRInt32  aNamespace,
nsIAtom aName,
PRBool  aRequired,
txStylesheetAttr **  aAttr 
)

Definition at line 91 of file txStylesheetCompileHandlers.cpp.

{
    PRInt32 i;
    for (i = 0; i < aAttrCount; ++i) {
        txStylesheetAttr* attr = aAttributes + i;
        if (attr->mNamespaceID == aNamespace &&
            attr->mLocalName == aName) {
            *aAttr = attr;

            return NS_OK;
        }
    }
    *aAttr = nsnull;
    
    if (aRequired) {
        // XXX ErrorReport: missing required attribute
        return NS_ERROR_XSLT_PARSE_FAILURE;
    }
    
    return NS_OK;
}

Here is the caller graph for this function:

nsresult getYesNoAttr ( txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
nsIAtom aName,
PRBool  aRequired,
txStylesheetCompilerState aState,
txThreeState aRes 
)

Definition at line 322 of file txStylesheetCompileHandlers.cpp.

{
    aRes = eNotSet;
    nsCOMPtr<nsIAtom> atom;
    nsresult rv = getAtomAttr(aAttributes, aAttrCount, aName, aRequired,
                              aState, getter_AddRefs(atom));
    if (!atom) {
        return rv;
    }

    if (atom == txXSLTAtoms::yes) {
        aRes = eTrue;
    }
    else if (atom == txXSLTAtoms::no) {
        aRes = eFalse;
    }
    else if (aRequired || !aState.fcp()) {
        // XXX ErrorReport: unknown values
        return NS_ERROR_XSLT_PARSE_FAILURE;
    }

    return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult parseUseAttrSets ( txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
PRBool  aInXSLTNS,
txStylesheetCompilerState aState 
)

Definition at line 119 of file txStylesheetCompileHandlers.cpp.

{
    txStylesheetAttr* attr = nsnull;
    nsresult rv = getStyleAttr(aAttributes, aAttrCount,
                               aInXSLTNS ? kNameSpaceID_XSLT
                                         : kNameSpaceID_None,
                               txXSLTAtoms::useAttributeSets, PR_FALSE,
                               &attr);
    if (!attr) {
        return rv;
    }

    txTokenizer tok(attr->mValue);
    while (tok.hasMoreTokens()) {
        txExpandedName name;
        rv = name.init(tok.nextToken(), aState.mElementContext->mMappings,
                       PR_FALSE);
        NS_ENSURE_SUCCESS(rv, rv);

        nsAutoPtr<txInstruction> instr(new txInsertAttrSet(name));
        NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);

        rv = aState.addInstruction(instr);
        NS_ENSURE_SUCCESS(rv, rv);
    }
    return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1318 of file txStylesheetCompileHandlers.cpp.

{
    aState.popHandlerTable();

    return NS_OK;
}

Here is the call graph for this function:

Definition at line 1393 of file txStylesheetCompileHandlers.cpp.

{
    aState.popHandlerTable();

    txPushNewContext* pushcontext =
        NS_STATIC_CAST(txPushNewContext*, aState.popObject());
    nsAutoPtr<txInstruction> instr(pushcontext); // txPushNewContext
    nsresult rv = aState.addInstruction(instr);
    NS_ENSURE_SUCCESS(rv, rv);

    aState.popSorter();

    instr = NS_STATIC_CAST(txInstruction*, aState.popObject()); // txApplyTemplates
    nsAutoPtr<txLoopNodeSet> loop(new txLoopNodeSet(instr));
    NS_ENSURE_TRUE(loop, NS_ERROR_OUT_OF_MEMORY);

    rv = aState.addInstruction(instr);
    NS_ENSURE_SUCCESS(rv, rv);

    instr = loop.forget();
    rv = aState.addInstruction(instr);
    NS_ENSURE_SUCCESS(rv, rv);

    instr = new txPopParams;
    NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);
    
    pushcontext->mBailTarget = instr;
    rv = aState.addInstruction(instr);
    NS_ENSURE_SUCCESS(rv, rv);

    return NS_OK;
}

Here is the call graph for this function:

Definition at line 1473 of file txStylesheetCompileHandlers.cpp.

Here is the call graph for this function:

Definition at line 634 of file txStylesheetCompileHandlers.cpp.

Here is the call graph for this function:

Definition at line 1525 of file txStylesheetCompileHandlers.cpp.

{
    aState.popHandlerTable();

    // txCallTemplate
    nsAutoPtr<txInstruction> instr(NS_STATIC_CAST(txInstruction*, 
                                                  aState.popObject()));
    nsresult rv = aState.addInstruction(instr);
    NS_ENSURE_SUCCESS(rv, rv);

    instr = new txPopParams;
    NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);

    rv = aState.addInstruction(instr);
    NS_ENSURE_SUCCESS(rv, rv);

    return NS_OK;
}

Here is the call graph for this function:

Definition at line 1573 of file txStylesheetCompileHandlers.cpp.

{
    nsresult rv = NS_OK;
    aState.popHandlerTable();
    txListIterator iter(aState.mChooseGotoList);
    txGoTo* gotoinstr;
    while ((gotoinstr = NS_STATIC_CAST(txGoTo*, iter.next()))) {
        rv = aState.addGotoTarget(&gotoinstr->mTarget);
        NS_ENSURE_SUCCESS(rv, rv);
    }

    aState.popChooseGotoList();

    return NS_OK;
}

Here is the call graph for this function:

Definition at line 1614 of file txStylesheetCompileHandlers.cpp.

Here is the call graph for this function:

Definition at line 1659 of file txStylesheetCompileHandlers.cpp.

Here is the call graph for this function:

Definition at line 1704 of file txStylesheetCompileHandlers.cpp.

{
    aState.popHandlerTable();
    return NS_OK;
}

Here is the call graph for this function:

Definition at line 724 of file txStylesheetCompileHandlers.cpp.

{
    aState.popHandlerTable();

    return NS_OK;
}

Here is the call graph for this function:

Definition at line 1752 of file txStylesheetCompileHandlers.cpp.

Here is the call graph for this function:

Definition at line 443 of file txStylesheetCompileHandlers.cpp.

{
    NS_ERROR("txFnEndElementError shouldn't be called"); 
    return NS_ERROR_XSLT_PARSE_FAILURE;
}

Definition at line 408 of file txStylesheetCompileHandlers.cpp.

{
    return NS_OK;
}

Definition at line 425 of file txStylesheetCompileHandlers.cpp.

{
    aState.popHandlerTable();
    return NS_OK;
}

Here is the call graph for this function:

Definition at line 565 of file txStylesheetCompileHandlers.cpp.

{
    if (!aState.handleEmbeddedSheet()) {
        return NS_OK;
    }
    nsresult rv = txFnEndStylesheet(aState);
    aState.doneEmbedding();
    return rv;
}

Here is the call graph for this function:

Definition at line 1782 of file txStylesheetCompileHandlers.cpp.

{
    aState.popHandlerTable();

    NS_ASSERTION(!aState.mSearchingForFallback,
                 "bad nesting of unknown-instruction and fallback handlers");
    return NS_OK;
}

Here is the call graph for this function:

Definition at line 1841 of file txStylesheetCompileHandlers.cpp.

{
    aState.popHandlerTable();

    // This is a txPushNullTemplateRule
    txInstruction* pnullrule =
        NS_STATIC_CAST(txInstruction*, aState.popPtr());

    nsAutoPtr<txInstruction> instr(new txLoopNodeSet(pnullrule));
    nsresult rv = aState.addInstruction(instr);
    NS_ENSURE_SUCCESS(rv, rv);

    aState.popSorter();
    txPushNewContext* pushcontext =
        NS_STATIC_CAST(txPushNewContext*, aState.popPtr());
    aState.addGotoTarget(&pushcontext->mBailTarget);

    return NS_OK;
}

Here is the call graph for this function:

Definition at line 1921 of file txStylesheetCompileHandlers.cpp.

{
    txConditionalGoto* condGoto =
        NS_STATIC_CAST(txConditionalGoto*, aState.popPtr());
    return aState.addGotoTarget(&condGoto->mTarget);
}

Here is the call graph for this function:

Definition at line 766 of file txStylesheetCompileHandlers.cpp.

{
    aState.popHandlerTable();

    return NS_OK;
}

Here is the call graph for this function:

Definition at line 797 of file txStylesheetCompileHandlers.cpp.

{
    aState.popHandlerTable();

    return NS_OK;
}

Here is the call graph for this function:

Definition at line 836 of file txStylesheetCompileHandlers.cpp.

{
    aState.popHandlerTable();

    return NS_OK;
}

Here is the call graph for this function:

Definition at line 1256 of file txStylesheetCompileHandlers.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 526 of file txStylesheetCompileHandlers.cpp.

Here is the call graph for this function:

Definition at line 1966 of file txStylesheetCompileHandlers.cpp.

Here is the call graph for this function:

Definition at line 2049 of file txStylesheetCompileHandlers.cpp.

{
    aState.popHandlerTable();

    return NS_OK;
}

Here is the call graph for this function:

Definition at line 595 of file txStylesheetCompileHandlers.cpp.

{
    aState.popHandlerTable();
    return NS_OK;
}

Here is the call graph for this function:

Definition at line 2073 of file txStylesheetCompileHandlers.cpp.

{
    aState.popHandlerTable();
    aState.mHandlerTable = gTxIgnoreHandler; // XXX should be gTxErrorHandler

    return NS_OK;
}

Here is the call graph for this function:

Definition at line 953 of file txStylesheetCompileHandlers.cpp.

{
    aState.popHandlerTable();

    return NS_OK;
}

Here is the call graph for this function:

Definition at line 2142 of file txStylesheetCompileHandlers.cpp.

{
    nsAutoPtr<txSetVariable> var(NS_STATIC_CAST(txSetVariable*,
                                                aState.popObject()));
    txHandlerTable* prev = aState.mHandlerTable;
    aState.popHandlerTable();

    if (prev == gTxVariableHandler) {
        // No children were found.
        NS_ASSERTION(!var->mValue,
                     "There shouldn't be a select-expression here");
        var->mValue = new txLiteralExpr(EmptyString());
        NS_ENSURE_TRUE(var->mValue, NS_ERROR_OUT_OF_MEMORY);
    }

    nsresult rv = aState.addVariable(var->mName);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<txInstruction> instr(var.forget());
    rv = aState.addInstruction(instr);
    NS_ENSURE_SUCCESS(rv, rv);

    txCheckParam* checkParam = NS_STATIC_CAST(txCheckParam*, aState.popPtr());
    aState.addGotoTarget(&checkParam->mBailTarget);

    return NS_OK;
}

Here is the call graph for this function:

Definition at line 2208 of file txStylesheetCompileHandlers.cpp.

Here is the call graph for this function:

Definition at line 2274 of file txStylesheetCompileHandlers.cpp.

{
    aState.popHandlerTable();

    return NS_OK;
}

Here is the call graph for this function:

Definition at line 1036 of file txStylesheetCompileHandlers.cpp.

{
    aState.popHandlerTable();

    return NS_OK;
}

Here is the call graph for this function:

Definition at line 470 of file txStylesheetCompileHandlers.cpp.

{
    aState.popHandlerTable();
    return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 1086 of file txStylesheetCompileHandlers.cpp.

Here is the call graph for this function:

Definition at line 2309 of file txStylesheetCompileHandlers.cpp.

{
    aState.mDOE = MB_FALSE;
    aState.popHandlerTable();
    return NS_OK;
}

Here is the call graph for this function:

Definition at line 1148 of file txStylesheetCompileHandlers.cpp.

{
    txHandlerTable* prev = aState.mHandlerTable;
    aState.popHandlerTable();
    txVariableItem* var = NS_STATIC_CAST(txVariableItem*, aState.popPtr());

    if (prev == gTxTopVariableHandler) {
        // No children were found.
        NS_ASSERTION(!var->mValue,
                     "There shouldn't be a select-expression here");
        var->mValue = new txLiteralExpr(EmptyString());
        NS_ENSURE_TRUE(var->mValue, NS_ERROR_OUT_OF_MEMORY);
    }
    else if (!var->mValue) {
        // If we don't have a select-expression there mush be children.
        nsAutoPtr<txInstruction> instr(new txReturn());
        NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);

        nsresult rv = aState.addInstruction(instr);
        NS_ENSURE_SUCCESS(rv, rv);
    }

    aState.closeInstructionContainer();

    return NS_OK;
}

Here is the call graph for this function:

Definition at line 2628 of file txStylesheetCompileHandlers.cpp.

Here is the call graph for this function:

Definition at line 2364 of file txStylesheetCompileHandlers.cpp.

{
    aState.popHandlerTable();
    return NS_OK;
}

Here is the call graph for this function:

Definition at line 2419 of file txStylesheetCompileHandlers.cpp.

{
    nsAutoPtr<txSetVariable> var(NS_STATIC_CAST(txSetVariable*,
                                                aState.popObject()));

    txHandlerTable* prev = aState.mHandlerTable;
    aState.popHandlerTable();

    if (prev == gTxVariableHandler) {
        // No children were found.
        NS_ASSERTION(!var->mValue,
                     "There shouldn't be a select-expression here");
        var->mValue = new txLiteralExpr(EmptyString());
        NS_ENSURE_TRUE(var->mValue, NS_ERROR_OUT_OF_MEMORY);
    }

    nsresult rv = aState.addVariable(var->mName);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<txInstruction> instr(var.forget());
    rv = aState.addInstruction(instr);
    NS_ENSURE_SUCCESS(rv, rv);

    return NS_OK;
}

Here is the call graph for this function:

Definition at line 2514 of file txStylesheetCompileHandlers.cpp.

{
    aState.popHandlerTable();
    nsAutoPtr<txGoTo> gotoinstr(new txGoTo(nsnull));
    NS_ENSURE_TRUE(gotoinstr, NS_ERROR_OUT_OF_MEMORY);
    
    nsresult rv = aState.mChooseGotoList->add(gotoinstr);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<txInstruction> instr(gotoinstr.forget());
    rv = aState.addInstruction(instr);
    NS_ENSURE_SUCCESS(rv, rv);

    txConditionalGoto* condGoto =
        NS_STATIC_CAST(txConditionalGoto*, aState.popPtr());
    rv = aState.addGotoTarget(&condGoto->mTarget);
    NS_ENSURE_SUCCESS(rv, rv);

    return NS_OK;
}

Here is the call graph for this function:

Definition at line 2584 of file txStylesheetCompileHandlers.cpp.

{
    nsAutoPtr<txSetParam> var(NS_STATIC_CAST(txSetParam*, aState.popObject()));
    txHandlerTable* prev = aState.mHandlerTable;
    aState.popHandlerTable();

    if (prev == gTxVariableHandler) {
        // No children were found.
        NS_ASSERTION(!var->mValue,
                     "There shouldn't be a select-expression here");
        var->mValue = new txLiteralExpr(EmptyString());
        NS_ENSURE_TRUE(var->mValue, NS_ERROR_OUT_OF_MEMORY);
    }

    nsAutoPtr<txInstruction> instr(var.forget());
    nsresult rv = aState.addInstruction(instr);
    NS_ENSURE_SUCCESS(rv, rv);

    return NS_OK;
}

Here is the call graph for this function:

nsresult txFnStartApplyImports ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 1293 of file txStylesheetCompileHandlers.cpp.

Here is the call graph for this function:

nsresult txFnStartApplyTemplates ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 1336 of file txStylesheetCompileHandlers.cpp.

{
    nsresult rv = NS_OK;

    nsAutoPtr<txInstruction> instr(new txPushParams);
    NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);

    rv = aState.addInstruction(instr);
    NS_ENSURE_SUCCESS(rv, rv);

    txExpandedName mode;
    rv = getQNameAttr(aAttributes, aAttrCount, txXSLTAtoms::mode, PR_FALSE,
                      aState, mode);
    NS_ENSURE_SUCCESS(rv, rv);

    instr = new txApplyTemplates(mode);
    NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);

    rv = aState.pushObject(instr);
    NS_ENSURE_SUCCESS(rv, rv);

    instr.forget();

    nsAutoPtr<Expr> select;
    rv = getExprAttr(aAttributes, aAttrCount, txXSLTAtoms::select, PR_FALSE,
                     aState, select);
    NS_ENSURE_SUCCESS(rv, rv);

    if (!select) {
        nsAutoPtr<txNodeTest> nt(
            new txNodeTypeTest(txNodeTypeTest::NODE_TYPE));
        NS_ENSURE_TRUE(nt, NS_ERROR_OUT_OF_MEMORY);

        select = new LocationStep(nt, LocationStep::CHILD_AXIS);
        NS_ENSURE_TRUE(select, NS_ERROR_OUT_OF_MEMORY);
    }

    nsAutoPtr<txPushNewContext> pushcontext(new txPushNewContext(select));
    NS_ENSURE_TRUE(pushcontext, NS_ERROR_OUT_OF_MEMORY);

    rv = aState.pushSorter(pushcontext);
    NS_ENSURE_SUCCESS(rv, rv);

    rv = aState.pushObject(pushcontext);
    NS_ENSURE_SUCCESS(rv, rv);
    
    pushcontext.forget();

    return aState.pushHandlerTable(gTxApplyTemplatesHandler);
}

Here is the call graph for this function:

nsresult txFnStartAttribute ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 1434 of file txStylesheetCompileHandlers.cpp.

{
    nsresult rv = NS_OK;

    nsAutoPtr<txInstruction> instr(new txPushStringHandler(PR_TRUE));
    NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);

    rv = aState.addInstruction(instr);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<Expr> name;
    rv = getAVTAttr(aAttributes, aAttrCount, txXSLTAtoms::name, PR_TRUE,
                    aState, name);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<Expr> nspace;
    rv = getAVTAttr(aAttributes, aAttrCount, txXSLTAtoms::_namespace, PR_FALSE,
                    aState, nspace);
    NS_ENSURE_SUCCESS(rv, rv);

    instr = new txAttribute(name, nspace, aState.mElementContext->mMappings);
    NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);

    rv = aState.pushObject(instr);
    NS_ENSURE_SUCCESS(rv, rv);

    instr.forget();

    // We need to push the template-handler since the current might be
    // the attributeset-handler
    return aState.pushHandlerTable(gTxTemplateHandler);
}

Here is the call graph for this function:

nsresult txFnStartAttributeSet ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 604 of file txStylesheetCompileHandlers.cpp.

{
    nsresult rv = NS_OK;
    txExpandedName name;
    rv = getQNameAttr(aAttributes, aAttrCount, txXSLTAtoms::name, PR_TRUE,
                      aState, name);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<txAttributeSetItem> attrSet(new txAttributeSetItem(name));
    NS_ENSURE_TRUE(attrSet, NS_ERROR_OUT_OF_MEMORY);

    aState.openInstructionContainer(attrSet);

    rv = aState.addToplevelItem(attrSet);
    NS_ENSURE_SUCCESS(rv, rv);

    attrSet.forget();

    rv = parseUseAttrSets(aAttributes, aAttrCount, PR_FALSE, aState);
    NS_ENSURE_SUCCESS(rv, rv);

    return aState.pushHandlerTable(gTxAttributeSetHandler);
}

Here is the call graph for this function:

nsresult txFnStartCallTemplate ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 1493 of file txStylesheetCompileHandlers.cpp.

{
    nsresult rv = NS_OK;

    nsAutoPtr<txInstruction> instr(new txPushParams);
    NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);

    rv = aState.addInstruction(instr);
    NS_ENSURE_SUCCESS(rv, rv);

    txExpandedName name;
    rv = getQNameAttr(aAttributes, aAttrCount, txXSLTAtoms::name, PR_TRUE,
                      aState, name);
    NS_ENSURE_SUCCESS(rv, rv);

    instr = new txCallTemplate(name);
    NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);

    rv = aState.pushObject(instr);
    NS_ENSURE_SUCCESS(rv, rv);
    
    instr.forget();

    return aState.pushHandlerTable(gTxCallTemplateHandler);
}

Here is the call graph for this function:

nsresult txFnStartChoose ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 1559 of file txStylesheetCompileHandlers.cpp.

Here is the call graph for this function:

nsresult txFnStartComment ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 1597 of file txStylesheetCompileHandlers.cpp.

Here is the call graph for this function:

nsresult txFnStartCopy ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 1635 of file txStylesheetCompileHandlers.cpp.

{
    nsAutoPtr<txCopy> copy(new txCopy);
    NS_ENSURE_TRUE(copy, NS_ERROR_OUT_OF_MEMORY);

    nsresult rv = aState.pushPtr(copy);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<txInstruction> instr(copy.forget());
    rv = aState.addInstruction(instr);
    NS_ENSURE_SUCCESS(rv, rv);

    rv = parseUseAttrSets(aAttributes, aAttrCount, PR_FALSE, aState);
    NS_ENSURE_SUCCESS(rv, rv);

    return NS_OK;
}

Here is the call graph for this function:

nsresult txFnStartCopyOf ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 1680 of file txStylesheetCompileHandlers.cpp.

{
    nsresult rv = NS_OK;

    nsAutoPtr<Expr> select;
    rv = getExprAttr(aAttributes, aAttrCount, txXSLTAtoms::select, PR_TRUE,
                    aState, select);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<txInstruction> instr(new txCopyOf(select));
    NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);
    
    rv = aState.addInstruction(instr);
    NS_ENSURE_SUCCESS(rv, rv);

    return aState.pushHandlerTable(gTxIgnoreHandler);
}

Here is the call graph for this function:

nsresult txFnStartDecimalFormat ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 652 of file txStylesheetCompileHandlers.cpp.

{
    nsresult rv = NS_OK;
    txExpandedName name;
    rv = getQNameAttr(aAttributes, aAttrCount, txXSLTAtoms::name, PR_FALSE,
                      aState, name);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<txDecimalFormat> format(new txDecimalFormat);
    NS_ENSURE_TRUE(format, NS_ERROR_OUT_OF_MEMORY);

    rv = getCharAttr(aAttributes, aAttrCount, txXSLTAtoms::decimalSeparator,
                     PR_FALSE, aState, format->mDecimalSeparator);
    NS_ENSURE_SUCCESS(rv, rv);

    rv = getCharAttr(aAttributes, aAttrCount, txXSLTAtoms::groupingSeparator,
                     PR_FALSE, aState, format->mGroupingSeparator);
    NS_ENSURE_SUCCESS(rv, rv);

    txStylesheetAttr* attr = nsnull;
    rv = getStyleAttr(aAttributes, aAttrCount, kNameSpaceID_None,
                      txXSLTAtoms::infinity, PR_FALSE, &attr);
    NS_ENSURE_SUCCESS(rv, rv);

    if (attr) {
        format->mInfinity = attr->mValue;
    }

    rv = getCharAttr(aAttributes, aAttrCount, txXSLTAtoms::minusSign,
                     PR_FALSE, aState, format->mMinusSign);
    NS_ENSURE_SUCCESS(rv, rv);

    rv = getStyleAttr(aAttributes, aAttrCount, kNameSpaceID_None,
                      txXSLTAtoms::NaN, PR_FALSE, &attr);
    NS_ENSURE_SUCCESS(rv, rv);

    if (attr) {
        format->mNaN = attr->mValue;
    }

    rv = getCharAttr(aAttributes, aAttrCount, txXSLTAtoms::percent,
                     PR_FALSE, aState, format->mPercent);
    NS_ENSURE_SUCCESS(rv, rv);

    rv = getCharAttr(aAttributes, aAttrCount, txXSLTAtoms::perMille,
                     PR_FALSE, aState, format->mPerMille);
    NS_ENSURE_SUCCESS(rv, rv);

    rv = getCharAttr(aAttributes, aAttrCount, txXSLTAtoms::zeroDigit,
                     PR_FALSE, aState, format->mZeroDigit);
    NS_ENSURE_SUCCESS(rv, rv);

    rv = getCharAttr(aAttributes, aAttrCount, txXSLTAtoms::digit,
                     PR_FALSE, aState, format->mDigit);
    NS_ENSURE_SUCCESS(rv, rv);

    rv = getCharAttr(aAttributes, aAttrCount, txXSLTAtoms::patternSeparator,
                     PR_FALSE, aState, format->mPatternSeparator);
    NS_ENSURE_SUCCESS(rv, rv);

    rv = aState.mStylesheet->addDecimalFormat(name, format);
    NS_ENSURE_SUCCESS(rv, rv);
    
    return aState.pushHandlerTable(gTxIgnoreHandler);
}

Here is the call graph for this function:

nsresult txFnStartElement ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 1719 of file txStylesheetCompileHandlers.cpp.

{
    nsresult rv = NS_OK;

    nsAutoPtr<Expr> name;
    rv = getAVTAttr(aAttributes, aAttrCount, txXSLTAtoms::name, PR_TRUE,
                    aState, name);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<Expr> nspace;
    rv = getAVTAttr(aAttributes, aAttrCount, txXSLTAtoms::_namespace, PR_FALSE,
                    aState, nspace);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<txInstruction> instr(
        new txStartElement(name, nspace, aState.mElementContext->mMappings));
    NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);

    rv = aState.addInstruction(instr);
    NS_ENSURE_SUCCESS(rv, rv);

    rv = parseUseAttrSets(aAttributes, aAttrCount, PR_FALSE, aState);
    NS_ENSURE_SUCCESS(rv, rv);

    return NS_OK;
}

Here is the call graph for this function:

nsresult txFnStartElementContinueTemplate ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)
nsresult txFnStartElementContinueTopLevel ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 477 of file txStylesheetCompileHandlers.cpp.

nsresult txFnStartElementError ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 432 of file txStylesheetCompileHandlers.cpp.

nsresult txFnStartElementIgnore ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 397 of file txStylesheetCompileHandlers.cpp.

{
    return NS_OK;
}
nsresult txFnStartElementSetIgnore ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 414 of file txStylesheetCompileHandlers.cpp.

{
    return aState.pushHandlerTable(gTxIgnoreHandler);
}

Here is the call graph for this function:

nsresult txFnStartElementStartRTF ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 2446 of file txStylesheetCompileHandlers.cpp.

Here is the call graph for this function:

nsresult txFnStartElementStartTopVar ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)
nsresult txFnStartEmbed ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 545 of file txStylesheetCompileHandlers.cpp.

{
    if (!aState.handleEmbeddedSheet()) {
        return NS_OK;
    }
    if (aNamespaceID != kNameSpaceID_XSLT ||
        (aLocalName != txXSLTAtoms::stylesheet &&
         aLocalName != txXSLTAtoms::transform)) {
        return NS_ERROR_XSLT_PARSE_FAILURE;
    }
    return txFnStartStylesheet(aNamespaceID, aLocalName, aPrefix,
                               aAttributes, aAttrCount, aState);
}

Here is the call graph for this function:

nsresult txFnStartFallback ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 1769 of file txStylesheetCompileHandlers.cpp.

Here is the call graph for this function:

nsresult txFnStartForEach ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 1801 of file txStylesheetCompileHandlers.cpp.

{
    nsresult rv = NS_OK;

    nsAutoPtr<Expr> select;
    rv = getExprAttr(aAttributes, aAttrCount, txXSLTAtoms::select, PR_TRUE,
                     aState, select);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<txPushNewContext> pushcontext(new txPushNewContext(select));
    NS_ENSURE_TRUE(pushcontext, NS_ERROR_OUT_OF_MEMORY);

    rv = aState.pushPtr(pushcontext);
    NS_ENSURE_SUCCESS(rv, rv);

    rv = aState.pushSorter(pushcontext);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<txInstruction> instr(pushcontext.forget());
    rv = aState.addInstruction(instr);
    NS_ENSURE_SUCCESS(rv, rv);
    
    instr = new txPushNullTemplateRule;
    NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);

    rv = aState.pushPtr(instr);
    NS_ENSURE_SUCCESS(rv, rv);

    rv = aState.addInstruction(instr);
    NS_ENSURE_SUCCESS(rv, rv);

    return aState.pushHandlerTable(gTxForEachHandler);
}

Here is the call graph for this function:

nsresult txFnStartIf ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 1893 of file txStylesheetCompileHandlers.cpp.

{
    nsresult rv = NS_OK;

    nsAutoPtr<Expr> test;
    rv = getExprAttr(aAttributes, aAttrCount, txXSLTAtoms::test, PR_TRUE,
                     aState, test);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<txConditionalGoto> condGoto(new txConditionalGoto(test, nsnull));
    NS_ENSURE_TRUE(condGoto, NS_ERROR_OUT_OF_MEMORY);

    rv = aState.pushPtr(condGoto);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<txInstruction> instr(condGoto.forget());
    rv = aState.addInstruction(instr);
    NS_ENSURE_SUCCESS(rv, rv);

    return NS_OK;
}

Here is the call graph for this function:

nsresult txFnStartImport ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 733 of file txStylesheetCompileHandlers.cpp.

{
    nsAutoPtr<txImportItem> import(new txImportItem);
    NS_ENSURE_TRUE(import, NS_ERROR_OUT_OF_MEMORY);
    
    import->mFrame = new txStylesheet::ImportFrame;
    NS_ENSURE_TRUE(import->mFrame, NS_ERROR_OUT_OF_MEMORY);

    nsresult rv = aState.addToplevelItem(import);
    NS_ENSURE_SUCCESS(rv, rv);
    
    txImportItem* importPtr = import.forget();
    
    txStylesheetAttr* attr = nsnull;
    rv = getStyleAttr(aAttributes, aAttrCount, kNameSpaceID_None,
                      txXSLTAtoms::href, PR_TRUE, &attr);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoString absUri;
    URIUtils::resolveHref(attr->mValue, aState.mElementContext->mBaseURI,
                          absUri);
    rv = aState.loadImportedStylesheet(absUri, importPtr->mFrame);
    NS_ENSURE_SUCCESS(rv, rv);

    return aState.pushHandlerTable(gTxIgnoreHandler);
}

Here is the call graph for this function:

nsresult txFnStartInclude ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 775 of file txStylesheetCompileHandlers.cpp.

{
    txStylesheetAttr* attr = nsnull;
    nsresult rv = getStyleAttr(aAttributes, aAttrCount, kNameSpaceID_None,
                               txXSLTAtoms::href, PR_TRUE, &attr);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoString absUri;
    URIUtils::resolveHref(attr->mValue, aState.mElementContext->mBaseURI,
                          absUri);
    rv = aState.loadIncludedStylesheet(absUri);
    NS_ENSURE_SUCCESS(rv, rv);

    return aState.pushHandlerTable(gTxIgnoreHandler);
}

Here is the call graph for this function:

nsresult txFnStartKey ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 806 of file txStylesheetCompileHandlers.cpp.

{
    nsresult rv = NS_OK;
    txExpandedName name;
    rv = getQNameAttr(aAttributes, aAttrCount, txXSLTAtoms::name, PR_TRUE,
                      aState, name);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<txPattern> match;
    rv = getPatternAttr(aAttributes, aAttrCount, txXSLTAtoms::match, PR_TRUE,
                        aState, match);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<Expr> use;
    rv = getExprAttr(aAttributes, aAttrCount, txXSLTAtoms::use, PR_TRUE,
                     aState, use);
    NS_ENSURE_SUCCESS(rv, rv);

    rv = aState.mStylesheet->addKey(name, match, use);
    NS_ENSURE_SUCCESS(rv, rv);
    
    return aState.pushHandlerTable(gTxIgnoreHandler);
}

Here is the call graph for this function:

nsresult txFnStartLRE ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Template Handlers.

Definition at line 1212 of file txStylesheetCompileHandlers.cpp.

{
    nsresult rv = NS_OK;

    nsAutoPtr<txInstruction> instr(new txStartLREElement(aNamespaceID,
                                                         aLocalName, aPrefix));
    NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);

    rv = aState.addInstruction(instr);
    NS_ENSURE_SUCCESS(rv, rv);
    
    rv = parseUseAttrSets(aAttributes, aAttrCount, PR_TRUE, aState);
    NS_ENSURE_SUCCESS(rv, rv);

    txStylesheetAttr* attr = nsnull;
    PRInt32 i;
    for (i = 0; i < aAttrCount; ++i) {
        attr = aAttributes + i;
        
        if (attr->mNamespaceID == kNameSpaceID_XSLT) {
            continue;
        }
        
        nsAutoPtr<Expr> avt(
              txExprParser::createAttributeValueTemplate(attr->mValue, &aState));
        NS_ENSURE_TRUE(avt, NS_ERROR_XPATH_PARSE_FAILURE);

        instr = new txLREAttribute(attr->mNamespaceID, attr->mLocalName,
                                   attr->mPrefix, avt);
        NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);
        
        rv = aState.addInstruction(instr);
        NS_ENSURE_SUCCESS(rv, rv);
    }

    return NS_OK;
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult txFnStartLREStylesheet ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 490 of file txStylesheetCompileHandlers.cpp.

{
    txStylesheetAttr* attr;
    nsresult rv = getStyleAttr(aAttributes, aAttrCount, kNameSpaceID_XSLT,
                               txXSLTAtoms::version, PR_TRUE, &attr);
    NS_ENSURE_SUCCESS(rv, rv);

    txExpandedName nullExpr;
    double prio = Double::NaN;

    nsAutoPtr<txPattern> match(new txRootPattern());
    NS_ENSURE_TRUE(match, NS_ERROR_OUT_OF_MEMORY);

    nsAutoPtr<txTemplateItem> templ(new txTemplateItem(match, nullExpr,
                                                       nullExpr, prio));
    NS_ENSURE_TRUE(templ, NS_ERROR_OUT_OF_MEMORY);

    aState.openInstructionContainer(templ);
    rv = aState.addToplevelItem(templ);
    NS_ENSURE_SUCCESS(rv, rv);

    templ.forget();

    rv = aState.pushHandlerTable(gTxTemplateHandler);
    NS_ENSURE_SUCCESS(rv, rv);
    
    return txFnStartLRE(aNamespaceID, aLocalName, aPrefix, aAttributes,
                        aAttrCount, aState);
}

Here is the call graph for this function:

nsresult txFnStartMessage ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 1936 of file txStylesheetCompileHandlers.cpp.

{
    nsAutoPtr<txInstruction> instr(new txPushStringHandler(PR_FALSE));
    NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);

    nsresult rv = aState.addInstruction(instr);
    NS_ENSURE_SUCCESS(rv, rv);

    txThreeState term;
    rv = getYesNoAttr(aAttributes, aAttrCount, txXSLTAtoms::terminate,
                      PR_FALSE, aState, term);
    NS_ENSURE_SUCCESS(rv, rv);

    instr = new txMessage(term == eTrue);
    NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);

    rv = aState.pushObject(instr);
    NS_ENSURE_SUCCESS(rv, rv);

    instr.forget();

    return NS_OK;
}

Here is the call graph for this function:

nsresult txFnStartNumber ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 1982 of file txStylesheetCompileHandlers.cpp.

{
    nsresult rv = NS_OK;

    nsCOMPtr<nsIAtom> levelAtom;
    rv = getAtomAttr(aAttributes, aAttrCount, txXSLTAtoms::level, PR_FALSE,
                     aState, getter_AddRefs(levelAtom));
    NS_ENSURE_SUCCESS(rv, rv);
    
    txXSLTNumber::LevelType level = txXSLTNumber::eLevelSingle;
    if (levelAtom == txXSLTAtoms::multiple) {
        level = txXSLTNumber::eLevelMultiple;
    }
    else if (levelAtom == txXSLTAtoms::any) {
        level = txXSLTNumber::eLevelAny;
    }
    else if (levelAtom && levelAtom != txXSLTAtoms::single && !aState.fcp()) {
        return NS_ERROR_XSLT_PARSE_FAILURE;
    }
    
    nsAutoPtr<txPattern> count;
    rv = getPatternAttr(aAttributes, aAttrCount, txXSLTAtoms::count, PR_FALSE,
                        aState, count);
    NS_ENSURE_SUCCESS(rv, rv);
    
    nsAutoPtr<txPattern> from;
    rv = getPatternAttr(aAttributes, aAttrCount, txXSLTAtoms::from, PR_FALSE,
                        aState, from);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<Expr> value;
    rv = getExprAttr(aAttributes, aAttrCount, txXSLTAtoms::value, PR_FALSE,
                     aState, value);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<Expr> format;
    rv = getAVTAttr(aAttributes, aAttrCount, txXSLTAtoms::format, PR_FALSE,
                    aState, format);
    NS_ENSURE_SUCCESS(rv, rv);
    
    nsAutoPtr<Expr> groupingSeparator;
    rv = getAVTAttr(aAttributes, aAttrCount, txXSLTAtoms::groupingSeparator,
                    PR_FALSE, aState, groupingSeparator);
    NS_ENSURE_SUCCESS(rv, rv);
    
    nsAutoPtr<Expr> groupingSize;
    rv = getAVTAttr(aAttributes, aAttrCount, txXSLTAtoms::groupingSize,
                    PR_FALSE, aState, groupingSize);
    NS_ENSURE_SUCCESS(rv, rv);
    
    nsAutoPtr<txInstruction> instr(new txNumber(level, count, from, value,
                                                format,groupingSeparator,
                                                groupingSize));
    NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);
    
    rv = aState.addInstruction(instr);
    NS_ENSURE_SUCCESS(rv, rv);

    return aState.pushHandlerTable(gTxIgnoreHandler);
}

Here is the call graph for this function:

nsresult txFnStartOtherTop ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Top handlers.

Definition at line 580 of file txStylesheetCompileHandlers.cpp.

{
    if (aNamespaceID == kNameSpaceID_None) {
        return NS_ERROR_XSLT_PARSE_FAILURE;
    }
    
    return aState.pushHandlerTable(gTxIgnoreHandler);
}

Here is the call graph for this function:

nsresult txFnStartOtherwise ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 2062 of file txStylesheetCompileHandlers.cpp.

Here is the call graph for this function:

nsresult txFnStartOutput ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 845 of file txStylesheetCompileHandlers.cpp.

{
    nsresult rv = NS_OK;

    nsAutoPtr<txOutputItem> item(new txOutputItem);
    NS_ENSURE_TRUE(item, NS_ERROR_OUT_OF_MEMORY);

    txExpandedName methodExpName;
    rv = getQNameAttr(aAttributes, aAttrCount, txXSLTAtoms::method, PR_FALSE,
                      aState, methodExpName);
    NS_ENSURE_SUCCESS(rv, rv);

    if (!methodExpName.isNull()) {
        if (methodExpName.mNamespaceID != kNameSpaceID_None) {
            // The spec doesn't say what to do here so we'll just ignore the
            // value. We could possibly warn.
        }
        else if (methodExpName.mLocalName == txXSLTAtoms::html) {
            item->mFormat.mMethod = eHTMLOutput;
        }
        else if (methodExpName.mLocalName == txXSLTAtoms::text) {
            item->mFormat.mMethod = eTextOutput;
        }
        else if (methodExpName.mLocalName == txXSLTAtoms::xml) {
            item->mFormat.mMethod = eXMLOutput;
        }
        else {
            return NS_ERROR_XSLT_PARSE_FAILURE;
        }
    }

    txStylesheetAttr* attr = nsnull;
    getStyleAttr(aAttributes, aAttrCount, kNameSpaceID_None,
                 txXSLTAtoms::version, PR_FALSE, &attr);
    if (attr) {
        item->mFormat.mVersion = attr->mValue;
    }

    getStyleAttr(aAttributes, aAttrCount, kNameSpaceID_None,
                 txXSLTAtoms::encoding, PR_FALSE, &attr);
    if (attr) {
        item->mFormat.mEncoding = attr->mValue;
    }

    rv = getYesNoAttr(aAttributes, aAttrCount,
                      txXSLTAtoms::omitXmlDeclaration, PR_FALSE, aState,
                      item->mFormat.mOmitXMLDeclaration);
    NS_ENSURE_SUCCESS(rv, rv);

    rv = getYesNoAttr(aAttributes, aAttrCount,
                      txXSLTAtoms::standalone, PR_FALSE, aState,
                      item->mFormat.mStandalone);
    NS_ENSURE_SUCCESS(rv, rv);

    getStyleAttr(aAttributes, aAttrCount, kNameSpaceID_None,
                 txXSLTAtoms::doctypePublic, PR_FALSE, &attr);
    if (attr) {
        item->mFormat.mPublicId = attr->mValue;
    }

    getStyleAttr(aAttributes, aAttrCount, kNameSpaceID_None,
                 txXSLTAtoms::doctypeSystem, PR_FALSE, &attr);
    if (attr) {
        item->mFormat.mSystemId = attr->mValue;
    }

    getStyleAttr(aAttributes, aAttrCount, kNameSpaceID_None,
                 txXSLTAtoms::cdataSectionElements, PR_FALSE, &attr);
    if (attr) {
        txTokenizer tokens(attr->mValue);
        while (tokens.hasMoreTokens()) {
            txExpandedName* qname = new txExpandedName();
            NS_ENSURE_TRUE(qname, NS_ERROR_OUT_OF_MEMORY);

            rv = qname->init(tokens.nextToken(),
                             aState.mElementContext->mMappings, PR_FALSE);
            NS_ENSURE_SUCCESS(rv, rv);

            rv = item->mFormat.mCDATASectionElements.add(qname);
            NS_ENSURE_SUCCESS(rv, rv);
        }
    }

    rv = getYesNoAttr(aAttributes, aAttrCount,
                      txXSLTAtoms::indent, PR_FALSE, aState,
                      item->mFormat.mIndent);
    NS_ENSURE_SUCCESS(rv, rv);

    getStyleAttr(aAttributes, aAttrCount, kNameSpaceID_None,
                 txXSLTAtoms::mediaType, PR_FALSE, &attr);
    if (attr) {
        item->mFormat.mMediaType = attr->mValue;
    }

    rv = aState.addToplevelItem(item);
    NS_ENSURE_SUCCESS(rv, rv);
    
    item.forget();

    return aState.pushHandlerTable(gTxIgnoreHandler);
}

Here is the call graph for this function:

nsresult txFnStartParam ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 2091 of file txStylesheetCompileHandlers.cpp.

{
    nsresult rv = NS_OK;

    txExpandedName name;
    rv = getQNameAttr(aAttributes, aAttrCount, txXSLTAtoms::name, PR_TRUE,
                      aState, name);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<txCheckParam> checkParam(new txCheckParam(name));
    NS_ENSURE_SUCCESS(rv, rv);
    
    rv = aState.pushPtr(checkParam);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<txInstruction> instr(checkParam.forget());
    rv = aState.addInstruction(instr);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<Expr> select;
    rv = getExprAttr(aAttributes, aAttrCount, txXSLTAtoms::select, PR_FALSE,
                     aState, select);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<txSetVariable> var(new txSetVariable(name, select));
    NS_ENSURE_TRUE(var, NS_ERROR_OUT_OF_MEMORY);

    if (var->mValue) {
        // XXX should be gTxErrorHandler?
        rv = aState.pushHandlerTable(gTxIgnoreHandler);
        NS_ENSURE_SUCCESS(rv, rv);
    }
    else {
        rv = aState.pushHandlerTable(gTxVariableHandler);
        NS_ENSURE_SUCCESS(rv, rv);
    }

    rv = aState.pushObject(var);
    NS_ENSURE_SUCCESS(rv, rv);
    
    var.forget();

    return NS_OK;
}

Here is the call graph for this function:

nsresult txFnStartPI ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 2178 of file txStylesheetCompileHandlers.cpp.

{
    nsAutoPtr<txInstruction> instr(new txPushStringHandler(PR_TRUE));
    NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);

    nsresult rv = aState.addInstruction(instr);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<Expr> name;
    rv = getAVTAttr(aAttributes, aAttrCount, txXSLTAtoms::name, PR_TRUE,
                    aState, name);
    NS_ENSURE_SUCCESS(rv, rv);

    instr = new txProcessingInstruction(name);
    NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);

    rv = aState.pushObject(instr);
    NS_ENSURE_SUCCESS(rv, rv);

    instr.forget();

    return NS_OK;
}

Here is the call graph for this function:

nsresult txFnStartSort ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 2224 of file txStylesheetCompileHandlers.cpp.

{
    nsresult rv = NS_OK;

    nsAutoPtr<Expr> select;
    rv = getExprAttr(aAttributes, aAttrCount, txXSLTAtoms::select, PR_FALSE,
                     aState, select);
    NS_ENSURE_SUCCESS(rv, rv);

    if (!select) {
        nsAutoPtr<txNodeTest> nt(
              new txNodeTypeTest(txNodeTypeTest::NODE_TYPE));
        NS_ENSURE_TRUE(nt, NS_ERROR_OUT_OF_MEMORY);

        select = new LocationStep(nt, LocationStep::SELF_AXIS);
        NS_ENSURE_TRUE(select, NS_ERROR_OUT_OF_MEMORY);
    }

    nsAutoPtr<Expr> lang;
    rv = getAVTAttr(aAttributes, aAttrCount, txXSLTAtoms::lang, PR_FALSE,
                    aState, lang);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<Expr> dataType;
    rv = getAVTAttr(aAttributes, aAttrCount, txXSLTAtoms::dataType, PR_FALSE,
                    aState, dataType);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<Expr> order;
    rv = getAVTAttr(aAttributes, aAttrCount, txXSLTAtoms::order, PR_FALSE,
                    aState, order);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<Expr> caseOrder;
    rv = getAVTAttr(aAttributes, aAttrCount, txXSLTAtoms::caseOrder, PR_FALSE,
                    aState, caseOrder);
    NS_ENSURE_SUCCESS(rv, rv);

    rv = aState.mSorter->addSort(select, lang, dataType, order, caseOrder);
    NS_ENSURE_SUCCESS(rv, rv);

    return aState.pushHandlerTable(gTxIgnoreHandler);
}

Here is the call graph for this function:

nsresult txFnStartStripSpace ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 962 of file txStylesheetCompileHandlers.cpp.

{
    txStylesheetAttr* attr = nsnull;
    nsresult rv = getStyleAttr(aAttributes, aAttrCount, kNameSpaceID_None,
                               txXSLTAtoms::elements, PR_TRUE, &attr);
    NS_ENSURE_SUCCESS(rv, rv);

    PRBool strip = aLocalName == txXSLTAtoms::stripSpace;

    nsAutoPtr<txStripSpaceItem> stripItem(new txStripSpaceItem);
    NS_ENSURE_TRUE(stripItem, NS_ERROR_OUT_OF_MEMORY);

    txTokenizer tokenizer(attr->mValue);
    while (tokenizer.hasMoreTokens()) {
        const nsASingleFragmentString& name = tokenizer.nextToken();
        PRInt32 ns = kNameSpaceID_None;
        nsCOMPtr<nsIAtom> prefix, localName;
        rv = XMLUtils::splitQName(name, getter_AddRefs(prefix),
                                  getter_AddRefs(localName));
        if (NS_FAILED(rv)) {
            // check for "*" or "prefix:*"
            PRUint32 length = name.Length();
            const PRUnichar* c;
            name.BeginReading(c);
            if (length == 2 || c[length-1] != '*') {
                // these can't work
                return NS_ERROR_XSLT_PARSE_FAILURE;
            }
            if (length > 1) {
                // Check for a valid prefix, that is, the returned prefix
                // should be empty and the real prefix is returned in
                // localName.
                if (c[length-2] != ':') {
                    return NS_ERROR_XSLT_PARSE_FAILURE;
                }
                rv = XMLUtils::splitQName(Substring(name, 0, length-2), 
                                          getter_AddRefs(prefix),
                                          getter_AddRefs(localName));
                if (NS_FAILED(rv) || prefix) {
                    // bad chars or two ':'
                    return NS_ERROR_XSLT_PARSE_FAILURE;
                }
                prefix = localName;
            }
            localName = txXPathAtoms::_asterix;
        }
        if (prefix) {
            ns = aState.mElementContext->mMappings->lookupNamespace(prefix);
            NS_ENSURE_TRUE(ns != kNameSpaceID_Unknown, NS_ERROR_FAILURE);
        }
        nsAutoPtr<txStripSpaceTest> sst(new txStripSpaceTest(prefix, localName,
                                                             ns, strip));
        NS_ENSURE_TRUE(sst, NS_ERROR_OUT_OF_MEMORY);

        rv = stripItem->addStripSpaceTest(sst);
        NS_ENSURE_SUCCESS(rv, rv);
        
        sst.forget();
    }

    rv = aState.addToplevelItem(stripItem);
    NS_ENSURE_SUCCESS(rv, rv);

    stripItem.forget();

    return aState.pushHandlerTable(gTxIgnoreHandler);
}

Here is the call graph for this function:

nsresult txFnStartStylesheet ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Root handlers.

Definition at line 454 of file txStylesheetCompileHandlers.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult txFnStartTemplate ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 1045 of file txStylesheetCompileHandlers.cpp.

{
    nsresult rv = NS_OK;
    txExpandedName name;
    rv = getQNameAttr(aAttributes, aAttrCount, txXSLTAtoms::name, PR_FALSE,
                      aState, name);
    NS_ENSURE_SUCCESS(rv, rv);

    txExpandedName mode;
    rv = getQNameAttr(aAttributes, aAttrCount, txXSLTAtoms::mode, PR_FALSE,
                      aState, mode);
    NS_ENSURE_SUCCESS(rv, rv);

    double prio = Double::NaN;
    rv = getNumberAttr(aAttributes, aAttrCount, txXSLTAtoms::priority,
                       PR_FALSE, aState, prio);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<txPattern> match;
    rv = getPatternAttr(aAttributes, aAttrCount, txXSLTAtoms::match,
                        name.isNull(), aState, match);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<txTemplateItem> templ(new txTemplateItem(match, name, mode, prio));
    NS_ENSURE_TRUE(templ, NS_ERROR_OUT_OF_MEMORY);

    aState.openInstructionContainer(templ);
    rv = aState.addToplevelItem(templ);
    NS_ENSURE_SUCCESS(rv, rv);
    
    templ.forget();

    return aState.pushHandlerTable(gTxParamHandler);
}

Here is the call graph for this function:

nsresult txFnStartText ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 2287 of file txStylesheetCompileHandlers.cpp.

{
    NS_ASSERTION(!aState.mDOE, "nested d-o-e elements should not happen");

    nsresult rv = NS_OK;
    txThreeState doe;
    rv = getYesNoAttr(aAttributes, aAttrCount,
                      txXSLTAtoms::disableOutputEscaping, PR_FALSE, aState,
                      doe);
    NS_ENSURE_SUCCESS(rv, rv);

    aState.mDOE = doe == eTrue;

    return aState.pushHandlerTable(gTxTextHandler);
}

Here is the call graph for this function:

nsresult txFnStartTopVariable ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 1103 of file txStylesheetCompileHandlers.cpp.

{
    nsresult rv = NS_OK;
    txExpandedName name;
    rv = getQNameAttr(aAttributes, aAttrCount, txXSLTAtoms::name, PR_TRUE,
                      aState, name);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<Expr> select;
    rv = getExprAttr(aAttributes, aAttrCount, txXSLTAtoms::select, PR_FALSE,
                     aState, select);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<txVariableItem> var(
        new txVariableItem(name, select, aLocalName == txXSLTAtoms::param));
    NS_ENSURE_TRUE(var, NS_ERROR_OUT_OF_MEMORY);

    aState.openInstructionContainer(var);
    rv = aState.pushPtr(var);
    NS_ENSURE_SUCCESS(rv, rv);

    if (var->mValue) {
        // XXX should be gTxErrorHandler?
        rv = aState.pushHandlerTable(gTxIgnoreHandler);
        NS_ENSURE_SUCCESS(rv, rv);
    }
    else {
        rv = aState.pushHandlerTable(gTxTopVariableHandler);
        NS_ENSURE_SUCCESS(rv, rv);
    }

    rv = aState.addToplevelItem(var);
    NS_ENSURE_SUCCESS(rv, rv);
    
    var.forget();

    return NS_OK;
}

Here is the call graph for this function:

nsresult txFnStartUnknownInstruction ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 2613 of file txStylesheetCompileHandlers.cpp.

{
    NS_ASSERTION(!aState.mSearchingForFallback,
                 "bad nesting of unknown-instruction and fallback handlers");
    aState.mSearchingForFallback = PR_TRUE;

    return aState.pushHandlerTable(gTxFallbackHandler);
}

Here is the call graph for this function:

nsresult txFnStartValueOf ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 2334 of file txStylesheetCompileHandlers.cpp.

{
    nsresult rv = NS_OK;

    txThreeState doe;
    rv = getYesNoAttr(aAttributes, aAttrCount,
                     txXSLTAtoms::disableOutputEscaping, PR_FALSE, aState,
                     doe);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<Expr> select;
    rv = getExprAttr(aAttributes, aAttrCount, txXSLTAtoms::select, PR_TRUE,
                     aState, select);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<txInstruction> instr(new txValueOf(select, doe == eTrue));
    NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);

    rv = aState.addInstruction(instr);
    NS_ENSURE_SUCCESS(rv, rv);

    return aState.pushHandlerTable(gTxIgnoreHandler);
}

Here is the call graph for this function:

nsresult txFnStartVariable ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 2378 of file txStylesheetCompileHandlers.cpp.

{
    nsresult rv = NS_OK;

    txExpandedName name;
    rv = getQNameAttr(aAttributes, aAttrCount, txXSLTAtoms::name, PR_TRUE,
                      aState, name);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<Expr> select;
    rv = getExprAttr(aAttributes, aAttrCount, txXSLTAtoms::select, PR_FALSE,
                     aState, select);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<txSetVariable> var(new txSetVariable(name, select));
    NS_ENSURE_TRUE(var, NS_ERROR_OUT_OF_MEMORY);

    if (var->mValue) {
        // XXX should be gTxErrorHandler?
        rv = aState.pushHandlerTable(gTxIgnoreHandler);
        NS_ENSURE_SUCCESS(rv, rv);
    }
    else {
        rv = aState.pushHandlerTable(gTxVariableHandler);
        NS_ENSURE_SUCCESS(rv, rv);
    }

    rv = aState.pushObject(var);
    NS_ENSURE_SUCCESS(rv, rv);

    var.forget();

    return NS_OK;
}

Here is the call graph for this function:

nsresult txFnStartWhen ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 2486 of file txStylesheetCompileHandlers.cpp.

{
    nsresult rv = NS_OK;

    nsAutoPtr<Expr> test;
    rv = getExprAttr(aAttributes, aAttrCount, txXSLTAtoms::test, PR_TRUE,
                     aState, test);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<txConditionalGoto> condGoto(new txConditionalGoto(test, nsnull));
    NS_ENSURE_TRUE(condGoto, NS_ERROR_OUT_OF_MEMORY);

    rv = aState.pushPtr(condGoto);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<txInstruction> instr(condGoto.forget());
    rv = aState.addInstruction(instr);
    NS_ENSURE_SUCCESS(rv, rv);

    return aState.pushHandlerTable(gTxTemplateHandler);
}

Here is the call graph for this function:

nsresult txFnStartWithParam ( PRInt32  aNamespaceID,
nsIAtom aLocalName,
nsIAtom aPrefix,
txStylesheetAttr aAttributes,
PRInt32  aAttrCount,
txStylesheetCompilerState aState 
)

Definition at line 2543 of file txStylesheetCompileHandlers.cpp.

{
    nsresult rv = NS_OK;

    txExpandedName name;
    rv = getQNameAttr(aAttributes, aAttrCount, txXSLTAtoms::name, PR_TRUE,
                      aState, name);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<Expr> select;
    rv = getExprAttr(aAttributes, aAttrCount, txXSLTAtoms::select, PR_FALSE,
                     aState, select);
    NS_ENSURE_SUCCESS(rv, rv);

    nsAutoPtr<txSetParam> var(new txSetParam(name, select));
    NS_ENSURE_TRUE(var, NS_ERROR_OUT_OF_MEMORY);

    if (var->mValue) {
        // XXX should be gTxErrorHandler?
        rv = aState.pushHandlerTable(gTxIgnoreHandler);
        NS_ENSURE_SUCCESS(rv, rv);
    }
    else {
        rv = aState.pushHandlerTable(gTxVariableHandler);
        NS_ENSURE_SUCCESS(rv, rv);
    }

    rv = aState.pushObject(var);
    NS_ENSURE_SUCCESS(rv, rv);

    var.forget();

    return NS_OK;
}

Here is the call graph for this function:

nsresult txFnText ( const nsAString &  aStr,
txStylesheetCompilerState aState 
)

Definition at line 1273 of file txStylesheetCompileHandlers.cpp.

Here is the call graph for this function:

nsresult txFnTextContinueTemplate ( const nsAString &  aStr,
txStylesheetCompilerState aState 
)
nsresult txFnTextError ( const nsAString &  aStr,
txStylesheetCompilerState aState 
)

Definition at line 389 of file txStylesheetCompileHandlers.cpp.

nsresult txFnTextIgnore ( const nsAString &  aStr,
txStylesheetCompilerState aState 
)

Ignore and error handlers.

Definition at line 383 of file txStylesheetCompileHandlers.cpp.

{
    return NS_OK;
}
nsresult txFnTextStartRTF ( const nsAString &  aStr,
txStylesheetCompilerState aState 
)

Definition at line 2465 of file txStylesheetCompileHandlers.cpp.

Here is the call graph for this function:

nsresult txFnTextStartTopVar ( const nsAString &  aStr,
txStylesheetCompilerState aState 
)
nsresult txFnTextText ( const nsAString &  aStr,
txStylesheetCompilerState aState 
)

Definition at line 2317 of file txStylesheetCompileHandlers.cpp.

{
    nsAutoPtr<txInstruction> instr(new txText(aStr, aState.mDOE));
    NS_ENSURE_TRUE(instr, NS_ERROR_OUT_OF_MEMORY);

    nsresult rv = aState.addInstruction(instr);
    NS_ENSURE_SUCCESS(rv, rv);

    return NS_OK;
}

Here is the call graph for this function:


Variable Documentation

Initial value:

Definition at line 2748 of file txStylesheetCompileHandlers.cpp.

Definition at line 59 of file txStylesheetCompileHandlers.cpp.

Initial value:

Definition at line 2846 of file txStylesheetCompileHandlers.cpp.

Definition at line 67 of file txStylesheetCompileHandlers.cpp.

Initial value:

Definition at line 2850 of file txStylesheetCompileHandlers.cpp.

Initial value:

Definition at line 2762 of file txStylesheetCompileHandlers.cpp.

Definition at line 60 of file txStylesheetCompileHandlers.cpp.

Initial value:

Definition at line 2806 of file txStylesheetCompileHandlers.cpp.

Definition at line 64 of file txStylesheetCompileHandlers.cpp.

Initial value:

Definition at line 2811 of file txStylesheetCompileHandlers.cpp.

Definition at line 55 of file txStylesheetCompileHandlers.cpp.

Initial value:

Definition at line 2678 of file txStylesheetCompileHandlers.cpp.

Initial value:

Definition at line 2859 of file txStylesheetCompileHandlers.cpp.

Definition at line 68 of file txStylesheetCompileHandlers.cpp.

Initial value:

Definition at line 2784 of file txStylesheetCompileHandlers.cpp.

Definition at line 62 of file txStylesheetCompileHandlers.cpp.

Definition at line 53 of file txStylesheetCompileHandlers.cpp.

Initial value:

Definition at line 2833 of file txStylesheetCompileHandlers.cpp.

Definition at line 66 of file txStylesheetCompileHandlers.cpp.

Initial value:

Definition at line 2837 of file txStylesheetCompileHandlers.cpp.

Initial value:

Definition at line 2820 of file txStylesheetCompileHandlers.cpp.

Definition at line 65 of file txStylesheetCompileHandlers.cpp.

Initial value:

Definition at line 2664 of file txStylesheetCompileHandlers.cpp.

Definition at line 54 of file txStylesheetCompileHandlers.cpp.

Definition at line 57 of file txStylesheetCompileHandlers.cpp.

Initial value:

Definition at line 2730 of file txStylesheetCompileHandlers.cpp.

Definition at line 58 of file txStylesheetCompileHandlers.cpp.

Definition at line 56 of file txStylesheetCompileHandlers.cpp.

Initial value:

Definition at line 2700 of file txStylesheetCompileHandlers.cpp.

Definition at line 63 of file txStylesheetCompileHandlers.cpp.

Initial value:

Definition at line 2797 of file txStylesheetCompileHandlers.cpp.

Definition at line 61 of file txStylesheetCompileHandlers.cpp.

Initial value:

Definition at line 2775 of file txStylesheetCompileHandlers.cpp.