diff --git a/ChangeLog b/ChangeLog index 70ead5ad..c9ad046c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Tue Jul 2 00:02:53 CEST 2002 Daniel Veillard + + * tests/docs/Makefile.am tests/docs/bug-87.xml + tests/general/Makefile.am tests/general/bug-87.*: added a + example in the regression tests for a case where the XML + default namespace was missing from the namespace axis + * xsltproc/xsltproc.c: added the informations that parameter + strings are expected to be UTF8 + * libxslt/attributes.c: fixes on attribute group implementation + Sat Jun 29 21:12:14 MDT 2002 John Fleck * doc/xsltproc.xml, doc/xsltproc.html/, doc/xsltproc.1 diff --git a/libxslt/attributes.c b/libxslt/attributes.c index b1c6b751..24ef83f0 100644 --- a/libxslt/attributes.c +++ b/libxslt/attributes.c @@ -619,22 +619,21 @@ xsltAttributeInternal(xsltTransformContextPtr ctxt, xmlNodePtr node, if ((fromset) && (ns != NULL)) URL = ns->href; - if ((fromset == 0) || (!xmlHasNsProp(ctxt->insert, name, URL))) { - value = xsltEvalTemplateString(ctxt, node, inst); - if (value == NULL) { - if (ns) { - attr = xmlSetNsProp(ctxt->insert, ns, name, - (const xmlChar *) ""); - } else { - attr = - xmlSetProp(ctxt->insert, name, (const xmlChar *) ""); - } + + value = xsltEvalTemplateString(ctxt, node, inst); + if (value == NULL) { + if (ns) { + attr = xmlSetNsProp(ctxt->insert, ns, name, + (const xmlChar *) ""); } else { - if (ns) { - attr = xmlSetNsProp(ctxt->insert, ns, name, value); - } else { - attr = xmlSetProp(ctxt->insert, name, value); - } + attr = + xmlSetProp(ctxt->insert, name, (const xmlChar *) ""); + } + } else { + if (ns) { + attr = xmlSetNsProp(ctxt->insert, ns, name, value); + } else { + attr = xmlSetProp(ctxt->insert, name, value); } } diff --git a/tests/docs/Makefile.am b/tests/docs/Makefile.am index 2f700477..1a431b45 100644 --- a/tests/docs/Makefile.am +++ b/tests/docs/Makefile.am @@ -86,6 +86,7 @@ EXTRA_DIST = \ bug-83.xml \ bug-84.xml \ bug-86.xml \ + bug-87.xml \ character.xml \ array.xml \ items.xml diff --git a/tests/docs/bug-87.xml b/tests/docs/bug-87.xml new file mode 100644 index 00000000..7761b4b4 --- /dev/null +++ b/tests/docs/bug-87.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/general/Makefile.am b/tests/general/Makefile.am index d1792605..ba08ab00 100644 --- a/tests/general/Makefile.am +++ b/tests/general/Makefile.am @@ -89,6 +89,7 @@ EXTRA_DIST = \ bug-83.out bug-83.xsl \ bug-84.out bug-84.xsl \ bug-86.out bug-86.xsl \ + bug-87.out bug-87.xsl \ character.out character.xsl \ character2.out character2.xsl \ itemschoose.out itemschoose.xsl \ diff --git a/tests/general/bug-87.out b/tests/general/bug-87.out new file mode 100644 index 00000000..b46955a3 --- /dev/null +++ b/tests/general/bug-87.out @@ -0,0 +1,5 @@ + +AAA - "xml" "fish" + +CCC - "xml" + diff --git a/tests/general/bug-87.xsl b/tests/general/bug-87.xsl new file mode 100644 index 00000000..60ee8a3f --- /dev/null +++ b/tests/general/bug-87.xsl @@ -0,0 +1,16 @@ + + + + + + - + + " + +" + + + + + diff --git a/xsltproc/xsltproc.c b/xsltproc/xsltproc.c index 843d4c5d..72eff0e6 100644 --- a/xsltproc/xsltproc.c +++ b/xsltproc/xsltproc.c @@ -376,10 +376,10 @@ static void usage(const char *name) { printf("\t--docbook: the input document is SGML docbook\n"); #endif printf("\t--param name value : pass a (parameter,value) pair\n"); - printf("\t value is an XPath expression.\n"); + printf("\t value is an UTF8 XPath expression.\n"); printf("\t string values must be quoted like \"'string'\"\n or"); printf("\t use stringparam to avoid it\n"); - printf("\t--stringparam name value : pass a (parameter,string value) pair\n"); + printf("\t--stringparam name value : pass a (parameter, UTF8 string value) pair\n"); printf("\t--nonet refuse to fetch DTDs or entities over network\n"); #ifdef LIBXML_CATALOG_ENABLED printf("\t--catalogs : use SGML catalogs from $SGML_CATALOG_FILES\n");