Lines Matching defs:prefix

831 	const xmlChar *prefix = attr->ns->prefix;
841 (targetElem->ns->prefix != NULL) &&
847 if (prefix != NULL) {
849 * Search by ns-prefix.
851 ns = xmlSearchNs(targetElem->doc, targetElem, prefix);
862 if ((ns != NULL) && (ns->prefix != NULL)) {
868 if (prefix) {
872 if ((ns->prefix) && xmlStrEqual(ns->prefix, prefix)) {
874 * The prefix aready occupied.
881 ns = xmlNewNs(targetElem, attr->ns->href, prefix);
887 * Generate a new prefix.
890 const xmlChar *basepref = prefix;
894 if (prefix != NULL)
895 basepref = prefix;
907 "new unique ns-prefix for the copied attribute "
913 if (basepref != prefix)
1147 (xmlStrEqual(node->ns->prefix, cur->prefix))) {
1152 q = xmlNewNs(node, cur->href, cur->prefix);
1252 * the prefix of an original ns-binding; thus it might
1261 xmlNewNs(copy, (*cur)->href, (*cur)->prefix);
1671 * Find a matching (prefix and ns-name) ns-declaration
1674 * added to @out. If, in this case, the given prefix is already
1675 * in use, then a ns-declaration with a modified ns-prefix
1697 if (ns->prefix == NULL) {
1758 * Find a matching (prefix and ns-name) ns-declaration
1761 * added to @out. If, in this case, the given prefix is already
1762 * in use, then a ns-declaration with a modified ns-prefix
1795 if ((ns->prefix == NULL) == (literalNs->prefix == NULL)) {
1796 if (literalNs->prefix == NULL) {
1801 } else if ((ns->prefix[0] == literalNs->prefix[0]) &&
1802 xmlStrEqual(ns->prefix, literalNs->prefix))
1815 * If the ns-prefix is occupied by an other ns-decl on the
1817 * 1) The desired prefix is shadowed
1818 * 2) There's no way around changing the prefix
1822 * which is to recreate the ns-decl with a modified prefix.
1829 * Fallback to changing the prefix.
1837 * result element is in the same namespace (with an equal ns-prefix).
1840 ((resultElem->parent->ns->prefix == NULL) ==
1841 (literalNs->prefix == NULL)))
1845 if (literalNs->prefix == NULL) {
1848 } else if ((ns->prefix[0] == literalNs->prefix[0]) &&
1849 xmlStrEqual(ns->prefix, literalNs->prefix) &&
1859 literalNs->prefix);
1864 * Either no matching ns-prefix was found or the namespace is
1870 * ns-prefix.
1872 * 1) If keeping the prefix: create a new ns-decl.
1885 ns = xmlNewNs(resultElem, literalNs->href, literalNs->prefix);
1894 ns = xmlNewNs(resultElem, literalNs->href, literalNs->prefix);
1899 * Fallback: we need to generate a new prefix and declare the namespace
1903 xmlChar prefix[30];
1913 snprintf((char *) prefix, 30, "%s_%d",
1914 literalNs->prefix, counter++);
1915 ns = xmlSearchNs(resultElem->doc, resultElem, BAD_CAST prefix);
1919 "Failed to compute a unique ns-prefix for the "
1924 ns = xmlNewNs(resultElem, literalNs->href, BAD_CAST prefix);
2171 ns = xmlSearchNs(copy->doc, copy, effNs->prefix);
2178 ns = xmlNewNs(copy, effNs->nsName, effNs->prefix);
2332 ret = xmlSearchNs(copy->doc, copy, ns->prefix);
2335 xmlNewNs(copy, ns->href, ns->prefix);
2337 ret = xmlSearchNs(copy->doc, copy, ns->prefix);
2343 * prefix and with the target namespace name.
2345 * use the *target* namespace prefix, not the
2348 xmlNewNs(copy, URI, ns->prefix);
2682 ret = xmlSearchNs(copy->doc, copy, ns->prefix);
2685 xmlNewNs(copy, ns->href, ns->prefix);
2687 ret = xmlSearchNs(copy->doc, copy, ns->prefix);
2690 xmlNewNs(copy, URI, ns->prefix);
3222 if ((root->ns != NULL) && (root->ns->prefix != NULL))
3223 doctype = xmlDictQLookup(ctxt->dict, root->ns->prefix, root->name);
3558 const xmlChar *prefix;
3589 name = xsltSplitQName(ctxt->dict, prop, &prefix);
3592 name = xsltSplitQName(ctxt->dict, comp->name, &prefix);
3615 ns = xsltGetSpecialNamespace(ctxt, inst, namespace, prefix,
3619 } else if ((comp->ns != NULL) && (prefix == NULL) && (comp->has_ns)) {
3622 ns = xsltGetSpecialNamespace(ctxt, inst, comp->ns, prefix,
3625 if ((ns == NULL) && (prefix != NULL)) {
3626 if (!xmlStrncasecmp(prefix, (xmlChar *)"xml", 3)) {
3629 "xsltElement: xml prefix forbidden\n");
3633 oldns = xmlSearchNs(inst->doc, inst, prefix);
3636 "xsl:element : no namespace bound to prefix %s\n", prefix);
3655 ns = xmlNewNs(ctxt->insert, oldns->href, oldns->prefix);
5378 if ((root->ns != NULL) && (root->ns->prefix != NULL))
5379 doctype = xmlDictQLookup(ctxt->dict, root->ns->prefix, root->name);