From 0e6be80b91aeb8c4cc2f1ee4a36a096ebd54ae49 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Mon, 9 Jul 2001 21:25:21 +0000 Subject: [PATCH] small cleanup patch from Michal Sajdak for cdata/text handling Daniel * libxslt/xsltproc.c: small cleanup * libxslt/transform.c libxslt/xslt.c : patch from Michal Sajdak for cdata/text handling Daniel --- ChangeLog | 6 ++++++ libxslt/transform.c | 5 ++--- libxslt/xslt.c | 5 ++--- libxslt/xsltproc.c | 6 ++++++ 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0a6a754..c115241 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Mon Jul 9 23:23:50 CEST 2001 Daniel Veillard + + * libxslt/xsltproc.c: small cleanup + * libxslt/transform.c libxslt/xslt.c : patch from Michal Sajdak + for cdata/text handling + Mon Jul 9 22:02:40 CEST 2001 Daniel Veillard * libxslt/xsltutils.c: small fix for xsl:message by Stephane GUIBOU diff --git a/libxslt/transform.c b/libxslt/transform.c index 7d709f4..0d74b44 100644 --- a/libxslt/transform.c +++ b/libxslt/transform.c @@ -1792,9 +1792,8 @@ xsltText(xsltTransformContextPtr ctxt, xmlNodePtr node ATTRIBUTE_UNUSED, xmlNodePtr copy; while (text != NULL) { - if (((text->type != XML_TEXT_NODE) && - (text->type != XML_CDATA_SECTION_NODE)) || - (text->next != NULL)) { + if ((text->type != XML_TEXT_NODE) && + (text->type != XML_CDATA_SECTION_NODE)) { xsltGenericError(xsltGenericErrorContext, "xsl:text content problem\n"); break; diff --git a/libxslt/xslt.c b/libxslt/xslt.c index acc291d..cb71521 100644 --- a/libxslt/xslt.c +++ b/libxslt/xslt.c @@ -1287,9 +1287,8 @@ xsltParseTemplateContent(xsltStylesheetPtr style, xsltTemplatePtr ret, } while (text != NULL) { - if (((text->type != XML_TEXT_NODE) && - (text->type != XML_CDATA_SECTION_NODE)) || - (text->next != NULL)) { + if ((text->type != XML_TEXT_NODE) && + (text->type != XML_CDATA_SECTION_NODE)) { xsltGenericError(xsltGenericErrorContext, "xsltParseTemplateContent: xslt:text content problem\n"); style->errors++; diff --git a/libxslt/xsltproc.c b/libxslt/xsltproc.c index 34b1046..44ea38a 100644 --- a/libxslt/xsltproc.c +++ b/libxslt/xsltproc.c @@ -245,7 +245,12 @@ main(int argc, char **argv) } } params[nbparams] = NULL; + + /* + * Replace entities with their content. + */ xmlSubstituteEntitiesDefault(1); + if (novalid == 0) /* TODO XML_DETECT_IDS | XML_COMPLETE_ATTRS */ xmlLoadExtDtdDefaultValue = 6; else @@ -290,6 +295,7 @@ main(int argc, char **argv) } } + /* * disable CDATA from being built in the document tree */ -- 2.7.4