mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-11-08 11:02:18 +03:00
strip-space should also be applied to document imported at run-time.
* libxslt/documents.c libxslt/extra.c libxslt/transform.[ch]: strip-space should also be applied to document imported at run-time. Daniel
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
Tue Oct 9 13:02:46 CEST 2001 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
* libxslt/documents.c libxslt/extra.c libxslt/transform.[ch]:
|
||||||
|
strip-space should also be applied to document imported
|
||||||
|
at run-time.
|
||||||
|
|
||||||
Tue Oct 9 12:36:53 CEST 2001 Daniel Veillard <daniel@veillard.com>
|
Tue Oct 9 12:36:53 CEST 2001 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
* libxslt/imports.[ch] libxslt/transform.c libxslt/xslt.c:
|
* libxslt/imports.[ch] libxslt/transform.c libxslt/xslt.c:
|
||||||
|
|||||||
@@ -17,6 +17,8 @@
|
|||||||
#include "xsltInternals.h"
|
#include "xsltInternals.h"
|
||||||
#include "xsltutils.h"
|
#include "xsltutils.h"
|
||||||
#include "documents.h"
|
#include "documents.h"
|
||||||
|
#include "transform.h"
|
||||||
|
#include "imports.h"
|
||||||
#include "keys.h"
|
#include "keys.h"
|
||||||
|
|
||||||
#ifdef LIBXML_XINCLUDE_ENABLED
|
#ifdef LIBXML_XINCLUDE_ENABLED
|
||||||
@@ -173,6 +175,12 @@ xsltLoadDocument(xsltTransformContextPtr ctxt, const xmlChar *URI) {
|
|||||||
URI);
|
URI);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
* Apply white-space stripping if asked for
|
||||||
|
*/
|
||||||
|
if (xsltNeedElemSpaceHandling(ctxt))
|
||||||
|
xsltApplyStripSpaces(ctxt, xmlDocGetRootElement(doc));
|
||||||
|
|
||||||
ret = xsltNewDocument(ctxt, doc);
|
ret = xsltNewDocument(ctxt, doc);
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ xsltFunctionExpression(xmlXPathParserContextPtr ctxt, int nargs){
|
|||||||
tctxt = xsltXPathGetTransformContext(ctxt);
|
tctxt = xsltXPathGetTransformContext(ctxt);
|
||||||
comp = xmlXPathCompile(obj->stringval);
|
comp = xmlXPathCompile(obj->stringval);
|
||||||
if(comp != NULL) {
|
if(comp != NULL) {
|
||||||
ret = xmlXPathNewCString(obj->stringval);
|
ret = xmlXPathNewString(obj->stringval);
|
||||||
ret->user = comp;
|
ret->user = comp;
|
||||||
valuePush(ctxt, ret);
|
valuePush(ctxt, ret);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3058,7 +3058,7 @@ xsltGetHTMLIDs(const xmlChar *version, const xmlChar **public,
|
|||||||
*
|
*
|
||||||
* Strip the unwanted ignorable spaces from the input tree
|
* Strip the unwanted ignorable spaces from the input tree
|
||||||
*/
|
*/
|
||||||
static void
|
void
|
||||||
xsltApplyStripSpaces(xsltTransformContextPtr ctxt, xmlNodePtr node) {
|
xsltApplyStripSpaces(xsltTransformContextPtr ctxt, xmlNodePtr node) {
|
||||||
xmlNodePtr current;
|
xmlNodePtr current;
|
||||||
#ifdef WITH_XSLT_DEBUG_PROCESS
|
#ifdef WITH_XSLT_DEBUG_PROCESS
|
||||||
|
|||||||
@@ -40,6 +40,8 @@ xmlDocPtr xsltApplyStylesheetUser (xsltStylesheetPtr style,
|
|||||||
/**
|
/**
|
||||||
* Private Interfaces
|
* Private Interfaces
|
||||||
*/
|
*/
|
||||||
|
void xsltApplyStripSpaces (xsltTransformContextPtr ctxt,
|
||||||
|
xmlNodePtr node);
|
||||||
xsltTransformFunction
|
xsltTransformFunction
|
||||||
xsltExtElementLookup (xsltTransformContextPtr ctxt,
|
xsltExtElementLookup (xsltTransformContextPtr ctxt,
|
||||||
const xmlChar *name,
|
const xmlChar *name,
|
||||||
|
|||||||
Reference in New Issue
Block a user