MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlCompileStepPattern

Function xmlCompileStepPattern

ThirdParty/libxml2/vtklibxml2/pattern.c:994–1204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

992 */
993
994static void
995xmlCompileStepPattern(xmlPatParserContextPtr ctxt) {
996 xmlChar *token = NULL;
997 xmlChar *name = NULL;
998 xmlChar *URL = NULL;
999 int hasBlanks = 0;
1000
1001 SKIP_BLANKS;
1002 if (CUR == '.') {
1003 /*
1004 * Context node.
1005 */
1006 NEXT;
1007 PUSH(XML_OP_ELEM, NULL, NULL);
1008 return;
1009 }
1010 if (CUR == '@') {
1011 /*
1012 * Attribute test.
1013 */
1014 if (XML_STREAM_XS_IDC_SEL(ctxt->comp)) {
1015 ERROR5(NULL, NULL, NULL,
1016 "Unexpected attribute axis in '%s'.\n", ctxt->base);
1017 ctxt->error = 1;
1018 return;
1019 }
1020 NEXT;
1021 xmlCompileAttributeTest(ctxt);
1022 if (ctxt->error != 0)
1023 goto error;
1024 return;
1025 }
1026 name = xmlPatScanNCName(ctxt);
1027 if (ctxt->error < 0)
1028 return;
1029 if (name == NULL) {
1030 if (CUR == '*') {
1031 NEXT;
1032 PUSH(XML_OP_ALL, NULL, NULL);
1033 return;
1034 } else {
1035 ERROR(NULL, NULL, NULL,
1036 "xmlCompileStepPattern : Name expected\n");
1037 ctxt->error = 1;
1038 return;
1039 }
1040 }
1041 if (IS_BLANK_CH(CUR)) {
1042 hasBlanks = 1;
1043 SKIP_BLANKS;
1044 }
1045 if (CUR == ':') {
1046 NEXT;
1047 if (CUR != ':') {
1048 xmlChar *prefix = name;
1049 int i;
1050
1051 if (hasBlanks || IS_BLANK_CH(CUR)) {

Callers 2

xmlCompilePathPatternFunction · 0.85
xmlCompileIDCXPathPathFunction · 0.85

Calls 4

xmlCompileAttributeTestFunction · 0.85
xmlPatScanNCNameFunction · 0.85
xmlPatScanNameFunction · 0.85
xmlStrEqualFunction · 0.85

Tested by

no test coverage detected