mirror of
https://github.com/GNOME/libxml2.git
synced 2025-02-11 18:09:31 +08: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:
parent
f012a64d13
commit
d9bad13bb2
@ -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>
|
||||
|
||||
* 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;
|
||||
}
|
||||
ctxt->nodemem = -1;
|
||||
if (ctxt->input != NULL)
|
||||
ret->content = (void *) (long) ctxt->input->line;
|
||||
if (ctxt->linenumbers) {
|
||||
if (ctxt->input != NULL)
|
||||
ret->content = (void *) (long) ctxt->input->line;
|
||||
}
|
||||
|
||||
/*
|
||||
* We are parsing a new node.
|
||||
|
@ -216,6 +216,7 @@ struct _xmlParserCtxt {
|
||||
void *_private; /* For user data, libxml won't touch it */
|
||||
|
||||
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);
|
||||
void xmlStopParser (xmlParserCtxtPtr ctxt);
|
||||
int xmlPedanticParserDefault(int val);
|
||||
int xmlLineNumbersDefault (int val);
|
||||
|
||||
/*
|
||||
* Recovery mode
|
||||
|
19
parser.c
19
parser.c
@ -93,6 +93,7 @@ int xmlDoValidityCheckingDefaultValue = 0;
|
||||
#endif
|
||||
int xmlLoadExtDtdDefaultValue = 0;
|
||||
int xmlPedanticParserDefaultValue = 0;
|
||||
int xmlLineNumbersDefaultValue = 0;
|
||||
int xmlKeepBlanksDefaultValue = 1;
|
||||
|
||||
/*
|
||||
@ -10121,6 +10122,24 @@ xmlPedanticParserDefault(int val) {
|
||||
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:
|
||||
* @val: int 0 or 1
|
||||
|
@ -2230,6 +2230,7 @@ xmlInitParserCtxt(xmlParserCtxtPtr ctxt)
|
||||
ctxt->loadsubset = xmlLoadExtDtdDefaultValue;
|
||||
ctxt->validate = xmlDoValidityCheckingDefaultValue;
|
||||
ctxt->pedantic = xmlPedanticParserDefaultValue;
|
||||
ctxt->linenumbers = xmlPedanticParserDefaultValue;
|
||||
ctxt->keepBlanks = xmlKeepBlanksDefaultValue;
|
||||
ctxt->vctxt.userData = ctxt;
|
||||
if (ctxt->validate) {
|
||||
|
@ -1,9 +1,4 @@
|
||||
/ > base
|
||||
./test/scripts/base.xml
|
||||
/ > cd //e
|
||||
e > base
|
||||
http://example.com/base/
|
||||
e > cd .//img
|
||||
img > base
|
||||
http://example.com/base/images/
|
||||
img > exit
|
||||
/ > ./test/scripts/base.xml
|
||||
/ > e > http://example.com/base/
|
||||
e > img > http://example.com/base/images/
|
||||
img >
|
@ -1,9 +1,4 @@
|
||||
/ > base
|
||||
./test/scripts/base2.xml
|
||||
/ > cd //e
|
||||
e > base
|
||||
test/scripts/html/
|
||||
e > cd .//img
|
||||
img > base
|
||||
test/scripts/images/
|
||||
img > exit
|
||||
/ > ./test/scripts/base2.xml
|
||||
/ > e > test/scripts/html/
|
||||
e > img > test/scripts/images/
|
||||
img >
|
Loading…
Reference in New Issue
Block a user