|
ReactOS 0.4.16-dev-2208-g6350669
|
#include "libxslt.h"#include <string.h>#include <libxml/xmlmemory.h>#include <libxml/parser.h>#include <libxml/tree.h>#include <libxml/valid.h>#include <libxml/hash.h>#include <libxml/uri.h>#include <libxml/xmlerror.h>#include <libxml/parserInternals.h>#include <libxml/xpathInternals.h>#include <libxml/xpath.h>#include "xslt.h"#include "xsltInternals.h"#include "pattern.h"#include "variables.h"#include "namespaces.h"#include "attributes.h"#include "xsltutils.h"#include "imports.h"#include "keys.h"#include "documents.h"#include "extensions.h"#include "preproc.h"#include "extra.h"#include "security.h"#include "xsltlocale.h"
Go to the source code of this file.
Macros | |
| #define | IN_LIBXSLT |
| #define | IS_BLANK(c) |
| #define | IS_BLANK_NODE(n) (((n)->type == XML_TEXT_NODE) && (xsltIsBlank((n)->content))) |
Functions | |
| static void | xsltParseContentError (xsltStylesheetPtr style, xmlNodePtr node) |
| static int | exclPrefixPush (xsltStylesheetPtr style, xmlChar *value) |
| static xmlChar * | exclPrefixPop (xsltStylesheetPtr style) |
| void | xsltInit (void) |
| void | xsltUninit (void) |
| int | xsltIsBlank (xmlChar *str) |
| static xsltDecimalFormatPtr | xsltNewDecimalFormat (const xmlChar *nsUri, xmlChar *name) |
| static void | xsltFreeDecimalFormat (xsltDecimalFormatPtr self) |
| static void | xsltFreeDecimalFormatList (xsltStylesheetPtr self) |
: the decimal-format name to find | |
xsltDecimalFormatGetByName: @style: the XSLT stylesheet Find decimal-format by name Returns the xsltDecimalFormatPtr | |
| xsltDecimalFormatPtr | xsltDecimalFormatGetByName (xsltStylesheetPtr style, xmlChar *name) |
Variables | |
| const char * | xsltEngineVersion = LIBXSLT_VERSION_STRING LIBXSLT_VERSION_EXTRA |
| const int | xsltLibxsltVersion = LIBXSLT_VERSION |
| const int | xsltLibxmlVersion = LIBXML_VERSION |
| static int | initialized = 0 |
|
static |
exclPrefixPop: @style: the transformation stylesheet
Pop an excluded prefix value from the stack
Returns the stored excluded prefix value
Definition at line 185 of file xslt.c.
Referenced by xsltPreprocessStylesheet().
|
static |
exclPrefixPush: @style: the transformation stylesheet @value: the excluded namespace name to push on the stack
Push an excluded namespace name on the stack
Returns the new index in the stack or -1 if already present or in case of error
Definition at line 150 of file xslt.c.
Referenced by xsltParseStylesheetExcludePrefix().
| int xsltAllocateExtra | ( | xsltStylesheetPtr | style | ) |
xsltAllocateExtra: @style: an XSLT stylesheet
Allocate an extra runtime information slot statically while compiling the stylesheet and return its number
Returns the number of the slot
Definition at line 824 of file xslt.c.
Referenced by xsltCompMatchAdd().
| int xsltAllocateExtraCtxt | ( | xsltTransformContextPtr | ctxt | ) |
xsltAllocateExtraCtxt: @ctxt: an XSLT transformation context
Allocate an extra runtime information slot at run-time and return its number This make sure there is a slot ready in the transformation context
Returns the number of the slot
Definition at line 840 of file xslt.c.
Referenced by xsltCompMatchAdd().
|
static |
xsltCleanupStylesheetTree:
@doc: the document-node @node: the element where the stylesheet is rooted at
Actually @node need not be the document-element, but currently Libxslt does not support embedded stylesheets.
Returns 0 if OK, -1 on API or internal errors.
Definition at line 910 of file xslt.c.
Referenced by xsltFreeStylesheet(), and xsltParseStylesheetUser().
| xsltDecimalFormatPtr xsltDecimalFormatGetByName | ( | xsltStylesheetPtr | style, |
| xmlChar * | name | ||
| ) |
| xsltDecimalFormatPtr xsltDecimalFormatGetByQName | ( | xsltStylesheetPtr | style, |
| const xmlChar * | nsUri, | ||
| const xmlChar * | name | ||
| ) |
Definition at line 379 of file xslt.c.
Referenced by xsltFormatNumberFunction(), and xsltParseStylesheetDecimalFormat().
|
static |
Definition at line 293 of file xslt.c.
Referenced by xsltFreeDecimalFormatList().
|
static |
Definition at line 323 of file xslt.c.
Referenced by xsltFreeStylesheet().
| void xsltFreeStylesheet | ( | xsltStylesheetPtr | style | ) |
xsltFreeStylesheet: @style: an XSLT stylesheet
Free up the memory allocated by @style
Definition at line 965 of file xslt.c.
Referenced by node_transform_node_params(), xsltDocumentElem(), xsltFreeStylesheetList(), xsltNewStylesheetInternal(), and xsltParseStylesheetImportedDoc().
|
static |
xsltFreeStylesheetList: @style: an XSLT stylesheet list
Free up the memory allocated by the list @style
Definition at line 888 of file xslt.c.
Referenced by xsltFreeStylesheet().
|
static |
xsltFreeTemplate: @template: an XSLT template
Free up the memory allocated by @template
Definition at line 430 of file xslt.c.
Referenced by xsltFreeTemplateList().
|
static |
xsltFreeTemplateList: @template: an XSLT template list
Free up the memory allocated by all the elements of @template
Definition at line 460 of file xslt.c.
Referenced by xsltFreeStylesheet().
|
static |
xsltGatherNamespaces: @style: the XSLT stylesheet
Browse the stylesheet and build the namspace hash table which will be used for XPath interpretation. If needed do a bit of normalization
Definition at line 3682 of file xslt.c.
Referenced by xsltParseStylesheetUser().
|
static |
xsltGetInheritedNsList: @style: the stylesheet @template: the template @node: the current node
Search all the namespace applying to a given element except the ones from excluded output prefixes currently in scope. Initialize the template inheritedNs list with it.
Returns the number of entries found
Definition at line 1101 of file xslt.c.
Referenced by xsltParseStylesheetTemplate().
xsltInit:
Initializes the processor (e.g. registers built-in extensions, etc.)
Definition at line 216 of file xslt.c.
Referenced by init_libxslt(), and xsltNewStylesheetInternal().
xsltIsBlank: @str: a string
Check if a string is ignorable
Returns 1 if the string is NULL or made of blanks chars, 0 otherwise
Definition at line 249 of file xslt.c.
Referenced by xsltVariableComp().
| xsltStylesheetPtr xsltLoadStylesheetPI | ( | xmlDocPtr | doc | ) |
xsltLoadStylesheetPI: @doc: a document to process
This function tries to locate the stylesheet PI in the given document If found, and if contained within the document, it will extract that subtree to build the stylesheet to process @doc (doc itself will be modified). If found but referencing an external document it will attempt to load it and generate a stylesheet from it. In both cases, the resulting stylesheet and the document need to be freed once the transformation is done.
Returns a new XSLT stylesheet structure or NULL if not found.
Definition at line 6915 of file xslt.c.
|
static |
Definition at line 265 of file xslt.c.
Referenced by xsltNewStylesheetInternal(), and xsltParseStylesheetDecimalFormat().
| xsltStylesheetPtr xsltNewStylesheet | ( | void | ) |
xsltNewStylesheet:
Create a new XSLT Stylesheet
Returns the newly allocated xsltStylesheetPtr or NULL in case of error
Definition at line 810 of file xslt.c.
Referenced by xsltDocumentElem().
|
static |
xsltNewStylesheetInternal: @parent: the parent stylesheet or NULL
Create a new XSLT Stylesheet
Returns the newly allocated xsltStylesheetPtr or NULL in case of error
Definition at line 745 of file xslt.c.
Referenced by xsltNewStylesheet(), and xsltParseStylesheetImportedDoc().
|
static |
xsltNewTemplate:
Create a new XSLT Template
Returns the newly allocated xsltTemplatePtr or NULL in case of error
Definition at line 409 of file xslt.c.
Referenced by xsltParseStylesheetProcess(), and xsltParseStylesheetTemplate().
|
static |
xsltParseContentError:
@style: the stylesheet @node: the node where the error occured
Compile-time error function.
Definition at line 120 of file xslt.c.
Referenced by xsltParseStylesheetDecimalFormat(), xsltParseStylesheetKey(), xsltParseStylesheetOutput(), xsltParseStylesheetPreserveSpace(), and xsltParseStylesheetStripSpace().
|
static |
xsltParseStylesheetDecimalFormat: @style: the XSLT stylesheet @cur: the "decimal-format" element
<xsl:decimal-format name = qname, decimal-separator = char, grouping-separator = char, infinity = string, minus-sign = char, NaN = string, percent = char per-mille = char, zero-digit = char, digit = char, pattern-separator = char />
parse an XSLT stylesheet decimal-format element and and record the formatting characteristics
Definition at line 1405 of file xslt.c.
Referenced by xsltParseStylesheetTop().
| xsltStylesheetPtr xsltParseStylesheetDoc | ( | xmlDocPtr | doc | ) |
xsltParseStylesheetDoc: @doc: an xmlDoc parsed XML
parse an XSLT stylesheet, building the associated structures. doc is kept as a reference within the returned stylesheet, so changes to doc after the parsing will be reflected when the stylesheet is applied, and the doc is automatically freed when the stylesheet is closed.
Returns a new XSLT stylesheet structure.
Definition at line 6736 of file xslt.c.
Referenced by node_transform_node_params(), xsltLoadStylesheetPI(), and xsltParseStylesheetFile().
|
static |
xsltParseStylesheetExcludePrefix: @style: the XSLT stylesheet @cur: the current point in the stylesheet
parse an XSLT stylesheet exclude prefix and record namespaces needing stripping
Returns the number of Excluded prefixes added at that level
Definition at line 1743 of file xslt.c.
Referenced by xsltParseStylesheetProcess(), and xsltPreprocessStylesheet().
|
static |
xsltParseStylesheetExtPrefix: @style: the XSLT stylesheet @template: the "extension-element-prefixes" prefix
parse an XSLT stylesheet's "extension-element-prefix" attribute value and register the namespaces of extension instruction. SPEC "A namespace is designated as an extension namespace by using an extension-element-prefixes attribute on: 1) an xsl:stylesheet element 2) an xsl:extension-element-prefixes attribute on a literal result element 3) an extension instruction."
Definition at line 1607 of file xslt.c.
Referenced by xsltParseStylesheetProcess().
| xsltStylesheetPtr xsltParseStylesheetFile | ( | const xmlChar * | filename | ) |
xsltParseStylesheetFile: @filename: the filename/URL to the stylesheet
Load and parse an XSLT stylesheet
Returns a new XSLT stylesheet structure.
Definition at line 6752 of file xslt.c.
Referenced by xsltLoadStylesheetPI().
| xsltStylesheetPtr xsltParseStylesheetImportedDoc | ( | xmlDocPtr | doc, |
| xsltStylesheetPtr | parentStyle | ||
| ) |
xsltParseStylesheetImportedDoc: @doc: an xmlDoc parsed XML @parentStyle: pointer to the parent stylesheet (if it exists)
parse an XSLT stylesheet building the associated structures except the processing not needed for imported documents.
Returns a new XSLT stylesheet structure.
Definition at line 6555 of file xslt.c.
Referenced by xsltParseStylesheetDoc(), and xsltParseStylesheetImport().
|
static |
xsltParseStylesheetKey: @style: the XSLT stylesheet @key: the "key" element
<xsl:key name = qname, match = pattern, use = expression />
parse an XSLT stylesheet key definition and register it
Definition at line 5120 of file xslt.c.
Referenced by xsltParseStylesheetTop().
| void xsltParseStylesheetOutput | ( | xsltStylesheetPtr | style, |
| xmlNodePtr | cur | ||
| ) |
xsltParseStylesheetOutput: @style: the XSLT stylesheet @cur: the "output" element
parse an XSLT stylesheet output element and record information related to the stylesheet output
Definition at line 1185 of file xslt.c.
Referenced by xsltParseStylesheetTop().
xsltParseStylesheetPI: @value: the value of the PI
This function checks that the type is text/xml and extracts the URI-Reference for the stylesheet
Returns the URI-Reference for the stylesheet or NULL (it need to be freed by the caller)
Definition at line 6824 of file xslt.c.
Referenced by xsltLoadStylesheetPI().
|
static |
xsltParseStylesheetPreserveSpace: @style: the XSLT stylesheet @cur: the "preserve-space" element
parse an XSLT stylesheet preserve-space element and record elements needing preserving
Definition at line 1532 of file xslt.c.
Referenced by xsltParseStylesheetTop().
| xsltStylesheetPtr xsltParseStylesheetProcess | ( | xsltStylesheetPtr | ret, |
| xmlDocPtr | doc | ||
| ) |
xsltParseStylesheetProcess: @ret: the XSLT stylesheet (the current stylesheet-level) @doc: and xmlDoc parsed XML
Parses an XSLT stylesheet, adding the associated structures. Called by: xsltParseStylesheetImportedDoc() (xslt.c) xsltParseStylesheetInclude() (imports.c)
Returns the value of the @style parameter if everything went right, NULL if something went amiss.
Definition at line 6447 of file xslt.c.
Referenced by xsltParseStylesheetInclude(), and xsltParseStylesheetUser().
|
static |
xsltParseStylesheetStripSpace: @style: the XSLT stylesheet @cur: the "strip-space" element
parse an XSLT stylesheet's strip-space element and record the elements needing stripping
Definition at line 1673 of file xslt.c.
Referenced by xsltParseStylesheetTop().
|
static |
xsltParseStylesheetTemplate: @style: the XSLT stylesheet @template: the "template" element
parse an XSLT stylesheet template building the associated structures
Definition at line 5372 of file xslt.c.
Referenced by xsltParseStylesheetTop().
|
static |
xsltParseStylesheetTop: @style: the XSLT stylesheet @top: the top level "stylesheet" or "transform" element
scan the top level elements of an XSL stylesheet
Definition at line 6106 of file xslt.c.
Referenced by xsltParseStylesheetProcess().
| int xsltParseStylesheetUser | ( | xsltStylesheetPtr | style, |
| xmlDocPtr | doc | ||
| ) |
xsltParseStylesheetUser: @style: pointer to the stylesheet @doc: an xmlDoc parsed XML
Parse an XSLT stylesheet with a user-provided stylesheet struct.
Returns 0 if successful, -1 in case of error.
Definition at line 6584 of file xslt.c.
Referenced by xsltParseStylesheetImportedDoc().
| void xsltParseTemplateContent | ( | xsltStylesheetPtr | style, |
| xmlNodePtr | templ | ||
| ) |
xsltParseTemplateContent: @style: the XSLT stylesheet @templ: the container node (can be a document for literal results)
parse a template content-model Clean-up the template content from unwanted ignorable blank nodes and process xslt:text
Definition at line 4894 of file xslt.c.
Referenced by xsltParseGlobalParam(), xsltParseGlobalVariable(), xsltParseStylesheetAttributeSet(), xsltParseStylesheetProcess(), and xsltParseStylesheetTemplate().
|
static |
Definition at line 3477 of file xslt.c.
Referenced by xsltParseStylesheetProcess(), and xsltPreprocessStylesheet().
xsltUninit:
Uninitializes the processor.
Definition at line 232 of file xslt.c.
Referenced by xsltCleanupGlobals().
|
static |
Definition at line 208 of file xslt.c.
Referenced by xsltInit(), and xsltUninit().
| const char* xsltEngineVersion = LIBXSLT_VERSION_STRING LIBXSLT_VERSION_EXTRA |
| const int xsltLibxmlVersion = LIBXML_VERSION |
| const int xsltLibxsltVersion = LIBXSLT_VERSION |