mirror of
https://gitlab.gnome.org/GNOME/libxml2
synced 2025-03-28 21:33:13 +00:00
trying to fix at least the message from bug #158628 added first xmlsave
* xmlschemastypes.c: trying to fix at least the message from bug #158628 * include/libxml/xmlsave.h xmlsave.c: added first xmlsave option for format, c.f. bug #159997 Daniel
This commit is contained in:
parent
1cd4dae166
commit
6fc5db0090
@ -1,3 +1,10 @@
|
||||
Sun Jan 16 01:04:18 CET 2005 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* xmlschemastypes.c: trying to fix at least the message from
|
||||
bug #158628
|
||||
* include/libxml/xmlsave.h xmlsave.c: added first xmlsave option
|
||||
for format, c.f. bug #159997
|
||||
|
||||
Sat Jan 15 18:44:30 CET 2005 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* python/libxml.py: make __str__ call serialize() on nodes, c.f.
|
||||
|
@ -20,6 +20,17 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* xmlSaveOption:
|
||||
*
|
||||
* This is the set of XML save options that can be passed down
|
||||
* to the xmlSaveToFd() and similar calls.
|
||||
*/
|
||||
typedef enum {
|
||||
XML_SAVE_FORMAT = 1<<0 /* format save output */
|
||||
} xmlSaveOption;
|
||||
|
||||
|
||||
typedef struct _xmlSaveCtxt xmlSaveCtxt;
|
||||
typedef xmlSaveCtxt *xmlSaveCtxtPtr;
|
||||
|
||||
|
@ -377,7 +377,14 @@ xmlNewSaveCtxt(const char *encoding, int options)
|
||||
return ( NULL );
|
||||
}
|
||||
memset(ret, 0, sizeof(xmlSaveCtxt));
|
||||
|
||||
/*
|
||||
* Use the options
|
||||
*/
|
||||
ret->options = options;
|
||||
if (options & XML_SAVE_FORMAT)
|
||||
ret->format = 1;
|
||||
|
||||
if (encoding != NULL) {
|
||||
ret->handler = xmlFindCharEncodingHandler(encoding);
|
||||
if (ret->handler == NULL) {
|
||||
|
@ -1656,6 +1656,9 @@ xmlSchemaValAtomicListNode(xmlSchemaTypePtr type, const xmlChar *value,
|
||||
if (val == NULL) {
|
||||
return(-1);
|
||||
}
|
||||
if (ret != NULL) {
|
||||
*ret = NULL;
|
||||
}
|
||||
cur = val;
|
||||
/*
|
||||
* Split the list
|
||||
@ -1673,9 +1676,6 @@ xmlSchemaValAtomicListNode(xmlSchemaTypePtr type, const xmlChar *value,
|
||||
}
|
||||
}
|
||||
if (nb_values == 0) {
|
||||
if (ret != NULL) {
|
||||
TODO
|
||||
}
|
||||
xmlFree(val);
|
||||
return(nb_values);
|
||||
}
|
||||
@ -1689,10 +1689,11 @@ xmlSchemaValAtomicListNode(xmlSchemaTypePtr type, const xmlChar *value,
|
||||
while (*cur != 0) cur++;
|
||||
while ((*cur == 0) && (cur != endval)) cur++;
|
||||
}
|
||||
xmlFree(val);
|
||||
/* TODO what return value ? c.f. bug #158628
|
||||
if (ret != NULL) {
|
||||
TODO
|
||||
}
|
||||
} */
|
||||
xmlFree(val);
|
||||
if (tmp == 0)
|
||||
return(nb_values);
|
||||
return(-1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user