Skip to content
Snippets Groups Projects
Commit f5f01a9086ff authored by Daniel Veillard's avatar Daniel Veillard
Browse files

- libxslt/transform.c libxslt/xslt.c: avoiding some problems

  with blank node stripping when not allowed.
Daniel
parent 034948f3afab
No related branches found
No related tags found
No related merge requests found
Wed Jan 17 20:15:40 CET 2001 Wed Jan 17 21:03:01 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
* libxslt/transform.c libxslt/xslt.c: avoiding some problems
with blank node stripping when not allowed.
Wed Jan 17 20:15:40 CET 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
* libxslt/transform.c: modified apply-templates processing * libxslt/transform.c: modified apply-templates processing
added select and sort support support. added select and sort support support.
......
...@@ -793,18 +793,6 @@ ...@@ -793,18 +793,6 @@
return; return;
} }
/*
* Cleanup of ignorable blank node detected
*/
if (delete != NULL) {
#ifdef DEBUG_PROCESS
xsltGenericDebug(xsltGenericDebugContext,
"xsltApplyOneTemplate: removing ignorable blank node\n");
#endif
xmlUnlinkNode(delete);
xmlFreeNode(delete);
delete = NULL;
}
if (IS_XSLT_ELEM(cur)) { if (IS_XSLT_ELEM(cur)) {
if (IS_XSLT_NAME(cur, "apply-templates")) { if (IS_XSLT_NAME(cur, "apply-templates")) {
ctxt->insert = insert; ctxt->insert = insert;
...@@ -844,7 +832,6 @@ ...@@ -844,7 +832,6 @@
* For stylesheets, the set of whitespace-preserving * For stylesheets, the set of whitespace-preserving
* element names consists of just xsl:text. * element names consists of just xsl:text.
*/ */
if (!(IS_BLANK_NODE(cur))) {
#ifdef DEBUG_PROCESS #ifdef DEBUG_PROCESS
xsltGenericDebug(xsltGenericDebugContext, xsltGenericDebug(xsltGenericDebugContext,
"xsltApplyOneTemplate: copy text %s\n", cur->content); "xsltApplyOneTemplate: copy text %s\n", cur->content);
...@@ -856,9 +843,6 @@ ...@@ -856,9 +843,6 @@
xsltGenericError(xsltGenericErrorContext, xsltGenericError(xsltGenericErrorContext,
"xsltApplyOneTemplate: text copy failed\n"); "xsltApplyOneTemplate: text copy failed\n");
} }
} else {
delete = cur;
}
} else if (cur->type == XML_ELEMENT_NODE) { } else if (cur->type == XML_ELEMENT_NODE) {
#ifdef DEBUG_PROCESS #ifdef DEBUG_PROCESS
xsltGenericDebug(xsltGenericDebugContext, xsltGenericDebug(xsltGenericDebugContext,
......
...@@ -491,5 +491,6 @@ ...@@ -491,5 +491,6 @@
} }
} else if (cur->type == XML_TEXT_NODE) { } else if (cur->type == XML_TEXT_NODE) {
if (IS_BLANK_NODE(cur)) { if (IS_BLANK_NODE(cur)) {
if (xmlNodeGetSpacePreserve(cur) != 1) {
delete = cur; delete = cur;
} }
...@@ -494,5 +495,6 @@ ...@@ -494,5 +495,6 @@
delete = cur; delete = cur;
} }
}
} else if (cur->type != XML_ELEMENT_NODE) { } else if (cur->type != XML_ELEMENT_NODE) {
delete = cur; delete = cur;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment