Go to the source code of this file.
◆ MAX_AVT_SEG
◆ xsltAttrVT
◆ xsltAttrVTPtr
◆ xsltCompileAttr()
xsltCompileAttr: @style: a XSLT process context @attr: the attribute coming from the stylesheet.
Precompile an attribute in a stylesheet, basically it checks if it is an attribute value template, and if yes, establish some structures needed to process it at transformation time.
Definition at line 168 of file attrvt.c.
174 int i = 0, lastavt = 0;
181 "Attribute '%s': The content is expected to be a single text " 182 "node when compiling an AVT.\n",
attr->
name);
190 #ifdef WITH_XSLT_DEBUG_AVT 195 #ifdef WITH_XSLT_DEBUG_AVT 197 "AVT %s: already compiled\n",
attr->
name);
219 if (*(
cur+1) ==
'{') {
226 if (*(
cur+1) ==
'}') {
244 while ((*
cur != 0) && (*
cur !=
'}')) {
246 if ((*
cur ==
'\'') || (*
cur ==
'"')) {
247 char delim = *(
cur++);
248 while ((*
cur != 0) && (*
cur != delim))
257 "Attribute '%s': The AVT has an unmatched '{'.\n",
271 xmlXPathCompExprPtr comp;
276 "Attribute '%s': Failed to compile the expression " 295 }
else if (*
cur ==
'}') {
304 "Attribute '%s': The AVT has an unmatched '}'.\n",
324 "xsltCompileAttr: malloc problem\n");
326 if (
attr->psvi != avt) {
XMLPUBFUN xmlChar *XMLCALL xmlStrndup(const xmlChar *cur, int len)
xmlXPathCompExprPtr xsltXPathCompile(xsltStylesheetPtr style, const xmlChar *str)
XMLPUBFUN const xmlChar *XMLCALL xmlStrchr(const xmlChar *str, xmlChar val)
void * xsltGenericDebugContext
XMLPUBFUN xmlChar *XMLCALL xmlStrncat(xmlChar *cur, const xmlChar *add, int len)
XMLPUBVAR xmlFreeFunc xmlFree
xmlGenericErrorFunc xsltGenericDebug
static xsltAttrVTPtr xsltSetAttrVTsegment(xsltAttrVTPtr avt, void *val)
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
static xsltAttrVTPtr xsltNewAttrVT(xsltStylesheetPtr style)
void xsltTransformError(xsltTransformContextPtr ctxt, xsltStylesheetPtr style, xmlNodePtr node, const char *msg,...)
Referenced by xsltParseTemplateContent().
◆ xsltEvalAVT()
xsltEvalAVT: @ctxt: the XSLT transformation context @avt: the prevompiled attribute value template info @node: the node hosting the attribute
Process the given AVT, and return the new string value.
Returns the computed string value or NULL, must be deallocated by the caller.
Definition at line 356 of file attrvt.c.
358 xmlXPathCompExprPtr comp;
366 for (
i = 0;
i <
cur->nb_seg;
i++) {
370 comp = (xmlXPathCompExprPtr)
cur->segments[
i];
XMLPUBFUN xmlChar *XMLCALL xmlStrcat(xmlChar *cur, const xmlChar *add)
XMLPUBVAR xmlFreeFunc xmlFree
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
xmlChar * xsltEvalXPathStringNs(xsltTransformContextPtr ctxt, xmlXPathCompExprPtr comp, int nsNr, xmlNsPtr *nsList)
xsltAttrVT * xsltAttrVTPtr
Referenced by xsltAttrListTemplateProcess(), and xsltAttrTemplateProcess().
◆ xsltFreeAttrVT()
xsltFreeAttrVT: @avt: pointer to an xsltAttrVT structure
Free up the memory associated to the attribute value template
Definition at line 89 of file attrvt.c.
92 if (avt ==
NULL)
return;
99 xmlXPathFreeCompExpr((xmlXPathCompExprPtr) avt->
segments[
i]);
102 xmlXPathFreeCompExpr((xmlXPathCompExprPtr) avt->
segments[
i]);
XMLPUBVAR xmlFreeFunc xmlFree
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
Referenced by xsltFreeAVTList(), and xsltSetAttrVTsegment().
◆ xsltFreeAVTList()
xsltFreeAVTList: @avt: pointer to an list of AVT structures
Free up the memory associated to the attribute value templates
Definition at line 119 of file attrvt.c.
static void xsltFreeAttrVT(xsltAttrVTPtr avt)
static unsigned __int64 next
xsltAttrVT * xsltAttrVTPtr
Referenced by xsltFreeStylesheet().
◆ xsltNewAttrVT()
xsltNewAttrVT: @style: a XSLT process context
Build a new xsltAttrVT structure
Returns the structure or NULL in case of error
Definition at line 56 of file attrvt.c.
63 "xsltNewAttrVTPtr : malloc failed\n");
struct _xsltAttrVT xsltAttrVT
XMLPUBVAR xmlMallocFunc xmlMalloc
xsltAttrVT * xsltAttrVTPtr
void xsltTransformError(xsltTransformContextPtr ctxt, xsltStylesheetPtr style, xmlNodePtr node, const char *msg,...)
Referenced by xsltCompileAttr().
◆ xsltSetAttrVTsegment()
xsltSetAttrVTsegment: @ avt: pointer to an xsltAttrVT structure @ val: the value to be set to the next available segment
Within xsltCompileAttr there are several places where a value needs to be added to the 'segments' array within the xsltAttrVT structure, and at each place the allocated size may have to be re-allocated. This routine takes care of that situation.
Returns the avt pointer, which may have been changed by a re-alloc
Definition at line 141 of file attrvt.c.
struct _xsltAttrVT xsltAttrVT
XMLPUBVAR xmlReallocFunc xmlRealloc
static void xsltFreeAttrVT(xsltAttrVTPtr avt)
xsltAttrVT * xsltAttrVTPtr
Referenced by xsltCompileAttr().