Lines Matching defs:HRef
121 // Search for prefix-defined namespace specified by HRef, starting on Node and
124 static xmlNsPtr search(const unsigned char *HRef, xmlNodePtr Node) {
126 if (Def->prefix && xmlStringsEqual(Def->href, HRef)) {
131 return search(HRef, Node->parent);
136 // Return the prefix that corresponds to the HRef. If HRef is not a recognized
137 // URI, then just return the HRef itself to use as the prefix.
138 static const unsigned char *getPrefixForHref(const unsigned char *HRef) {
140 if (xmlStringsEqual(HRef, TO_XML_CHAR(Ns.first.data()))) {
144 return HRef;
147 // Search for prefix-defined namespace specified by HRef, starting on Node and
151 static Expected<xmlNsPtr> searchOrDefine(const unsigned char *HRef,
153 if (xmlNsPtr Def = search(HRef, Node))
155 if (xmlNsPtr Def = xmlNewNs(Node, HRef, getPrefixForHref(HRef)))