mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-09 04:58:16 +03:00
patch based on Wieant Nielander contribution to add the option of not
* include/libxml/parser.h xinclude.c xmllint.c: patch based on Wieant Nielander contribution to add the option of not doing URI base fixup in XInclude Daniel svn path=/trunk/; revision=3775
This commit is contained in:
parent
aa6de47ebf
commit
54bd29b79b
@ -1,3 +1,9 @@
|
||||
Tue Aug 26 09:25:39 CEST 2008 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* include/libxml/parser.h xinclude.c xmllint.c: patch based on
|
||||
Wieant Nielander contribution to add the option of not doing
|
||||
URI base fixup in XInclude
|
||||
|
||||
Mon Aug 25 16:52:53 CEST 2008 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* xmlreader.c: applied patch from Aswin to fix tree skipping
|
||||
|
@ -1093,7 +1093,8 @@ typedef enum {
|
||||
XML_PARSE_COMPACT = 1<<16,/* compact small text nodes; no modification of
|
||||
the tree allowed afterwards (will possibly
|
||||
crash if you try to modify the tree) */
|
||||
XML_PARSE_OLD10 = 1<<17 /* parse using XML-1.0 before update 5 */
|
||||
XML_PARSE_OLD10 = 1<<17,/* parse using XML-1.0 before update 5 */
|
||||
XML_PARSE_NOBASEFIX = 1<<18 /* do not fixup XINCLUDE xml:base uris */
|
||||
} xmlParserOption;
|
||||
|
||||
XMLPUBFUN void XMLCALL
|
||||
|
@ -1678,7 +1678,9 @@ loaded:
|
||||
/*
|
||||
* Do the xml:base fixup if needed
|
||||
*/
|
||||
if ((doc != NULL) && (URL != NULL) && (xmlStrchr(URL, (xmlChar) '/'))) {
|
||||
if ((doc != NULL) && (URL != NULL) && (xmlStrchr(URL, (xmlChar) '/')) &&
|
||||
(!(ctxt->parseFlags & XML_PARSE_NOBASEFIX)) &&
|
||||
(!(doc->parseFlags & XML_PARSE_NOBASEFIX))) {
|
||||
xmlNodePtr node;
|
||||
xmlChar *base;
|
||||
xmlChar *curBase;
|
||||
|
@ -2891,6 +2891,7 @@ static void usage(const char *name) {
|
||||
#ifdef LIBXML_XINCLUDE_ENABLED
|
||||
printf("\t--xinclude : do XInclude processing\n");
|
||||
printf("\t--noxincludenode : same but do not generate XInclude nodes\n");
|
||||
printf("\t--nofixup-base-uris : do not fixup xml:base uris\n");
|
||||
#endif
|
||||
printf("\t--loaddtd : fetch external DTD\n");
|
||||
printf("\t--dtdattr : loaddtd + populate the tree with inherited attributes \n");
|
||||
@ -3093,6 +3094,12 @@ main(int argc, char **argv) {
|
||||
options |= XML_PARSE_XINCLUDE;
|
||||
options |= XML_PARSE_NOXINCNODE;
|
||||
}
|
||||
else if ((!strcmp(argv[i], "-nofixup-base-uris")) ||
|
||||
(!strcmp(argv[i], "--nofixup-base-uris"))) {
|
||||
xinclude++;
|
||||
options |= XML_PARSE_XINCLUDE;
|
||||
options |= XML_PARSE_NOBASEFIX;
|
||||
}
|
||||
#endif
|
||||
#ifdef LIBXML_OUTPUT_ENABLED
|
||||
#ifdef HAVE_ZLIB_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user