static void findRelaxNGTags (void) { int corkIndex = CORK_NIL; findXMLTags (NULL, NULL, relaxngXpathTableTable + TABLE_MAIN, RelaxNGKinds, &corkIndex); }
static void findXsltTags (void) { int scopeIndex = CORK_NIL; findXMLTags (NULL, NULL, xsltXpathTableTable + TABLE_MAIN, XsltKinds, &scopeIndex); }
static void relaxngFindTags (xmlNode *node, const struct sTagXpathRecurSpec *spec, xmlXPathContext *ctx, void *userData) { int corkIndex = *(int *)userData; findXMLTags (ctx, node, relaxngXpathTableTable + spec->nextTable, RelaxNGKinds, &corkIndex); }
static void makeTagRecursively (xmlNode *node, const tagXpathRecurSpec *spec, xmlXPathContext *ctx, void *userData) { int backup = *(int *)userData; findXMLTags (ctx, node, xsltXpathTableTable + spec->nextTable, XsltKinds, userData); *(int *)userData = backup; }
static void makeTagRecursivelyWithVersionVerification (xmlNode *node, const tagXpathRecurSpec *spec, xmlXPathContext *ctx, void *userData) { boolean acceptable = FALSE; int backup; findXMLTags (ctx, node, xsltXpathTableTable + TABLE_VERSION_VERIFY, NULL, &acceptable); if (!acceptable) return; backup = *(int *)userData; findXMLTags (ctx, node, xsltXpathTableTable + TABLE_STYLESHEET, XsltKinds, userData); *(int *)userData = backup; }
static void plistFindTagsUnderKey (xmlNode *node, const struct sTagXpathRecurSpec *spec, xmlXPathContext *ctx, void *userData) { xmlNode *current; xmlNode *prev; stringList *queue; vString* path; vString* v; int c; queue = stringListNew (); current = node; for (current = node; current; current = current->parent) { if (isCompoundElement (current) && (prev = getPrevKeyElement (current))) { char* parent = (char *)xmlNodeGetContent (prev); if (parent) { v = vStringNewInit (parent); stringListAdd (queue, v); xmlFree (parent); } } } path = vStringNew (); while ((c = stringListCount (queue)) > 0) { v = stringListLast (queue); vStringCat (path, v); vStringDelete (v); stringListRemoveLast (queue); if (c != 1) vStringPut (path, '.'); } stringListDelete (queue); findXMLTags (ctx, node, plistXpathTableTable + TABLE_TEXT, PlistKinds, (vStringLength (path) > 0)? vStringValue (path): NULL); vStringDelete (path); }
static void findPlistTags (void) { findXMLTags (NULL, NULL, plistXpathTableTable + TABLE_MAIN, PlistKinds, NULL); }