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