1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-26 12:25:09 +03:00

Remove ancient TODOs

This commit is contained in:
Nick Wellnhofer 2022-12-21 22:24:50 +01:00
parent 101a542eb8
commit c74e590395
8 changed files with 1 additions and 657 deletions

View File

@ -412,7 +412,7 @@ EXTRA_DIST = Copyright check-xml-test-suite.py gentest.py \
libxml2-config.cmake.in autogen.sh \
trionan.c trionan.h triostr.c triostr.h trio.c trio.h \
triop.h triodef.h libxml.h \
genUnicode.py TODO_SCHEMAS \
genUnicode.py \
dbgen.pl dbgenattr.pl \
libxml2.syms timsort.h \
README.zOS README.md \

276
TODO
View File

@ -1,276 +0,0 @@
124907 HTML parse buffer problem when parsing larse in-memory docs
124110 DTD validation && wrong namespace
123564 xmllint --html --format
TODO for the XML parser and stuff:
==================================
this tend to be outdated :-\ ...
DOCS:
=====
- use case of using XInclude to load for example a description.
order document + product base -(XSLT)-> quote with XIncludes
|
HTML output with description of parts <---(XSLT)--
TODO:
=====
- XInclude at the SAX level (libSRVG)
- fix the C code prototype to bring back doc/libxml-undocumented.txt
to a reasonable level
- Computation of base when HTTP redirect occurs, might affect HTTP
interfaces.
- Computation of base in XInclude. Relativization of URIs.
- listing all attributes in a node.
- Better checking of external parsed entities TAG 1234
- Go through erratas and do the cleanup.
http://www.w3.org/XML/xml-19980210-errata ... started ...
- jamesh suggestion: SAX like functions to save a document ie. call a
function to open a new element with given attributes, write character
data, close last element, etc
+ inversted SAX, initial patch in April 2002 archives.
- htmlParseDoc has parameter encoding which is not used.
Function htmlCreateDocParserCtxt ignore it.
- fix realloc() usage.
- Stricten the UTF8 conformance (Martin Duerst):
http://www.w3.org/2001/06/utf-8-test/.
The bad files are in http://www.w3.org/2001/06/utf-8-wrong/.
- xml:id normalized value
TODO:
=====
- move all string manipulation functions (xmlStrdup, xmlStrlen, etc.) to
global.c. Bjorn noted that the following files depends on parser.o solely
because of these string functions: entities.o, global.o, hash.o, tree.o,
xmlIO.o, and xpath.o.
- Optimization of tag strings allocation ?
- maintain coherency of namespace when doing cut'n paste operations
=> the functions are coded, but need testing
- function to rebuild the ID table
- functions to rebuild the DTD hash tables (after DTD changes).
EXTENSIONS:
===========
- Tools to produce man pages from the SGML docs.
- Add Xpointer recognition/API
- Add Xlink recognition/API
=> started adding an xlink.[ch] with a unified API for XML and HTML.
it's crap :-(
- Implement XSchemas
=> Really need to be done <grin/>
- datatype are complete, but structure support is very limited.
- extend the shell with:
- edit
- load/save
- mv (yum, yum, but it's harder because directories are ordered in
our case, mvup and mvdown would be required)
Done:
=====
- Add HTML validation using the XHTML DTD
- problem: do we want to keep and maintain the code for handling
DTD/System ID cache directly in libxml ?
=> not really done that way, but there are new APIs to check elements
or attributes. Otherwise XHTML validation directly ...
- XML Schemas datatypes except Base64 and BinHex
- Relax NG validation
- XmlTextReader streaming API + validation
- Add a DTD cache prefilled with xhtml DTDs and entities and a program to
manage them -> like the /usr/bin/install-catalog from SGML
right place seems $datadir/xmldtds
Maybe this is better left to user apps
=> use a catalog instead , and xhtml1-dtd package
- Add output to XHTML
=> XML serializer automatically recognize the DTd and apply the specific
rules.
- Fix output of <tst val="x&#xA;y"/>
- compliance to XML-Namespace checking, see section 6 of
http://www.w3.org/TR/REC-xml-names/
- Correct standalone checking/emitting (hard)
2.9 Standalone Document Declaration
- Implement OASIS XML Catalog support
http://www.oasis-open.org/committees/entity/
- Get OASIS testsuite to a more friendly result, check all the results
once stable. the check-xml-test-suite.py script does this
- Implement XSLT
=> libxslt
- Finish XPath
=> attributes addressing troubles
=> defaulted attributes handling
=> namespace axis ?
done as XSLT got debugged
- bug reported by Michael Meallin on validation problems
=> Actually means I need to add support (and warn) for non-deterministic
content model.
- Handle undefined namespaces in entity contents better ... at least
issue a warning
- DOM needs
int xmlPruneProp(xmlNodePtr node, xmlAtttrPtr attr);
=> done it's actually xmlRemoveProp xmlUnsetProp xmlUnsetNsProp
- HTML: handling of Script and style data elements, need special code in
the parser and saving functions (handling of < > " ' ...):
http://www.w3.org/TR/html4/types.html#type-script
Attributes are no problems since entities are accepted.
- DOM needs
xmlAttrPtr xmlNewDocProp(xmlDocPtr doc, const xmlChar *name, const xmlChar *value)
- problem when parsing hrefs with & with the HTML parser (IRC ac)
- If the internal encoding is not UTF8 saving to a given encoding doesn't
work => fix to force UTF8 encoding ...
done, added documentation too
- Add an ASCII I/O encoder (asciiToUTF8 and UTF8Toascii)
- Issue warning when using non-absolute namespaces URI.
- the html parser should add <head> and <body> if they don't exist
started, not finished.
Done, the automatic closing is added and 3 testcases were inserted
- Command to force the parser to stop parsing and ignore the rest of the file.
xmlStopParser() should allow this, mostly untested
- support for HTML empty attributes like <hr noshade>
- plugged iconv() in for support of a large set of encodings.
- xmlSwitchToEncoding() rewrite done
- URI checkings (no fragments) rfc2396.txt
- Added a clean mechanism for overload or added input methods:
xmlRegisterInputCallbacks()
- dynamically adapt the alloc entry point to use g_alloc()/g_free()
if the programmer wants it:
- use xmlMemSetup() to reset the routines used.
- Check attribute normalization especially xmlGetProp()
- Validity checking problems for NOTATIONS attributes
- Validity checking problems for ENTITY ENTITIES attributes
- Parsing of a well balanced chunk xmlParseBalancedChunkMemory()
- URI module: validation, base, etc ... see uri.[ch]
- turn tester into a generic program xmllint installed with libxml
- extend validity checks to go through entities content instead of
just labelling them PCDATA
- Save Dtds using the children list instead of dumping the tables,
order is preserved as well as comments and PIs
- Wrote a notice of changes requires to go from 1.x to 2.x
- make sure that all SAX callbacks are disabled if a WF error is detected
- checking/handling of newline normalization
http://localhost/www.xml.com/axml/target.html#sec-line-ends
- correct checking of '&' '%' on entities content.
- checking of PE/Nesting on entities declaration
- checking/handling of xml:space
- checking done.
- handling done, not well tested
- Language identification code, productions [33] to [38]
=> done, the check has been added and report WFness errors
- Conditional sections in DTDs [61] to [65]
=> should this crap be really implemented ???
=> Yep OASIS testsuite uses them
- Allow parsed entities defined in the internal subset to override
the ones defined in the external subset (DtD customization).
=> This mean that the entity content should be computed only at
use time, i.e. keep the orig string only at parse time and expand
only when referenced from the external subset :-(
Needed for complete use of most DTD from Eve Maler
- Add regression tests for all WFC errors
=> did some in test/WFC
=> added OASIS testsuite routines
http://xmlsoft.org/conf/result.html
- I18N: http://wap.trondheim.com/vaer/index.phtml is not XML and accepted
by the XML parser, UTF-8 should be checked when there is no "encoding"
declared !
- Support for UTF-8 and UTF-16 encoding
=> added some conversion routines provided by Martin Durst
patched them, got fixes from @@@
I plan to keep everything internally as UTF-8 (or ISO-Latin-X)
this is slightly more costly but more compact, and recent processors
efficiency is cache related. The key for good performances is keeping
the data set small, so will I.
=> the new progressive reading routines call the detection code
is enabled, tested the ISO->UTF-8 stuff
- External entities loading:
- allow override by client code
- make sure it is called for all external entities referenced
Done, client code should use xmlSetExternalEntityLoader() to set
the default loading routine. It will be called each time an external
entity entity resolution is triggered.
- maintain ID coherency when removing/changing attributes
The function used to deallocate attributes now check for it being an
ID and removes it from the table.
- push mode parsing i.e. non-blocking state based parser
done, both for XML and HTML parsers. Use xmlCreatePushParserCtxt()
and xmlParseChunk() and html counterparts.
The tester program now has a --push option to select that parser
front-end. Douplicated tests to use both and check results are similar.
- Most of XPath, still see some troubles and occasionnal memleaks.
- an XML shell, allowing to traverse/manipulate an XML document with
a shell like interface, and using XPath for the anming syntax
- use of readline and history added when available
- the shell interface has been cleanly separated and moved to debugXML.c
- HTML parser, should be fairly stable now
- API to search the lang of an attribute
- Collect IDs at parsing and maintain a table.
PBM: maintain the table coherency
PBM: how to detect ID types in absence of DtD !
- Use it for XPath ID support
- Add validity checking
Should be finished now !
- Add regression tests with entity substitutions
- External Parsed entities, either XML or external Subset [78] and [79]
parsing the xmllang DtD now works, so it should be sufficient for
most cases !
- progressive reading. The entity support is a first step toward
abstraction of an input stream. A large part of the context is still
located on the stack, moving to a state machine and putting everything
in the parsing context should provide an adequate solution.
=> Rather than progressive parsing, give more power to the SAX-like
interface. Currently the DOM-like representation is built but
=> it should be possible to define that only as a set of SAX callbacks
and remove the tree creation from the parser code.
DONE
- DOM support, instead of using a proprietary in memory
format for the document representation, the parser should
call a DOM API to actually build the resulting document.
Then the parser becomes independent of the in-memory
representation of the document. Even better using RPC's
the parser can actually build the document in another
program.
=> Work started, now the internal representation is by default
very near a direct DOM implementation. The DOM glue is implemented
as a separate module. See the GNOME gdome module.
- C++ support : John Ehresman <jehresma@dsg.harvard.edu>
- Updated code to follow more recent specs, added compatibility flag
- Better error handling, use a dedicated, overridable error
handling function.
- Support for CDATA.
- Keep track of line numbers for better error reporting.
- Support for PI (SAX one).
- Support for Comments (bad, should be in ASAP, they are parsed
but not stored), should be configurable.
- Improve the support of entities on save (+SAX).

View File

@ -1,31 +0,0 @@
- implement counted transitions at the automata level
- Unicode:
+ upgrade to 3.2
+ improve the python script to generate better test
expressions to check the list of ranges.
- Implement the interface at the SAX level
- Implement the missing parts in the Structure part
+ all content model
+ enumerations
+ countless others c.f. the TODO scattered in the code
- Complete the Built-In datatype collections and Facets implementations
- Regression tests based on
+ the primer:
http://www.w3.org/TR/xmlschema-0/
+ the Schemas Test Collection:
http://www.w3.org/2001/05/xmlschema-test-collection/
+ archives of the schemas-dev list
- Integrity constraints:
+ what's that ? How need to read about it
- "formal" checking, i.e. go through the full Structure spec and
bind code and associated parts of the Schemas spec
- go though the erratas
http://www.w3.org/2001/05/xmlschema-errata

View File

@ -1,23 +0,0 @@
XML:
====
- I/O avoid copies when parsing mmap'ed files, need to use
unmutable buffers except for the last 4K to make it 0 terminated
(or get rid of 0 termination check in the whole parser, hard !)
- recheck > 4Gb instances for parsing, and RNG validation.
XSLT:
=====
- global variable access
for each expr in stylesheet : allocate index
for each transformation context
create an index table
cache values in the transformation
- context evaluation
- cache
- constants at the XPAth level
- provide more info on compiled expressions
- dependances w.r.t. variables (which ones)
- dependency on the current node
- dependency on the current document
- do not use _private but other fields in the node structures.

View File

@ -1,257 +0,0 @@
Index: hash.c
===================================================================
RCS file: /cvs/gnome/gnome-xml/hash.c,v
retrieving revision 1.30
diff -u -r1.30 hash.c
--- hash.c 29 Oct 2003 11:18:37 -0000 1.30
+++ hash.c 24 Feb 2004 17:18:42 -0000
@@ -26,6 +26,7 @@
#include <libxml/xmlmemory.h>
#include <libxml/xmlerror.h>
#include <libxml/globals.h>
+#include <libxml/dict.h>
#define MAX_HASH_LEN 8
@@ -38,9 +39,9 @@
typedef xmlHashEntry *xmlHashEntryPtr;
struct _xmlHashEntry {
struct _xmlHashEntry *next;
- xmlChar *name;
- xmlChar *name2;
- xmlChar *name3;
+ const xmlChar *name;
+ const xmlChar *name2;
+ const xmlChar *name3;
void *payload;
int valid;
};
@@ -52,6 +53,7 @@
struct _xmlHashEntry *table;
int size;
int nbElems;
+ xmlDictPtr dict;
};
/*
@@ -143,12 +145,16 @@
xmlHashTablePtr
xmlHashCreate(int size) {
xmlHashTablePtr table;
+ xmlDictPtr dict;
if (size <= 0)
size = 256;
+ dict = xmlDictCreate();
+ if (dict == NULL) return(NULL);
table = xmlMalloc(sizeof(xmlHashTable));
if (table) {
+ table->dict = dict;
table->size = size;
table->nbElems = 0;
table->table = xmlMalloc(size * sizeof(xmlHashEntry));
@@ -158,6 +164,7 @@
}
xmlFree(table);
}
+ xmlDictFree(dict);
return(NULL);
}
@@ -282,12 +289,6 @@
next = iter->next;
if ((f != NULL) && (iter->payload != NULL))
f(iter->payload, iter->name);
- if (iter->name)
- xmlFree(iter->name);
- if (iter->name2)
- xmlFree(iter->name2);
- if (iter->name3)
- xmlFree(iter->name3);
iter->payload = NULL;
if (!inside_table)
xmlFree(iter);
@@ -299,6 +300,7 @@
}
xmlFree(table->table);
}
+ xmlDictFree(table->dict);
xmlFree(table);
}
@@ -465,6 +467,9 @@
if ((table == NULL) || name == NULL)
return(-1);
+ if (name) name = xmlDictLookup(table->dict, name, -1);
+ if (name2) name2 = xmlDictLookup(table->dict, name2, -1);
+ if (name3) name3 = xmlDictLookup(table->dict, name3, -1);
/*
* Check for duplicate and insertion location.
@@ -475,15 +480,15 @@
} else {
for (insert = &(table->table[key]); insert->next != NULL;
insert = insert->next) {
- if ((xmlStrEqual(insert->name, name)) &&
- (xmlStrEqual(insert->name2, name2)) &&
- (xmlStrEqual(insert->name3, name3)))
+ if ((insert->name == name) &&
+ (insert->name2 == name2) &&
+ (insert->name3 == name3))
return(-1);
len++;
}
- if ((xmlStrEqual(insert->name, name)) &&
- (xmlStrEqual(insert->name2, name2)) &&
- (xmlStrEqual(insert->name3, name3)))
+ if ((insert->name == name) &&
+ (insert->name2 == name2) &&
+ (insert->name3 == name3))
return(-1);
}
@@ -495,9 +500,9 @@
return(-1);
}
- entry->name = xmlStrdup(name);
- entry->name2 = xmlStrdup(name2);
- entry->name3 = xmlStrdup(name3);
+ entry->name = name;
+ entry->name2 = name2;
+ entry->name3 = name3;
entry->payload = userdata;
entry->next = NULL;
entry->valid = 1;
@@ -539,6 +544,9 @@
if ((table == NULL) || name == NULL)
return(-1);
+ if (name) name = xmlDictLookup(table->dict, name, -1);
+ if (name2) name2 = xmlDictLookup(table->dict, name2, -1);
+ if (name3) name3 = xmlDictLookup(table->dict, name3, -1);
/*
* Check for duplicate and insertion location.
@@ -549,18 +557,18 @@
} else {
for (insert = &(table->table[key]); insert->next != NULL;
insert = insert->next) {
- if ((xmlStrEqual(insert->name, name)) &&
- (xmlStrEqual(insert->name2, name2)) &&
- (xmlStrEqual(insert->name3, name3))) {
+ if ((insert->name == name) &&
+ (insert->name2 == name2) &&
+ (insert->name3 == name3)) {
if (f)
f(insert->payload, insert->name);
insert->payload = userdata;
return(0);
}
}
- if ((xmlStrEqual(insert->name, name)) &&
- (xmlStrEqual(insert->name2, name2)) &&
- (xmlStrEqual(insert->name3, name3))) {
+ if ((insert->name == name) &&
+ (insert->name2 == name2) &&
+ (insert->name3 == name3)) {
if (f)
f(insert->payload, insert->name);
insert->payload = userdata;
@@ -576,9 +584,9 @@
return(-1);
}
- entry->name = xmlStrdup(name);
- entry->name2 = xmlStrdup(name2);
- entry->name3 = xmlStrdup(name3);
+ entry->name = name;
+ entry->name2 = name2;
+ entry->name3 = name3;
entry->payload = userdata;
entry->next = NULL;
entry->valid = 1;
@@ -615,10 +623,13 @@
key = xmlHashComputeKey(table, name, name2, name3);
if (table->table[key].valid == 0)
return(NULL);
+ if (name) name = xmlDictLookup(table->dict, name, -1);
+ if (name2) name2 = xmlDictLookup(table->dict, name2, -1);
+ if (name3) name3 = xmlDictLookup(table->dict, name3, -1);
for (entry = &(table->table[key]); entry != NULL; entry = entry->next) {
- if ((xmlStrEqual(entry->name, name)) &&
- (xmlStrEqual(entry->name2, name2)) &&
- (xmlStrEqual(entry->name3, name3)))
+ if ((entry->name == name) &&
+ (entry->name2 == name2) &&
+ (entry->name3 == name3))
return(entry->payload);
}
return(NULL);
@@ -774,6 +785,9 @@
if (f == NULL)
return;
+ if (name) name = xmlDictLookup(table->dict, name, -1);
+ if (name2) name2 = xmlDictLookup(table->dict, name2, -1);
+ if (name3) name3 = xmlDictLookup(table->dict, name3, -1);
if (table->table) {
for(i = 0; i < table->size; i++) {
if (table->table[i].valid == 0)
@@ -781,9 +795,9 @@
iter = &(table->table[i]);
while (iter) {
next = iter->next;
- if (((name == NULL) || (xmlStrEqual(name, iter->name))) &&
- ((name2 == NULL) || (xmlStrEqual(name2, iter->name2))) &&
- ((name3 == NULL) || (xmlStrEqual(name3, iter->name3))) &&
+ if (((name == NULL) || (name == iter->name)) &&
+ ((name2 == NULL) || (name2 == iter->name2)) &&
+ ((name3 == NULL) || (name3 == iter->name3)) &&
(iter->payload != NULL)) {
f(iter->payload, data, iter->name,
iter->name2, iter->name3);
@@ -913,19 +927,16 @@
if (table->table[key].valid == 0) {
return(-1);
} else {
+ if (name) name = xmlDictLookup(table->dict, name, -1);
+ if (name2) name2 = xmlDictLookup(table->dict, name2, -1);
+ if (name3) name3 = xmlDictLookup(table->dict, name3, -1);
for (entry = &(table->table[key]); entry != NULL; entry = entry->next) {
- if (xmlStrEqual(entry->name, name) &&
- xmlStrEqual(entry->name2, name2) &&
- xmlStrEqual(entry->name3, name3)) {
+ if ((entry->name == name) &&
+ (entry->name2 == name2) &&
+ (entry->name3 == name3)) {
if ((f != NULL) && (entry->payload != NULL))
f(entry->payload, entry->name);
entry->payload = NULL;
- if(entry->name)
- xmlFree(entry->name);
- if(entry->name2)
- xmlFree(entry->name2);
- if(entry->name3)
- xmlFree(entry->name3);
if(prev) {
prev->next = entry->next;
xmlFree(entry);
Index: include/libxml/hash.h
===================================================================
RCS file: /cvs/gnome/gnome-xml/include/libxml/hash.h,v
retrieving revision 1.15
diff -u -r1.15 hash.h
--- include/libxml/hash.h 20 Nov 2003 11:59:07 -0000 1.15
+++ include/libxml/hash.h 24 Feb 2004 17:18:42 -0000
@@ -42,7 +42,7 @@
*
* Callback to free data from a hash.
*/
-typedef void (*xmlHashDeallocator)(void *payload, xmlChar *name);
+typedef void (*xmlHashDeallocator)(void *payload, const xmlChar *name);
/**
* xmlHashCopier:
* @payload: the data in the hash

View File

@ -1,11 +0,0 @@
Reuses a dictionary for the hash table to reduce the string compare
costs. Not worth it unless validating big DTDs
without with
db10000 tree 175/79 179/81
db100000 stream 1222 1217
dba100000stream 593 601
REC validation 1986 2098
Docbook valid 10808 10649
Tue Feb 24 19:09:49 CET 2004

View File

@ -6,9 +6,6 @@
SUBDIRS = . tests
docsdir = $(docdir)/python
dist_docs_DATA = TODO
EXTRA_DIST = \
generator.py \
libxml.py \

View File

@ -1,55 +0,0 @@
TODO for the libxml2 Python wrappers
Things to do:
-------------
- SAX interfaces
- push is done but no generic interface
- elementDecl need some work
- need more testing and check full callbacks for xmllib/sgmlop replacement
- enums -> libxml.py
- access to XPath variables
- xmlBuffer exposure
- xpathContext, being able to set/get info and clean it up
- more work needed on context handling for function lookup
and use of an hash table.
- add regression tests
- SAX flow
- DTD element and attributes content accesses
- attribute handled in SAX
- element needed in both
Done:
-----
- class hierarchy:
+ make specific node type inherit from xmlNode
done, had to sort the classes in the output
+ get the generator to output a classes.txt description
done libxml2class.txt
- add regression tests
- tests/Makefile.am: export the Python class path
- xpath queries
- xpath extension
- check memory
- build tree
- saving
- extensions based on a python.xml description of the new specific
interfaces
file libxml2-python-api.xml , first entry is xmlRegisterXPathFunction
- spec file: automatically generate for pythonX.Y if found
Done, a bit ugly by running new makes in %install for each level
found.
- error redirections and preformat
- handling of node.content
- access to xmlParserCtxt and push mode
- needed for SAX too
- entry points
- wrappers
- decent interface for setting/getting behaviour
- memory debug interfaces
- SAX interfaces
- basic stuff with push is available
- basic xmllib replacement
Daniel Veillard