ReactOS  0.4.14-dev-77-gd9e7c48
extra.c File Reference
#include "precomp.h"
Include dependency graph for extra.c:

Go to the source code of this file.

Functions

void xsltDebug (xsltTransformContextPtr ctxt, xmlNodePtr node ATTRIBUTE_UNUSED, xmlNodePtr inst ATTRIBUTE_UNUSED, xsltElemPreCompPtr comp ATTRIBUTE_UNUSED)
 
void xsltFunctionNodeSet (xmlXPathParserContextPtr ctxt, int nargs)
 
void xsltRegisterExtras (xsltTransformContextPtr ctxt ATTRIBUTE_UNUSED)
 
void xsltRegisterAllExtras (void)
 

Function Documentation

◆ xsltDebug()

void xsltDebug ( xsltTransformContextPtr  ctxt,
xmlNodePtr node  ATTRIBUTE_UNUSED,
xmlNodePtr inst  ATTRIBUTE_UNUSED,
xsltElemPreCompPtr comp  ATTRIBUTE_UNUSED 
)

xsltDebug: @ctxt: an XSLT processing context @node: The current node @inst: the instruction in the stylesheet @comp: precomputed information

Process an debug node

Definition at line 35 of file extra.c.

38 {
39  int i, j;
40 
42  for (i = 0, j = ctxt->templNr - 1; ((i < 15) && (j >= 0)); i++, j--) {
44  if (ctxt->templTab[j]->name != NULL)
46  ctxt->templTab[j]->name);
47  if (ctxt->templTab[j]->match != NULL)
49  ctxt->templTab[j]->match);
50  if (ctxt->templTab[j]->mode != NULL)
52  ctxt->templTab[j]->mode);
54  }
56  for (i = 0, j = ctxt->varsNr - 1; ((i < 15) && (j >= 0)); i++, j--) {
57  xsltStackElemPtr cur;
58 
59  if (ctxt->varsTab[j] == NULL)
60  continue;
62  cur = ctxt->varsTab[j];
63  while (cur != NULL) {
64  if (cur->comp == NULL) {
66  "corrupted !!!\n");
67  } else if (cur->comp->type == XSLT_FUNC_PARAM) {
69  } else if (cur->comp->type == XSLT_FUNC_VARIABLE) {
71  }
72  if (cur->name != NULL)
74  cur->name);
75  else
77 #ifdef LIBXML_DEBUG_ENABLED
78  if (cur->value != NULL) {
81  xmlXPathDebugDumpObject((FILE*)xsltGenericDebugContext,
82  cur->value, 1);
83  } else {
85  }
86 #endif
88  cur = cur->next;
89  }
90 
91  }
92 }
const xmlChar * mode
const xmlChar * name
struct _xsltStackElem * next
FILE * stdout
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
xmlGenericErrorFunc xsltGenericError
Definition: xsltutils.c:502
xsltTemplatePtr * templTab
smooth NULL
Definition: ftsmooth.c:416
xsltStyleType type
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
void * xsltGenericDebugContext
Definition: xsltutils.c:549
void * xsltGenericErrorContext
Definition: xsltutils.c:503
xsltStylePreCompPtr comp
xsltStackElemPtr * varsTab
xmlXPathObjectPtr value
FILE * stderr
xmlChar * match
const xmlChar * name

Referenced by xsltApplySequenceConstructor(), xsltApplyXSLTTemplate(), xsltRegisterAllElement(), and xsltRegisterAllExtras().

◆ xsltFunctionNodeSet()

void xsltFunctionNodeSet ( xmlXPathParserContextPtr  ctxt,
int  nargs 
)

xsltFunctionNodeSet: @ctxt: the XPath Parser context @nargs: the number of arguments

Implement the node-set() XSLT function node-set node-set(result-tree)

This function is available in libxslt, saxon or xt namespace.

Definition at line 111 of file extra.c.

111  {
112  if (nargs != 1) {
114  "node-set() : expects one result-tree arg\n");
115  ctxt->error = XPATH_INVALID_ARITY;
116  return;
117  }
118  if ((ctxt->value == NULL) ||
119  ((ctxt->value->type != XPATH_XSLT_TREE) &&
120  (ctxt->value->type != XPATH_NODESET))) {
122  "node-set() invalid arg expecting a result tree\n");
123  ctxt->error = XPATH_INVALID_TYPE;
124  return;
125  }
126  if (ctxt->value->type == XPATH_XSLT_TREE) {
127  ctxt->value->type = XPATH_NODESET;
128  }
129 }
smooth NULL
Definition: ftsmooth.c:416
xsltTransformContextPtr xsltXPathGetTransformContext(xmlXPathParserContextPtr ctxt)
Definition: extensions.c:1367
void xsltTransformError(xsltTransformContextPtr ctxt, xsltStylesheetPtr style, xmlNodePtr node, const char *msg,...)
Definition: xsltutils.c:678

Referenced by xsltRegisterAllExtras().

◆ xsltRegisterAllExtras()

void xsltRegisterAllExtras ( void  )

xsltRegisterAllExtras:

Registers the built-in extensions

Definition at line 149 of file extra.c.

149  {
150  xsltRegisterExtModuleFunction((const xmlChar *) "node-set",
153  xsltRegisterExtModuleFunction((const xmlChar *) "node-set",
156  xsltRegisterExtModuleFunction((const xmlChar *) "node-set",
159  xsltRegisterExtModuleElement((const xmlChar *) "debug",
161  NULL,
162  xsltDebug);
163  xsltRegisterExtModuleElement((const xmlChar *) "output",
167  xsltRegisterExtModuleElement((const xmlChar *) "write",
171  xsltRegisterExtModuleElement((const xmlChar *) "document",
175  xsltRegisterExtModuleElement((const xmlChar *) "document",
179 }
#define XSLT_NAMESPACE
Definition: xslt.h:46
void xsltDocumentElem(xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst, xsltElemPreCompPtr castedComp)
Definition: transform.c:3335
#define XSLT_XT_NAMESPACE
Definition: extra.h:41
smooth NULL
Definition: ftsmooth.c:416
#define XSLT_SAXON_NAMESPACE
Definition: extra.h:34
int xsltRegisterExtModuleFunction(const xmlChar *name, const xmlChar *URI, xmlXPathFunction function)
Definition: extensions.c:1385
#define XSLT_LIBXSLT_NAMESPACE
Definition: extra.h:27
unsigned char xmlChar
Definition: xmlstring.h:28
xsltElemPreCompPtr xsltDocumentComp(xsltStylesheetPtr style, xmlNodePtr inst, xsltTransformFunction function ATTRIBUTE_UNUSED)
Definition: preproc.c:508
void xsltFunctionNodeSet(xmlXPathParserContextPtr ctxt, int nargs)
Definition: extra.c:111
void xsltDebug(xsltTransformContextPtr ctxt, xmlNodePtr node ATTRIBUTE_UNUSED, xmlNodePtr inst ATTRIBUTE_UNUSED, xsltElemPreCompPtr comp ATTRIBUTE_UNUSED)
Definition: extra.c:35
#define XSLT_XALAN_NAMESPACE
Definition: extra.h:48
int xsltRegisterExtModuleElement(const xmlChar *name, const xmlChar *URI, xsltPreComputeFunction precomp, xsltTransformFunction transform)
Definition: extensions.c:1623

Referenced by xsltInit(), and xsltRegisterExtras().

◆ xsltRegisterExtras()

void xsltRegisterExtras ( xsltTransformContextPtr ctxt  ATTRIBUTE_UNUSED)

xsltRegisterExtras: @ctxt: a XSLT process context

Registers the built-in extensions. This function is deprecated, use xsltRegisterAllExtras instead.

Definition at line 139 of file extra.c.

139  {
141 }
void xsltRegisterAllExtras(void)
Definition: extra.c:149