+Sat Nov 1 07:41:06 CET 2003 Daniel Veillard <daniel@veillard.com>
+
+ * libexslt/strings.c: fix bug #125265 about entities breaking
+ exsl:tokenize and exsl:split
+ * tests/exslt/strings/split.1.* tests/exslt/strings/tokenize.1.*:
+ augmented the reression tests with the example from the bug report.
+
Fri Oct 31 20:26:04 CET 2003 Daniel Veillard <daniel@veillard.com>
* libxslt/preproc.c: fix bug #120828 make sure that xsl:sort is
break;
}
*cur = 0;
- node = xmlNewChild((xmlNodePtr) container, NULL,
- (const xmlChar *) "token",
- token);
+ node = xmlNewDocRawNode(container, NULL,
+ (const xmlChar *) "token", token);
+ xmlAddChild((xmlNodePtr) container, node);
xmlXPathNodeSetAddUnique(ret->nodesetval, node);
*cur = *delimiter;
token = cur + 1;
if (cur != token) {
xmlChar tmp = *cur;
*cur = 0;
- node = xmlNewChild((xmlNodePtr) container, NULL,
- (const xmlChar *) "token",
- token);
+ node = xmlNewDocRawNode(container, NULL,
+ (const xmlChar *) "token", token);
+ xmlAddChild((xmlNodePtr) container, node);
xmlXPathNodeSetAddUnique(ret->nodesetval, node);
*cur = tmp;
token++;
continue;
}
*cur = 0;
- node = xmlNewChild((xmlNodePtr) container, NULL,
- (const xmlChar *) "token",
- token);
+ node = xmlNewDocRawNode(container, NULL,
+ (const xmlChar *) "token", token);
+ xmlAddChild((xmlNodePtr) container, node);
xmlXPathNodeSetAddUnique(ret->nodesetval, node);
*cur = *delimiter;
cur = cur + delimiterLength - 1;
}
}
if (token != cur) {
- node =
- xmlNewChild((xmlNodePtr) container, NULL,
- (const xmlChar *) "token", token);
+ node = xmlNewDocRawNode(container, NULL,
+ (const xmlChar *) "token", token);
+ xmlAddChild((xmlNodePtr) container, node);
xmlXPathNodeSetAddUnique(ret->nodesetval, node);
}
}
<token>f</token><token>o</token><token>o</token><token>b</token><token>a</token><token>r</token>
str:split('-*- hello - world -*-', '-')
- <token>*</token><token> hello </token><token> world </token><token>*</token></out>
+ <token>*</token><token> hello </token><token> world </token><token>*</token>
+
+ str:split('data &math str;')
+ <token>data</token><token>&math</token><token>str;</token></out>
str:tokenize('date math str')
<token>date</token><token>math</token><token>str</token>;
+
+ str:tokenize('This is & strange behavior', ' ')
+ <token>This</token><token>is</token><token>&</token><token>strange</token><token>behavior</token>;
+
+ str:tokenize('This is & strange; behavior', ' ')
+ <token>This</token><token>is</token><token>&</token><token>strange;</token><token>behavior</token>;
+
+ str:tokenize('This is &strange; behavior', ' ')
+ <token>This</token><token>is</token><token>&strange;</token><token>behavior</token>;
</out>
str:tokenize('date math str')
<xsl:copy-of select="str:tokenize('date math str')"/>;
+
+ str:tokenize('This is & strange behavior', ' ')
+ <xsl:copy-of select="str:tokenize('This is & strange behavior', ' ')"/>;
+
+ str:tokenize('This is & strange; behavior', ' ')
+ <xsl:copy-of select="str:tokenize('This is & strange; behavior', ' ')"/>;
+
+ str:tokenize('This is &strange; behavior', ' ')
+ <xsl:copy-of select="str:tokenize('This is &strange; behavior', ' ')"/>;
</out>
</xsl:template>
-</xsl:stylesheet>
\ No newline at end of file
+</xsl:stylesheet>