14 #define WITH_XSLT_DEBUG_ATTRIBUTES 15 #ifdef WITH_XSLT_DEBUG 16 #define WITH_XSLT_DEBUG_ATTRIBUTES 26 #define IS_BLANK(c) (((c) == 0x20) || ((c) == 0x09) || ((c) == 0xA) || \ 29 #define IS_BLANK_NODE(n) \ 30 (((n)->type == XML_TEXT_NODE) && (xsltIsBlank((n)->content))) 32 #define ATTRSET_UNRESOLVED 0 33 #define ATTRSET_RESOLVING 1 34 #define ATTRSET_RESOLVED 2 99 "xsltNewAttrElem : malloc failed\n");
180 "xsltNewUseAttrSet : malloc failed\n");
184 cur->ncname = ncname;
238 if ((
cur->ncname == ncname) && (
cur->ns ==
ns))
264 "xsltNewAttrSet : malloc failed\n");
301 while (old !=
NULL) {
311 if ((curComp->
name == oldComp->
name) &&
312 (curComp->
ns == oldComp->
ns)) {
362 "xsl:attribute-set : name is missing\n");
368 if (xmlValidateQName(
value, 0)) {
370 "xsl:attribute-set : The name '%s' is not a valid QName.\n",
380 if (prefix !=
NULL) {
384 "xsl:attribute-set : No namespace found for QName '%s:%s'\n",
393 #ifdef WITH_XSLT_DEBUG_ATTRIBUTES 395 "creating attribute set table\n");
424 "xsl:attribute-set : unexpected child %s\n",
428 "xsl:attribute-set : child of unexpected type\n");
431 "xsl:attribute-set : unexpected child xsl:%s\n",
434 #ifdef WITH_XSLT_DEBUG_ATTRIBUTES 436 "add attribute to list %s\n", ncname);
440 #ifdef XSLT_REFACTORED 441 xsltParseSequenceConstructor(XSLT_CCTXT(
style),
449 "xsl:attribute-set : internal error, attribute %s not " 450 "compiled\n",
child->name);
465 const xmlChar *curval, *endval;
467 while (*curval != 0) {
472 while ((*endval != 0) && (!
IS_BLANK(*endval))) endval++;
479 #ifdef WITH_XSLT_DEBUG_ATTRIBUTES 481 "xsl:attribute-set : %s adds use %s\n", ncname, curval);
484 if (xmlValidateQName(curval, 0)) {
486 "xsl:attribute-set : The name '%s' in " 487 "use-attribute-sets is not a valid QName.\n", curval);
494 if (prefix2 !=
NULL) {
498 "xsl:attribute-set : No namespace found for QName " 499 "'%s:%s' in use-attribute-sets\n",
516 #ifdef WITH_XSLT_DEBUG_ATTRIBUTES 518 "updated attribute list %s\n", ncname);
538 while (use !=
NULL) {
544 if (
cur->attributeSets) {
587 "xsl:attribute-set : use-attribute-sets recursion detected" 595 "xsl:attribute-set : use-attribute-sets maximum recursion " 596 "depth exceeded on %s\n",
name);
608 if (
cur->attributeSets !=
NULL) {
612 #ifdef WITH_XSLT_DEBUG_ATTRIBUTES 614 "xsl:attribute-set : merging import for %s\n",
name);
650 if (
style != topStyle) {
657 "xsl:attribute-set : internal error, can't move imported " 658 " attribute set %s\n",
name);
674 #ifdef WITH_XSLT_DEBUG_ATTRIBUTES 676 "Resolving attribute sets references\n");
681 if (
cur->attributeSets !=
NULL) {
683 #ifdef WITH_XSLT_DEBUG_ATTRIBUTES 685 "creating attribute set table\n");
721 #ifdef XSLT_REFACTORED 722 xsltStyleItemAttributePtr comp =
723 (xsltStyleItemAttributePtr) castedComp;
734 if ((ctxt ==
NULL) || (contextNode ==
NULL) || (inst ==
NULL) ||
759 "Internal error in xsltAttribute(): " 760 "The XSLT 'attribute' instruction was not compiled.\n");
777 targetElem = ctxt->
insert;
797 "xsl:attribute: Cannot add attributes to an " 798 "element if children have been already added " 799 "to the element.\n");
819 "xsl:attribute: The attribute 'name' is missing.\n");
822 if (xmlValidateQName(prop, 0)) {
824 "xsl:attribute: The effective name '%s' is not a " 825 "valid QName.\n", prop);
834 "xsl:attribute: The effective name 'xmlns' is not allowed.\n");
845 #ifdef XSLT_REFACTORED 846 prefix = comp->nsPrefix;
867 if (comp->
ns[0] != 0)
885 if ((tmpNsName !=
NULL) && (tmpNsName[0] != 0))
892 "xsl:attribute: Namespace http://www.w3.org/2000/xmlns/ " 901 }
else if (prefix !=
NULL) {
916 "xsl:attribute: The QName '%s:%s' has no " 917 "namespace binding in scope in the stylesheet; " 918 "this is an error, since the namespace was not " 919 "specified by the instruction itself.\n", prefix,
name);
940 if (nsName !=
NULL) {
944 ns = xsltTreeAcquireStoredNs(some doc, nsName, prefix);
949 if (nsName !=
NULL) {
974 "Namespace fixup error: Failed to acquire an in-scope " 975 "namespace binding for the generated attribute '{%s}%s'.\n",
1010 if (copyTxt ==
NULL)
1029 if (copyTxt ==
NULL)
1032 attr->children =
attr->last = copyTxt;
1092 const xmlChar *curstr, *endstr;
1096 if (attrSets ==
NULL) {
1105 attrSets = ((
xmlAttrPtr) inst)->children->content;
1108 if (attrSets ==
NULL) {
1120 while (*curstr != 0) {
1126 while ((*endstr != 0) && (!
IS_BLANK(*endstr)))
1133 #ifdef WITH_XSLT_DEBUG_ATTRIBUTES 1135 "apply attribute set %s\n", curstr);
1138 if (xmlValidateQName(curstr, 0)) {
1140 "The name '%s' in use-attribute-sets is not a valid " 1141 "QName.\n", curstr);
1146 if (prefix !=
NULL) {
1150 "use-attribute-set : No namespace found for QName " 1151 "'%s:%s'\n", prefix, ncname);
1159 #ifdef WITH_DEBUGGER
struct _xsltAttrElem * next
static void xsltFreeAttrSet(xsltAttrSetPtr set)
void xsltAttribute(xsltTransformContextPtr ctxt, xmlNodePtr contextNode, xmlNodePtr inst, xsltElemPreCompPtr castedComp)
xsltAttrElem * xsltAttrElemPtr
static void xsltResolveUseAttrSets(xsltAttrSetPtr set, xsltStylesheetPtr topStyle, int depth)
static xsltAttrSetPtr xsltNewAttrSet()
xsltStylesheetPtr xsltNextImport(xsltStylesheetPtr cur)
XMLPUBFUN int XMLCALL xmlHashAddEntry2(xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, void *userdata)
static void xsltFreeUseAttrSetList(xsltUseAttrSetPtr list)
static xsltUseAttrSetPtr xsltNewUseAttrSet(const xmlChar *ncname, const xmlChar *ns)
static xsltAttrElemPtr xsltNewAttrElem(xmlNodePtr attr)
static xsltUseAttrSetPtr xsltAddUseAttrSetList(xsltUseAttrSetPtr list, const xmlChar *ncname, const xmlChar *ns)
static void xsltResolveSASCallback(void *payload, void *data, const xmlChar *name, const xmlChar *ns, ATTRIBUTE_UNUSED const xmlChar *ignored)
xmlNsPtr xsltGetSpecialNamespace(xsltTransformContextPtr ctxt, xmlNodePtr invocNode, const xmlChar *nsName, const xmlChar *nsPrefix, xmlNodePtr target)
XMLPUBFUN void *XMLCALL xmlHashLookup2(xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2)
xsltAttrSetContext * xsltAttrSetContextPtr
xmlChar * xsltEvalAttrValueTemplate(xsltTransformContextPtr ctxt, xmlNodePtr inst, const xmlChar *name, const xmlChar *ns)
xsltStylesheetPtr topStyle
XMLPUBFUN void XMLCALL xmlHashFree(xmlHashTablePtr table, xmlHashDeallocator f)
xmlGenericErrorFunc xsltGenericError
XMLPUBFUN xmlNsPtr XMLCALL xmlSearchNs(xmlDocPtr doc, xmlNodePtr node, const xmlChar *nameSpace)
static void xsltResolveAttrSet(xsltAttrSetPtr set, xsltStylesheetPtr topStyle, xsltStylesheetPtr style, const xmlChar *name, const xmlChar *ns, int depth)
xsltUseAttrSetPtr useAttrSets
#define XML_XML_NAMESPACE
xsltUseAttrSet * xsltUseAttrSetPtr
static UINT set(struct ID3DXConstantTableImpl *table, IDirect3DDevice9 *device, struct ctab_constant *constant, const void **indata, D3DXPARAMETER_TYPE intype, UINT *size, UINT incol, D3DXPARAMETER_CLASS inclass, UINT index, BOOL is_pointer)
void xsltStylePreCompute(xsltStylesheetPtr style, xmlNodePtr inst)
void * xsltGenericDebugContext
static xsltAttrElemPtr xsltAddAttrElemList(xsltAttrElemPtr list, xmlNodePtr attr)
const xmlChar * xsltSplitQName(xmlDictPtr dict, const xmlChar *name, const xmlChar **prefix)
XMLPUBFUN int XMLCALL xmlHashRemoveEntry2(xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, xmlHashDeallocator f)
XMLPUBVAR xmlFreeFunc xmlFree
XMLPUBFUN xmlChar *XMLCALL xmlGetNsProp(const xmlNode *node, const xmlChar *name, const xmlChar *nameSpace)
XMLPUBFUN const xmlChar *XMLCALL xmlDictLookup(xmlDictPtr dict, const xmlChar *name, int len)
xmlGenericErrorFunc xsltGenericDebug
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
XMLPUBFUN xmlHashTablePtr XMLCALL xmlHashCreate(int size)
void * xsltGenericErrorContext
void xsltApplyAttributeSet(xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst, const xmlChar *attrSets)
GLint GLint GLsizei GLsizei GLsizei depth
void xsltFreeAttributeSetsHashes(xsltStylesheetPtr style)
XMLPUBFUN void XMLCALL xmlHashScanFull(xmlHashTablePtr table, xmlHashScannerFull f, void *data)
XMLPUBFUN int XMLCALL xmlIsID(xmlDocPtr doc, xmlNodePtr elem, xmlAttrPtr attr)
GLsizei const GLfloat * value
XMLPUBFUN xmlIDPtr XMLCALL xmlAddID(xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar *value, xmlAttrPtr attr)
static void xsltFreeAttrElem(xsltAttrElemPtr attr)
xsltAttrSet * xsltAttrSetPtr
xsltStylePreComp * xsltStylePreCompPtr
static void xsltFreeUseAttrSet(xsltUseAttrSetPtr use)
XMLPUBFUN xmlNodePtr XMLCALL xmlNewText(const xmlChar *content)
static unsigned __int64 next
#define ATTRSET_RESOLVING
struct _xsltUseAttrSet * next
static void xsltFreeAttributeSetsEntry(void *payload, const xmlChar *name ATTRIBUTE_UNUSED)
XMLPUBVAR const xmlChar xmlStringTextNoenc[]
XMLPUBVAR xmlMallocFunc xmlMalloc
void xsltResolveStylesheetAttributeSet(xsltStylesheetPtr style)
xmlHashTablePtr attributeSets
struct _xmlNode * children
xmlChar * xsltEvalTemplateString(xsltTransformContextPtr ctxt, xmlNodePtr contextNode, xmlNodePtr inst)
static void xsltFreeAttrElemList(xsltAttrElemPtr list)
XMLPUBFUN int XMLCALL xmlStrEqual(const xmlChar *str1, const xmlChar *str2)
static void xsltMergeAttrSets(xsltAttrSetPtr set, xsltAttrSetPtr other)
void xsltTransformError(xsltTransformContextPtr ctxt, xsltStylesheetPtr style, xmlNodePtr node, const char *msg,...)
void xsltParseTemplateContent(xsltStylesheetPtr style, xmlNodePtr templ)
#define IS_XSLT_NAME(n, val)
XMLPUBFUN xmlChar *XMLCALL xmlStrdup(const xmlChar *cur)
void xsltParseStylesheetAttributeSet(xsltStylesheetPtr style, xmlNodePtr cur)