mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
removing history/readline changed this slightly make element content line
* result/scripts/base*: removing history/readline changed this slightly * include/libxml/parser.h SAX.c parser.c parserInternals.c xmllint.c: make element content line number generation optionnal to avoid breaking old apps added interface to switch Daniel
This commit is contained in:
@ -1,3 +1,11 @@
|
|||||||
|
Tue Jul 24 15:39:11 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||||
|
|
||||||
|
* result/scripts/base*: removing history/readline changed
|
||||||
|
this slightly
|
||||||
|
* include/libxml/parser.h SAX.c parser.c parserInternals.c
|
||||||
|
xmllint.c: make element content line number generation
|
||||||
|
optionnal to avoid breaking old apps added interface to switch
|
||||||
|
|
||||||
Tue Jul 24 15:06:58 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
Tue Jul 24 15:06:58 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||||
|
|
||||||
* configure.in: get rid of the readline and libhistory
|
* configure.in: get rid of the readline and libhistory
|
||||||
|
6
SAX.c
6
SAX.c
@ -966,8 +966,10 @@ startElement(void *ctx, const xmlChar *fullname, const xmlChar **atts)
|
|||||||
parent = ctxt->myDoc->children;
|
parent = ctxt->myDoc->children;
|
||||||
}
|
}
|
||||||
ctxt->nodemem = -1;
|
ctxt->nodemem = -1;
|
||||||
if (ctxt->input != NULL)
|
if (ctxt->linenumbers) {
|
||||||
ret->content = (void *) (long) ctxt->input->line;
|
if (ctxt->input != NULL)
|
||||||
|
ret->content = (void *) (long) ctxt->input->line;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We are parsing a new node.
|
* We are parsing a new node.
|
||||||
|
@ -216,6 +216,7 @@ struct _xmlParserCtxt {
|
|||||||
void *_private; /* For user data, libxml won't touch it */
|
void *_private; /* For user data, libxml won't touch it */
|
||||||
|
|
||||||
int loadsubset; /* should the external subset be loaded */
|
int loadsubset; /* should the external subset be loaded */
|
||||||
|
int linenumbers; /* set line number in element content */
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -422,6 +423,7 @@ int xmlSubstituteEntitiesDefault(int val);
|
|||||||
int xmlKeepBlanksDefault (int val);
|
int xmlKeepBlanksDefault (int val);
|
||||||
void xmlStopParser (xmlParserCtxtPtr ctxt);
|
void xmlStopParser (xmlParserCtxtPtr ctxt);
|
||||||
int xmlPedanticParserDefault(int val);
|
int xmlPedanticParserDefault(int val);
|
||||||
|
int xmlLineNumbersDefault (int val);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Recovery mode
|
* Recovery mode
|
||||||
|
19
parser.c
19
parser.c
@ -93,6 +93,7 @@ int xmlDoValidityCheckingDefaultValue = 0;
|
|||||||
#endif
|
#endif
|
||||||
int xmlLoadExtDtdDefaultValue = 0;
|
int xmlLoadExtDtdDefaultValue = 0;
|
||||||
int xmlPedanticParserDefaultValue = 0;
|
int xmlPedanticParserDefaultValue = 0;
|
||||||
|
int xmlLineNumbersDefaultValue = 0;
|
||||||
int xmlKeepBlanksDefaultValue = 1;
|
int xmlKeepBlanksDefaultValue = 1;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -10121,6 +10122,24 @@ xmlPedanticParserDefault(int val) {
|
|||||||
return(old);
|
return(old);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xmlLineNumbersDefault:
|
||||||
|
* @val: int 0 or 1
|
||||||
|
*
|
||||||
|
* Set and return the previous value for enabling line numbers in elements
|
||||||
|
* contents. This may break on old application and is turned off by default.
|
||||||
|
*
|
||||||
|
* Returns the last value for 0 for no substitution, 1 for substitution.
|
||||||
|
*/
|
||||||
|
|
||||||
|
int
|
||||||
|
xmlLineNumbersDefault(int val) {
|
||||||
|
int old = xmlLineNumbersDefaultValue;
|
||||||
|
|
||||||
|
xmlLineNumbersDefaultValue = val;
|
||||||
|
return(old);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xmlSubstituteEntitiesDefault:
|
* xmlSubstituteEntitiesDefault:
|
||||||
* @val: int 0 or 1
|
* @val: int 0 or 1
|
||||||
|
@ -2230,6 +2230,7 @@ xmlInitParserCtxt(xmlParserCtxtPtr ctxt)
|
|||||||
ctxt->loadsubset = xmlLoadExtDtdDefaultValue;
|
ctxt->loadsubset = xmlLoadExtDtdDefaultValue;
|
||||||
ctxt->validate = xmlDoValidityCheckingDefaultValue;
|
ctxt->validate = xmlDoValidityCheckingDefaultValue;
|
||||||
ctxt->pedantic = xmlPedanticParserDefaultValue;
|
ctxt->pedantic = xmlPedanticParserDefaultValue;
|
||||||
|
ctxt->linenumbers = xmlPedanticParserDefaultValue;
|
||||||
ctxt->keepBlanks = xmlKeepBlanksDefaultValue;
|
ctxt->keepBlanks = xmlKeepBlanksDefaultValue;
|
||||||
ctxt->vctxt.userData = ctxt;
|
ctxt->vctxt.userData = ctxt;
|
||||||
if (ctxt->validate) {
|
if (ctxt->validate) {
|
||||||
|
@ -1,9 +1,4 @@
|
|||||||
/ > base
|
/ > ./test/scripts/base.xml
|
||||||
./test/scripts/base.xml
|
/ > e > http://example.com/base/
|
||||||
/ > cd //e
|
e > img > http://example.com/base/images/
|
||||||
e > base
|
img >
|
||||||
http://example.com/base/
|
|
||||||
e > cd .//img
|
|
||||||
img > base
|
|
||||||
http://example.com/base/images/
|
|
||||||
img > exit
|
|
@ -1,9 +1,4 @@
|
|||||||
/ > base
|
/ > ./test/scripts/base2.xml
|
||||||
./test/scripts/base2.xml
|
/ > e > test/scripts/html/
|
||||||
/ > cd //e
|
e > img > test/scripts/images/
|
||||||
e > base
|
img >
|
||||||
test/scripts/html/
|
|
||||||
e > cd .//img
|
|
||||||
img > base
|
|
||||||
test/scripts/images/
|
|
||||||
img > exit
|
|
@ -954,6 +954,7 @@ main(int argc, char **argv) {
|
|||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
xmlLineNumbersDefault(1);
|
||||||
if (loaddtd != 0) xmlLoadExtDtdDefaultValue = 6; /* fetch DTDs by default */
|
if (loaddtd != 0) xmlLoadExtDtdDefaultValue = 6; /* fetch DTDs by default */
|
||||||
if (noent != 0) xmlSubstituteEntitiesDefault(1);
|
if (noent != 0) xmlSubstituteEntitiesDefault(1);
|
||||||
if (valid != 0) xmlDoValidityCheckingDefaultValue = 1;
|
if (valid != 0) xmlDoValidityCheckingDefaultValue = 1;
|
||||||
|
Reference in New Issue
Block a user