mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-11-08 11:02:18 +03:00
Hacking, mostly on the output support:
- libxslt/xslt.c: added support for disable-output-escaping will need libxml version > 20211 - libxslt/transform.c: cleanup - libxslt/xsltutils.[ch]: added output functions - libxslt/xsltproc.c: reuse the output function - tests/REC2/Makefile.am tests/REC2/vrml.xml: added VRML output test Daniel
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include <libxml/valid.h>
|
||||
#include <libxml/hash.h>
|
||||
#include <libxml/xmlerror.h>
|
||||
#include <libxml/parserInternals.h>
|
||||
#include "xslt.h"
|
||||
#include "xsltInternals.h"
|
||||
#include "pattern.h"
|
||||
@@ -481,7 +482,28 @@ xsltParseTemplateContent(xsltStylesheetPtr style, xsltTemplatePtr ret,
|
||||
xsltGenericError(xsltGenericErrorContext,
|
||||
"xsltParseStylesheetTemplate: xslt:text content problem\n");
|
||||
} else {
|
||||
xmlChar *prop;
|
||||
xmlNodePtr text = cur->children;
|
||||
|
||||
prop = xmlGetNsProp(cur,
|
||||
(const xmlChar *)"disable-output-escaping",
|
||||
XSLT_NAMESPACE);
|
||||
if (prop != NULL) {
|
||||
if (xmlStrEqual(prop, (const xmlChar *)"yes")) {
|
||||
#if LIBXML_VERSION > 20211
|
||||
text->name = xmlStringTextNoenc;
|
||||
#else
|
||||
xsltGenericError(xsltGenericErrorContext,
|
||||
"xsl:text disable-output-escaping need newer > 20211 libxml version\n");
|
||||
#endif
|
||||
} else if (!xmlStrEqual(prop,
|
||||
(const xmlChar *)"no")){
|
||||
xsltGenericError(xsltGenericErrorContext,
|
||||
"xslt:text: disable-output-escaping allow only yes or no\n");
|
||||
|
||||
}
|
||||
xmlFree(prop);
|
||||
}
|
||||
xmlUnlinkNode(text);
|
||||
xmlAddPrevSibling(cur, text);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user