Home | History | Annotate | Download | only in libxslt

Lines Matching refs:comp

375  * @comp:  an XSLT Style precomputed block
377 * Free up the memory allocated by @comp
380 xsltFreeStylePreComp(xsltStylePreCompPtr comp) {
381 if (comp == NULL)
387 switch (comp->type) {
393 xsltStyleItemSortPtr item = (xsltStyleItemSortPtr) comp;
396 if (item->comp != NULL)
397 xmlXPathFreeCompExpr(item->comp);
411 xsltStyleItemCopyOfPtr item = (xsltStyleItemCopyOfPtr) comp;
412 if (item->comp != NULL)
413 xmlXPathFreeCompExpr(item->comp);
417 xsltStyleItemValueOfPtr item = (xsltStyleItemValueOfPtr) comp;
418 if (item->comp != NULL)
419 xmlXPathFreeCompExpr(item->comp);
430 (xsltStyleItemApplyTemplatesPtr) comp;
431 if (item->comp != NULL)
432 xmlXPathFreeCompExpr(item->comp);
438 xsltStyleItemIfPtr item = (xsltStyleItemIfPtr) comp;
439 if (item->comp != NULL)
440 xmlXPathFreeCompExpr(item->comp);
445 (xsltStyleItemForEachPtr) comp;
446 if (item->comp != NULL)
447 xmlXPathFreeCompExpr(item->comp);
454 (xsltStyleItemWithParamPtr) comp;
455 if (item->comp != NULL)
456 xmlXPathFreeCompExpr(item->comp);
461 (xsltStyleItemParamPtr) comp;
462 if (item->comp != NULL)
463 xmlXPathFreeCompExpr(item->comp);
468 (xsltStyleItemVariablePtr) comp;
469 if (item->comp != NULL)
470 xmlXPathFreeCompExpr(item->comp);
475 (xsltStyleItemWhenPtr) comp;
476 if (item->comp != NULL)
477 xmlXPathFreeCompExpr(item->comp);
492 if (comp->locale != (xsltLocale)0)
493 xsltFreeLocale(comp->locale);
494 if (comp->comp != NULL)
495 xmlXPathFreeCompExpr(comp->comp);
496 if (comp->nsList != NULL)
497 xmlFree(comp->nsList);
500 xmlFree(comp);
524 xsltStyleItemDocumentPtr comp;
526 xsltStylePreCompPtr comp;
543 comp = (xsltStyleItemDocumentPtr)
546 comp = xsltNewStylePreComp(style, XSLT_FUNC_DOCUMENT);
549 if (comp == NULL)
551 comp->inst = inst;
552 comp->ver11 = 0;
569 NULL, &comp->has_filename);
591 comp->ver11 = 1;
641 (const xmlChar *)"href", NULL, &comp->has_filename);
643 if (!comp->has_filename) {
646 comp->filename = filename;
649 return ((xsltElemPreCompPtr) comp);
668 xsltStyleItemSortPtr comp;
670 xsltStylePreCompPtr comp;
676 comp = (xsltStyleItemSortPtr) xsltNewStylePreComp(style, XSLT_FUNC_SORT);
678 comp = xsltNewStylePreComp(style, XSLT_FUNC_SORT);
681 if (comp == NULL)
683 inst->psvi = comp;
684 comp->inst = inst;
686 comp->stype = xsltEvalStaticAttrValueTemplate(style, inst,
688 NULL, &comp->has_stype);
689 if (comp->stype != NULL) {
690 if (xmlStrEqual(comp->stype, (const xmlChar *) "text"))
691 comp->number = 0;
692 else if (xmlStrEqual(comp->stype, (const xmlChar *) "number"))
693 comp->number = 1;
696 "xsltSortComp: no support for data-type = %s\n", comp->stype);
697 comp->number = 0; /* use default */
701 comp->order = xsltEvalStaticAttrValueTemplate(style, inst,
703 NULL, &comp->has_order);
704 if (comp->order != NULL) {
705 if (xmlStrEqual(comp->order, (const xmlChar *) "ascending"))
706 comp->descending = 0;
707 else if (xmlStrEqual(comp->order, (const xmlChar *) "descending"))
708 comp->descending = 1;
711 "xsltSortComp: invalid value %s for order\n", comp->order);
712 comp->descending = 0; /* use default */
716 comp->case_order = xsltEvalStaticAttrValueTemplate(style, inst,
718 NULL, &comp->has_use);
719 if (comp->case_order != NULL) {
720 if (xmlStrEqual(comp->case_order, (const xmlChar *) "upper-first"))
721 comp->lower_first = 0;
722 else if (xmlStrEqual(comp->case_order, (const xmlChar *) "lower-first"))
723 comp->lower_first = 1;
726 "xsltSortComp: invalid value %s for order\n", comp->order);
727 comp->lower_first = 0; /* use default */
732 comp->lang = xsltEvalStaticAttrValueTemplate(style, inst,
734 NULL, &comp->has_lang);
735 if (comp->lang != NULL) {
736 comp->locale = xsltNewLocale(comp->lang);
739 comp->locale = (xsltLocale)0;
742 comp->select = xsltGetCNsProp(style, inst,(const xmlChar *)"select", XSLT_NAMESPACE);
743 if (comp->select == NULL) {
749 comp->select = xmlDictLookup(style->dict, BAD_CAST ".", 1);
751 comp->comp = xsltXPathCompile(style, comp->select);
752 if (comp->comp == NULL) {
755 comp->select);
775 xsltStyleItemCopyPtr comp;
777 xsltStylePreCompPtr comp;
783 comp = (xsltStyleItemCopyPtr) xsltNewStylePreComp(style, XSLT_FUNC_COPY);
785 comp = xsltNewStylePreComp(style, XSLT_FUNC_COPY);
788 if (comp == NULL)
790 inst->psvi = comp;
791 comp->inst = inst;
794 comp->use = xsltGetCNsProp(style, inst, (const xmlChar *)"use-attribute-sets",
796 if (comp->use == NULL)
797 comp->has_use = 0;
799 comp->has_use = 1;
818 xsltStyleItemTextPtr comp;
820 xsltStylePreCompPtr comp;
828 comp = (xsltStyleItemTextPtr) xsltNewStylePreComp(style, XSLT_FUNC_TEXT);
830 comp = xsltNewStylePreComp(style, XSLT_FUNC_TEXT);
832 if (comp == NULL)
834 inst->psvi = comp;
835 comp->inst = inst;
836 comp->noescape = 0;
843 comp->noescape = 1;
864 xsltStyleItemElementPtr comp;
866 xsltStylePreCompPtr comp;
881 comp = (xsltStyleItemElementPtr) xsltNewStylePreComp(style, XSLT_FUNC_ELEMENT);
883 comp = xsltNewStylePreComp(style, XSLT_FUNC_ELEMENT);
886 if (comp == NULL)
888 inst->psvi = comp;
889 comp->inst = inst;
897 comp->name = xsltEvalStaticAttrValueTemplate(style, inst,
898 (const xmlChar *)"name", NULL, &comp->has_name);
899 if (! comp->has_name) {
911 comp->ns = xsltEvalStaticAttrValueTemplate(style, inst,
912 (const xmlChar *)"namespace", NULL, &comp->has_ns);
914 if (comp->name != NULL) {
915 if (xmlValidateQName(comp->name, 0)) {
918 "not a valid QName.\n", comp->name);
923 name = xsltSplitQName(style->dict, comp->name, &prefix);
924 if (comp->has_ns == 0) {
936 comp->ns = xmlDictLookup(style->dict, ns->href, -1);
937 comp->has_ns = 1;
939 comp->nsPrefix = prefix;
940 comp->name = name;
947 "not specified by the instruction itself.\n", comp->name);
957 comp->has_name = 0;
964 comp->use = xsltEvalStaticAttrValueTemplate(style, inst,
966 NULL, &comp->has_use);
982 xsltStyleItemAttributePtr comp;
984 xsltStylePreCompPtr comp;
998 comp = (xsltStyleItemAttributePtr) xsltNewStylePreComp(style,
1001 comp = xsltNewStylePreComp(style, XSLT_FUNC_ATTRIBUTE);
1004 if (comp == NULL)
1006 inst->psvi = comp;
1007 comp->inst = inst;
1015 comp->name = xsltEvalStaticAttrValueTemplate(style, inst,
1017 NULL, &comp->has_name);
1018 if (! comp->has_name) {
1030 comp->ns = xsltEvalStaticAttrValueTemplate(style, inst,
1032 NULL, &comp->has_ns);
1034 if (comp->name != NULL) {
1035 if (xmlValidateQName(comp->name, 0)) {
1038 "not a valid QName.\n", comp->name);
1043 name = xsltSplitQName(style->dict, comp->name, &prefix);
1045 if (comp->has_ns == 0) {
1057 comp->ns = xmlDictLookup(style->dict, ns->href, -1);
1058 comp->has_ns = 1;
1060 comp->nsPrefix = prefix;
1061 comp->name = name;
1069 "itself.\n", comp->name);
1085 comp->has_name = 0;
1109 xsltStyleItemCommentPtr comp;
1111 xsltStylePreCompPtr comp;
1118 comp = (xsltStyleItemCommentPtr) xsltNewStylePreComp(style, XSLT_FUNC_COMMENT);
1120 comp = xsltNewStylePreComp(style, XSLT_FUNC_COMMENT);
1123 if (comp == NULL)
1125 inst->psvi = comp;
1126 comp->inst = inst;
1139 xsltStyleItemPIPtr comp;
1141 xsltStylePreCompPtr comp;
1148 comp = (xsltStyleItemPIPtr) xsltNewStylePreComp(style, XSLT_FUNC_PI);
1150 comp = xsltNewStylePreComp(style, XSLT_FUNC_PI);
1153 if (comp == NULL)
1155 inst->psvi = comp;
1156 comp->inst = inst;
1158 comp->name = xsltEvalStaticAttrValueTemplate(style, inst,
1160 XSLT_NAMESPACE, &comp->has_name);
1173 xsltStyleItemCopyOfPtr comp;
1175 xsltStylePreCompPtr comp;
1182 comp = (xsltStyleItemCopyOfPtr) xsltNewStylePreComp(style, XSLT_FUNC_COPYOF);
1184 comp = xsltNewStylePreComp(style, XSLT_FUNC_COPYOF);
1187 if (comp == NULL)
1189 inst->psvi = comp;
1190 comp->inst = inst;
1192 comp->select = xsltGetCNsProp(style, inst, (const xmlChar *)"select",
1194 if (comp->select == NULL) {
1200 comp->comp = xsltXPathCompile(style, comp->select);
1201 if (comp->comp == NULL) {
1204 comp->select);
1219 xsltStyleItemValueOfPtr comp;
1221 xsltStylePreCompPtr comp;
1229 comp = (xsltStyleItemValueOfPtr) xsltNewStylePreComp(style, XSLT_FUNC_VALUEOF);
1231 comp = xsltNewStylePreComp(style, XSLT_FUNC_VALUEOF);
1234 if (comp == NULL)
1236 inst->psvi = comp;
1237 comp->inst = inst;
1244 comp->noescape = 1;
1252 comp->select = xsltGetCNsProp(style, inst, (const xmlChar *)"select",
1254 if (comp->select == NULL) {
1260 comp->comp = xsltXPathCompile(style, comp->select);
1261 if (comp->comp == NULL) {
1264 comp->select);
1321 /* comp->has_ns = 1; */
1345 xsltStyleItemWithParamPtr comp;
1347 xsltStylePreCompPtr comp;
1354 comp = (xsltStyleItemWithParamPtr) xsltNewStylePreComp(style, XSLT_FUNC_WITHPARAM);
1356 comp = xsltNewStylePreComp(style, XSLT_FUNC_WITHPARAM);
1359 if (comp == NULL)
1361 inst->psvi = comp;
1362 comp->inst = inst;
1368 1, &(comp->has_name), &(comp->ns), &(comp->name));
1369 if (comp->ns)
1370 comp->has_ns = 1;
1374 comp->select = xsltGetCNsProp(style, inst, (const xmlChar *)"select",
1376 if (comp->select != NULL) {
1377 comp->comp = xsltXPathCompile(style, comp->select);
1378 if (comp->comp == NULL) {
1381 "expression '%s'\n", comp->select);
1403 xsltStyleItemNumberPtr comp;
1405 xsltStylePreCompPtr comp;
1413 comp = (xsltStyleItemNumberPtr) xsltNewStylePreComp(style, XSLT_FUNC_NUMBER);
1415 comp = xsltNewStylePreComp(style, XSLT_FUNC_NUMBER);
1418 if (comp == NULL)
1420 cur->psvi = comp;
1425 comp->numdata.doc = cur->doc;
1426 comp->numdata.node = cur;
1427 comp->numdata.value = xsltGetCNsProp(style, cur, (const xmlChar *)"value",
1432 XSLT_NAMESPACE, &comp->numdata.has_format);
1433 if (comp->numdata.has_format == 0) {
1434 comp->numdata.format = xmlDictLookup(style->dict, BAD_CAST "" , 0);
1436 comp->numdata.format = prop;
1439 comp->numdata.count = xsltGetCNsProp(style, cur, (const xmlChar *)"count",
1441 comp->numdata.from = xsltGetCNsProp(style, cur, (const xmlChar *)"from",
1449 comp->numdata.level = prop;
1486 comp->numdata.groupingCharacterLen = xmlStrlen(prop);
1487 comp->numdata.groupingCharacter =
1488 xsltGetUTF8Char(prop, &(comp->numdata.groupingCharacterLen));
1493 sscanf((char *)prop, "%d", &comp->numdata.digitsPerGroup);
1495 comp->numdata.groupingCharacter = 0;
1499 if (comp->numdata.value == NULL) {
1500 if (comp->numdata.level == NULL) {
1501 comp->numdata.level = xmlDictLookup(style->dict,
1518 xsltStyleItemApplyImportsPtr comp;
1520 xsltStylePreCompPtr comp;
1527 comp = (xsltStyleItemApplyImportsPtr) xsltNewStylePreComp(style, XSLT_FUNC_APPLYIMPORTS);
1529 comp = xsltNewStylePreComp(style, XSLT_FUNC_APPLYIMPORTS);
1532 if (comp == NULL)
1534 inst->psvi = comp;
1535 comp->inst = inst;
1548 xsltStyleItemCallTemplatePtr comp;
1550 xsltStylePreCompPtr comp;
1557 comp = (xsltStyleItemCallTemplatePtr)
1560 comp = xsltNewStylePreComp(style, XSLT_FUNC_CALLTEMPLATE);
1563 if (comp == NULL)
1565 inst->psvi = comp;
1566 comp->inst = inst;
1572 1, &(comp->has_name), &(comp->ns), &(comp->name));
1573 if (comp->ns)
1574 comp->has_ns = 1;
1587 xsltStyleItemApplyTemplatesPtr comp;
1589 xsltStylePreCompPtr comp;
1596 comp = (xsltStyleItemApplyTemplatesPtr)
1599 comp = xsltNewStylePreComp(style, XSLT_FUNC_APPLYTEMPLATES);
1602 if (comp == NULL)
1604 inst->psvi = comp;
1605 comp->inst = inst;
1611 0, NULL, &(comp->modeURI), &(comp->mode));
1615 comp->select = xsltGetCNsProp(style, inst, BAD_CAST "select",
1617 if (comp->select != NULL) {
1618 comp->comp = xsltXPathCompile(style, comp->select);
1619 if (comp->comp == NULL) {
1622 "expression '%s'\n", comp->select);
1639 xsltStyleItemChoosePtr comp;
1641 xsltStylePreCompPtr comp;
1648 comp = (xsltStyleItemChoosePtr)
1651 comp = xsltNewStylePreComp(style, XSLT_FUNC_CHOOSE);
1654 if (comp == NULL)
1656 inst->psvi = comp;
1657 comp->inst = inst;
1670 xsltStyleItemIfPtr comp;
1672 xsltStylePreCompPtr comp;
1679 comp = (xsltStyleItemIfPtr)
1682 comp = xsltNewStylePreComp(style, XSLT_FUNC_IF);
1685 if (comp == NULL)
1687 inst->psvi = comp;
1688 comp->inst = inst;
1690 comp->test = xsltGetCNsProp(style, inst, (const xmlChar *)"test", XSLT_NAMESPACE);
1691 if (comp->test == NULL) {
1697 comp->comp = xsltXPathCompile(style, comp->test);
1698 if (comp->comp == NULL) {
1701 comp->test);
1716 xsltStyleItemWhenPtr comp;
1718 xsltStylePreCompPtr comp;
1725 comp = (xsltStyleItemWhenPtr)
1728 comp = xsltNewStylePreComp(style, XSLT_FUNC_WHEN);
1731 if (comp == NULL)
1733 inst->psvi = comp;
1734 comp->inst = inst;
1736 comp->test = xsltGetCNsProp(style, inst, (const xmlChar *)"test", XSLT_NAMESPACE);
1737 if (comp->test == NULL) {
1743 comp->comp = xsltXPathCompile(style, comp->test);
1744 if (comp->comp == NULL) {
1747 comp->test);
1762 xsltStyleItemForEachPtr comp;
1764 xsltStylePreCompPtr comp;
1771 comp = (xsltStyleItemForEachPtr)
1774 comp = xsltNewStylePreComp(style, XSLT_FUNC_FOREACH);
1777 if (comp == NULL)
1779 inst->psvi = comp;
1780 comp->inst = inst;
1782 comp->select = xsltGetCNsProp(style, inst, (const xmlChar *)"select",
1784 if (comp->select == NULL) {
1789 comp->comp = xsltXPathCompile(style, comp->select);
1790 if (comp->comp == NULL) {
1793 comp->select);
1810 xsltStyleItemVariablePtr comp;
1812 xsltStylePreCompPtr comp;
1819 comp = (xsltStyleItemVariablePtr)
1822 comp = xsltNewStylePreComp(style, XSLT_FUNC_VARIABLE);
1825 if (comp == NULL)
1828 inst->psvi = comp;
1829 comp->inst = inst;
1838 1, &(comp->has_name), &(comp->ns), &(comp->name));
1839 if (comp->ns)
1840 comp->has_ns = 1;
1844 comp->select = xsltGetCNsProp(style, inst, (const xmlChar *)"select",
1846 if (comp->select != NULL) {
1847 comp->comp = xsltXPathCompile(style, comp->select);
1848 if (comp->comp == NULL) {
1851 comp->select);
1873 xsltStyleItemParamPtr comp;
1875 xsltStylePreCompPtr comp;
1882 comp = (xsltStyleItemParamPtr)
1885 comp = xsltNewStylePreComp(style, XSLT_FUNC_PARAM);
1888 if (comp == NULL)
1890 inst->psvi = comp;
1891 comp->inst = inst;
1897 1, &(comp->has_name), &(comp->ns), &(comp->name));
1898 if (comp->ns)
1899 comp->has_ns = 1;
1903 comp->select = xsltGetCNsProp(style, inst, (const xmlChar *)"select",
1905 if (comp->select != NULL) {
1906 comp->comp = xsltXPathCompile(style, comp->select);
1907 if (comp->comp == NULL) {
1910 comp->select);