+Fri Jan 16 22:15:34 HKT 2004 William Brack <wbrack@mmm.com.hk>
+
+ * libxslt/xsltutils.c: added a newline for any comment before
+ the root element (Bug 130433)
+ * libxslt/xslt.c: fixed problem with cdata-section-elements when
+ default namespace is changed (Bug 130793)
+ * tests/extensions/module.out, tests/general/bug-100.out: adjusted
+ for newline after comment change above.
+ * tests/general/Makefile.am, tests/general/bug-140.xsl,
+ tests/general/Makefile.am, tests/docs/bug-140.xml: added test for
+ cdata-section-elements problem.
+
Wed Jan 14 16:44:58 CET 2004 Daniel Veillard <daniel@veillard.com>
* python/libxsl.py: applied shared lib loading patch for OS X from
if (element == NULL) {
if (style != NULL) style->errors++;
} else {
+ xmlNsPtr ns;
+
xmlHashAddEntry2(style->cdataSection, element, URI,
(void *) "cdata");
+ /*
+ * if prefix is NULL, we must check whether it's
+ * necessary to also put in the name of the default
+ * namespace.
+ */
+ if (URI == NULL) {
+ ns = xmlSearchNs(style->doc, cur, NULL);
+ if (ns != NULL)
+ xmlHashAddEntry2(style->cdataSection, element,
+ ns->href, (void *) "cdata");
+ }
xmlFree(element);
}
}
while (child != NULL) {
xmlNodeDumpOutput(buf, result, child, 0, (indent == 1),
(const char *) encoding);
- if (child->type == XML_DTD_NODE)
+ if ((child->type == XML_DTD_NODE) ||
+ (child->type == XML_COMMENT_NODE))
xmlOutputBufferWriteString(buf, "\n");
child = child->next;
}
bug-137.xml \
bug-138.xml \
bug-139.xml \
+ bug-140.xml \
character.xml \
array.xml \
items.xml
--- /dev/null
+<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
+<rootelement>
+ <childelement/>
+ <childelement/>
+</rootelement>
+
<?xml version="1.0"?>
-<!--libxslt:test element test worked-->SUCCESS
+<!--libxslt:test element test worked-->
+SUCCESS
bug-137.imp bug-137.out bug-137.xsl \
bug-138.out bug-138.xsl \
bug-139.out bug-139.xsl \
+ bug-140.out bug-140.xsl \
character.out character.xsl \
character2.out character2.xsl \
itemschoose.out itemschoose.xsl \
<?xml version="1.0"?>
<!--libxslt:test element test worked-->
+
--- /dev/null
+<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
+<script xmlns="http://www.w3.org/2000/svg" type="text/ecmascript"><![CDATA[
+ var foo2 = text;
+ ]]></script>
--- /dev/null
+<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
+
+<!DOCTYPE xsl:stylesheet [
+
+<!ENTITY bar "bar">
+
+<!ENTITY foo "var foo = &bar;">
+
+<!-- namespace for SVG -->
+<!ENTITY svgns "http://www.w3.org/2000/svg">
+<!-- namespace for XSLT -->
+<!ENTITY xsltns "http://www.w3.org/1999/XSL/Transform">
+
+]>
+
+<xsl:stylesheet version="1.0"
+ xmlns="&svgns;"
+ xmlns:xsl="&xsltns;"
+ exclude-result-prefixes="xsl">
+
+<xsl:output method="xml" indent="yes" encoding="iso-8859-1"
+standalone="yes" cdata-section-elements="script"/>
+
+<xsl:variable name="foo" select="'bar'"/>
+
+<xsl:template match="/">
+ <script type="text/ecmascript">
+ var foo2 = text;
+ </script>
+</xsl:template>
+
+</xsl:stylesheet>