ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

variables.c File Reference
#include "libxslt.h"
#include <string.h>
#include <libxml/xmlmemory.h>
#include <libxml/tree.h>
#include <libxml/valid.h>
#include <libxml/hash.h>
#include <libxml/xmlerror.h>
#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>
#include <libxml/parserInternals.h>
#include <libxml/dict.h>
#include "xslt.h"
#include "xsltInternals.h"
#include "xsltutils.h"
#include "variables.h"
#include "transform.h"
#include "imports.h"
#include "preproc.h"
#include "keys.h"

Go to the source code of this file.

Defines

#define IN_LIBXSLT
#define XSLT_VAR_GLOBAL   1<<0
#define XSLT_VAR_IN_SELECT   1<<1
#define XSLT_TCTXT_VARIABLE(c)   ((xsltStackElemPtr) (c)->contextVariable)

Functions

xmlDocPtr xsltCreateRVT (xsltTransformContextPtr ctxt)
int xsltRegisterTmpRVT (xsltTransformContextPtr ctxt, xmlDocPtr RVT)
int xsltRegisterLocalRVT (xsltTransformContextPtr ctxt, xmlDocPtr RVT)
int xsltExtensionInstructionResultFinalize (xsltTransformContextPtr ctxt)
int xsltExtensionInstructionResultRegister (xsltTransformContextPtr ctxt, xmlXPathObjectPtr obj)
void xsltReleaseRVT (xsltTransformContextPtr ctxt, xmlDocPtr RVT)
int xsltRegisterPersistRVT (xsltTransformContextPtr ctxt, xmlDocPtr RVT)
void xsltFreeRVTs (xsltTransformContextPtr ctxt)
static xsltStackElemPtr xsltNewStackElem (xsltTransformContextPtr ctxt)
static xsltStackElemPtr xsltCopyStackElem (xsltStackElemPtr elem)
static void xsltFreeStackElem (xsltStackElemPtr elem)
void xsltFreeStackElemList (xsltStackElemPtr elem)
: the local part of the name

xsltStackLookup: : an XSLT transformation context

: the URI part of the name

Locate an element in the stack based on its name.

static xsltStackElemPtr xsltStackLookup (xsltTransformContextPtr ctxt, const xmlChar *name, const xmlChar *nameURI)
: the variable name

xsltXPathVariableLookup: : a void * but the the XSLT transformation context actually

: the variable namespace URI

This is the entry point when a varibale is needed by the XPath interpretor.

Returns the value or NULL if not found

static int xsltCheckStackElem (xsltTransformContextPtr ctxt, const xmlChar *name, const xmlChar *nameURI)
static int xsltAddStackElem (xsltTransformContextPtr ctxt, xsltStackElemPtr elem)
int xsltAddStackElemList (xsltTransformContextPtr ctxt, xsltStackElemPtr elems)
static xmlXPathObjectPtr xsltEvalVariable (xsltTransformContextPtr ctxt, xsltStackElemPtr variable, xsltStylePreCompPtr castedComp)
static xmlXPathObjectPtr xsltEvalGlobalVariable (xsltStackElemPtr elem, xsltTransformContextPtr ctxt)
int xsltEvalGlobalVariables (xsltTransformContextPtr ctxt)
static int xsltRegisterGlobalVariable (xsltStylesheetPtr style, const xmlChar *name, const xmlChar *ns_uri, const xmlChar *sel, xmlNodePtr tree, xsltStylePreCompPtr comp, const xmlChar *value)
static xmlXPathObjectPtr xsltGlobalVariableLookup (xsltTransformContextPtr ctxt, const xmlChar *name, const xmlChar *ns_uri)
xmlXPathObjectPtr xsltVariableLookup (xsltTransformContextPtr ctxt, const xmlChar *name, const xmlChar *ns_uri)
xsltStackElemPtr xsltParseStylesheetCallerParam (xsltTransformContextPtr ctxt, xmlNodePtr inst)
void xsltParseGlobalVariable (xsltStylesheetPtr style, xmlNodePtr cur)
void xsltParseGlobalParam (xsltStylesheetPtr style, xmlNodePtr cur)
void xsltParseStylesheetVariable (xsltTransformContextPtr ctxt, xmlNodePtr inst)
void xsltParseStylesheetParam (xsltTransformContextPtr ctxt, xmlNodePtr cur)
void xsltFreeGlobalVariables (xsltTransformContextPtr ctxt)
xmlXPathObjectPtr xsltXPathVariableLookup (void *ctxt, const xmlChar *name, const xmlChar *ns_uri)
: a null terminated parameter name

xsltProcessUserParamInternal

: the XSLT transformation context

: a null terminated value (may be an XPath expression) : 0 to treat the value literally, else evaluate as XPath expression

If is 0 then is treated literally and is stored in the global parameter/variable table without any change.

Uf is 1 then is treated as an XPath expression and is evaluated. In this case, if you want to pass a string which will be interpreted literally then it must be enclosed in single or double quotes. If the string contains single quotes (double quotes) then it cannot be enclosed single quotes (double quotes). If the string which you want to be treated literally contains both single and double quotes (e.g. Meet at Joe's for "Twelfth Night" at 7 o'clock) then there is no suitable quoting character. You cannot use ' or " inside the string because the replacement of character entities with their equivalents is done at a different stage of processing. The solution is to call xsltQuoteUserParams or xsltQuoteOneUserParam.

This needs to be done on parsed stylesheets before starting to apply transformations. Normally this will be called (directly or indirectly) only from xsltEvalUserParams, xsltEvalOneUserParam, xsltQuoteUserParams, or xsltQuoteOneUserParam.

Returns 0 in case of success, -1 in case of error

static int xsltProcessUserParamInternal (xsltTransformContextPtr ctxt, const xmlChar *name, const xmlChar *value, int eval)
int xsltEvalUserParams (xsltTransformContextPtr ctxt, const char **params)
int xsltQuoteUserParams (xsltTransformContextPtr ctxt, const char **params)
: a null terminated string giving the name of the parameter

xsltQuoteOneUserParam: : the XSLT transformation context

: a null terminated string giving the parameter value

This is normally called from xsltQuoteUserParams to process a single parameter from a list of parameters. The is stored in the context's global variable/parameter hash table.

Returns 0 in case of success, -1 in case of error.

int xsltEvalOneUserParam (xsltTransformContextPtr ctxt, const xmlChar *name, const xmlChar *value)
int xsltQuoteOneUserParam (xsltTransformContextPtr ctxt, const xmlChar *name, const xmlChar *value)
static xsltStackElemPtr xsltBuildVariable (xsltTransformContextPtr ctxt, xsltStylePreCompPtr castedComp, xmlNodePtr tree)
static int xsltRegisterVariable (xsltTransformContextPtr ctxt, xsltStylePreCompPtr castedComp, xmlNodePtr tree, int isParam)

Variables

const xmlCharxsltComputingGlobalVarMarker = " var/param being computed"

Generated on Sat May 26 2012 04:48:58 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.