blob: a53e482cb046ecd3d89bd9b4ec0e394edb9b9477 [file] [log] [blame]
Daniel Veillardcec50a62003-10-28 13:26:51 +00001124907 HTML parse buffer problem when parsing larse in-memory docs
Daniel Veillardcec50a62003-10-28 13:26:51 +00002124110 DTD validation && wrong namespace
Daniel Veillardcec50a62003-10-28 13:26:51 +00003123564 xmllint --html --format
Daniel Veillard01791d51998-07-24 19:24:09 +00004
Daniel Veillardad8f99d2000-01-15 14:20:03 +00005 TODO for the XML parser and stuff:
6 ==================================
Daniel Veillard01791d51998-07-24 19:24:09 +00007
Daniel Veillardc4f65ab2003-04-21 23:07:45 +00008 $Id$
Daniel Veillarde39a93d2001-04-28 14:35:02 +00009
10 this tend to be outdated :-\ ...
Daniel Veillard361d8452000-04-03 19:48:13 +000011
Daniel Veillard28ae6362001-07-14 16:44:32 +000012DOCS:
13=====
14
15- use case of using XInclude to load for example a description.
16 order document + product base -(XSLT)-> quote with XIncludes
17 |
18 HTML output with description of parts <---(XSLT)--
19
Daniel Veillard75c29212000-03-14 18:33:47 +000020TODO:
21=====
22
Daniel Veillardcc199e02003-10-24 21:11:48 +000023- E20
24[17:21:38] <PGrosso> DV, you have an action to Check what your parser does on E20. Have you done this?
25[17:22:42] <PGrosso> DV, ref: http://www.w3.org/XML/xml-V10-2e-errata#E20
26[17:39:07] <DV> paphio:~/XML -> cat tst.xml
27[17:39:07] <DV> <!DOCTYPE test [
28[17:39:07] <DV> <!ELEMENT test EMPTY>
29[17:39:07] <DV> <!ATTLIST test attr1 NMTOKENS #IMPLIED>
30[17:39:07] <DV> <!ATTLIST test attr2 NMTOKENS #IMPLIED>
31[17:39:07] <DV> <!ATTLIST test attr3 NMTOKENS #IMPLIED>
32[17:39:07] <DV> ]>
33[17:39:07] <DV> <test
34[17:39:07] <DV> attr1=" a b "
35[17:39:07] <DV> attr2=" a&#x20;b "
36[17:39:07] <DV> attr3=" a&#x9;b "
37[17:39:07] <DV> />
38[17:39:07] <DV> paphio:~/XML -> xmllint --valid tst.xml
39[17:39:07] <DV> <?xml version="1.0"?>
40[17:39:07] <DV> <!DOCTYPE test [
41[17:39:07] <DV> <!ELEMENT test EMPTY>
42[17:39:07] <DV> <!ATTLIST test attr1 NMTOKENS #IMPLIED>
43[17:39:07] <DV> <!ATTLIST test attr2 NMTOKENS #IMPLIED>
44[17:39:07] <DV> <!ATTLIST test attr3 NMTOKENS #IMPLIED>
45[17:39:07] <DV> ]>
46[17:39:07] <DV> <test attr1="a b" attr2="a b" attr3="a&#9;b"/>
47[17:39:07] <DV> paphio:~/XML ->
48[17:39:16] <DV> I think it's okay
49[17:40:28] <PGrosso> DV, so you're saying that your parser implements E20 correctly, right?
50[17:40:48] <DV> assuming I understood E20 point correctly, yes
51[17:41:15] <DV> and that's because I'm unsure taht I pasted the est document and result
52[17:41:25] <DV> s/ est/ test/
53[17:48:56] <richard> does your parser say that document is invalid?
54[17:49:03] <DV> richard: did I understood it ?
55[17:49:11] <DV> richard: no it considers it valid
56[17:49:16] <richard> that document is invalid
57[17:49:47] <DV> ah , well it's unclear
58[17:50:03] <richard> the normalized value is a-tab-b, which you are correctly serializing as a&#9;b, but it is invalid
59[17:50:11] <DV> richard: okay
60[17:50:23] <DV> that should be really easy to fix
61[17:50:39] <richard> the validity check should require a single space between tokens
62[17:51:03] <DV> no leading and no trailing either
63[17:51:07] <richard> right
64[17:51:18] <DV> which makes sense
65[17:52:42] <richard> a&#32;b is valid, because it turns into a-space-b anyway without any normalization
66[17:54:31] <DV> okay that's attr2 attr2=" a&#x20;b "
67[17:54:44] * DV tends to still think in hexa
68[17:55:59] <DV> richard: and attr2="a&#x20; b" would lead to a validity error too then, if I understand correctly
69[17:56:37] <richard> attr2 is valid
70[17:57:11] <richard> the normalized value is a space b
Daniel Veillard8edf1c52003-07-22 20:52:14 +000071- XInclude at the SAX level (libSRVG)
Daniel Veillard4ec885a2001-06-17 10:31:07 +000072- fix the C code prototype to bring back doc/libxml-undocumented.txt
73 to a reasonable level
Daniel Veillardbf432752000-11-12 15:56:56 +000074- Computation of base when HTTP redirect occurs, might affect HTTP
75 interfaces.
Daniel Veillardc4f65ab2003-04-21 23:07:45 +000076- Computation of base in XInclude. Relativization of URIs.
Daniel Veillarde0854c32000-08-27 21:12:29 +000077- listing all attributes in a node.
Daniel Veillard75c29212000-03-14 18:33:47 +000078- Better checking of external parsed entities TAG 1234
Daniel Veillard75c29212000-03-14 18:33:47 +000079- Go through erratas and do the cleanup.
Daniel Veillarde0854c32000-08-27 21:12:29 +000080 http://www.w3.org/XML/xml-19980210-errata ... started ...
Daniel Veillard46057e12000-09-24 18:49:59 +000081- jamesh suggestion: SAX like functions to save a document ie. call a
82 function to open a new element with given attributes, write character
83 data, close last element, etc
Daniel Veillarde19fc232002-04-22 16:01:24 +000084 + inversted SAX, initial patch in April 2002 archives.
Daniel Veillarda6d8eb62000-12-27 10:46:47 +000085- htmlParseDoc has parameter encoding which is not used.
86 Function htmlCreateDocParserCtxt ignore it.
Daniel Veillardc2f4df22001-01-04 14:06:39 +000087- fix realloc() usage.
Daniel Veillard8cf14d52001-06-23 16:32:46 +000088- Stricten the UTF8 conformance (Martin Duerst):
89 http://www.w3.org/2001/06/utf-8-test/.
90 The bad files are in http://www.w3.org/2001/06/utf-8-wrong/.
Daniel Veillardd7e4d652001-06-15 14:57:10 +000091
Daniel Veillardad8f99d2000-01-15 14:20:03 +000092
93TODO:
94=====
95
Daniel Veillarde19fc232002-04-22 16:01:24 +000096- move all string manipulation functions (xmlStrdup, xmlStrlen, etc.) to
97 global.c. Bjorn noted that the following files depends on parser.o solely
98 because of these string functions: entities.o, global.o, hash.o, tree.o,
99 xmlIO.o, and xpath.o.
Daniel Veillardad8f99d2000-01-15 14:20:03 +0000100
Daniel Veillard3dd82e72000-03-20 11:48:04 +0000101- Optimization of tag strings allocation ?
Daniel Veillard75c29212000-03-14 18:33:47 +0000102
103- maintain coherency of namespace when doing cut'n paste operations
104 => the functions are coded, but need testing
105
Daniel Veillard3dd82e72000-03-20 11:48:04 +0000106- function to rebuild the ID table
107- functions to rebuild the DTD hash tables (after DTD changes).
Daniel Veillard75c29212000-03-14 18:33:47 +0000108
Daniel Veillard75c29212000-03-14 18:33:47 +0000109
110EXTENSIONS:
111===========
Daniel Veillard3dd82e72000-03-20 11:48:04 +0000112
Daniel Veillard75c29212000-03-14 18:33:47 +0000113- Tools to produce man pages from the SGML docs.
Daniel Veillardad8f99d2000-01-15 14:20:03 +0000114
115- Add Xpointer recognition/API
116
117- Add Xlink recognition/API
118 => started adding an xlink.[ch] with a unified API for XML and HTML.
Daniel Veillard496a1cf2000-05-03 14:20:55 +0000119 it's crap :-(
Daniel Veillardad8f99d2000-01-15 14:20:03 +0000120
Daniel Veillardad8f99d2000-01-15 14:20:03 +0000121- Implement XSchemas
Daniel Veillard496a1cf2000-05-03 14:20:55 +0000122 => Really need to be done <grin/>
Daniel Veillardc4f65ab2003-04-21 23:07:45 +0000123 - datatype are complete, but structure support is very limited.
Daniel Veillardad8f99d2000-01-15 14:20:03 +0000124
Daniel Veillardad8f99d2000-01-15 14:20:03 +0000125- extend the shell with:
126 - edit
127 - load/save
128 - mv (yum, yum, but it's harder because directories are ordered in
129 our case, mvup and mvdown would be required)
130
Daniel Veillardc4f65ab2003-04-21 23:07:45 +0000131
132Done:
133=====
134
Daniel Veillardad8f99d2000-01-15 14:20:03 +0000135- Add HTML validation using the XHTML DTD
136 - problem: do we want to keep and maintain the code for handling
137 DTD/System ID cache directly in libxml ?
Daniel Veillardc4f65ab2003-04-21 23:07:45 +0000138 => not really done that way, but there are new APIs to check elements
139 or attributes. Otherwise XHTML validation directly ...
140
141- XML Schemas datatypes except Base64 and BinHex
142
143- Relax NG validation
144
145- XmlTextReader streaming API + validation
Daniel Veillardad8f99d2000-01-15 14:20:03 +0000146
147- Add a DTD cache prefilled with xhtml DTDs and entities and a program to
148 manage them -> like the /usr/bin/install-catalog from SGML
149 right place seems $datadir/xmldtds
Daniel Veillard361d8452000-04-03 19:48:13 +0000150 Maybe this is better left to user apps
Daniel Veillardc4f65ab2003-04-21 23:07:45 +0000151 => use a catalog instead , and xhtml1-dtd package
Daniel Veillardad8f99d2000-01-15 14:20:03 +0000152
Daniel Veillardc4f65ab2003-04-21 23:07:45 +0000153- Add output to XHTML
154 => XML serializer automatically recognize the DTd and apply the specific
155 rules.
Daniel Veillardad8f99d2000-01-15 14:20:03 +0000156
Daniel Veillardc4f65ab2003-04-21 23:07:45 +0000157- Fix output of <tst val="x&#xA;y"/>
Daniel Veillarde3d88ef2000-01-24 13:55:06 +0000158
Daniel Veillardc4f65ab2003-04-21 23:07:45 +0000159- compliance to XML-Namespace checking, see section 6 of
160 http://www.w3.org/TR/REC-xml-names/
161
162- Correct standalone checking/emitting (hard)
163 2.9 Standalone Document Declaration
Daniel Veillardad8f99d2000-01-15 14:20:03 +0000164
Daniel Veillarde19fc232002-04-22 16:01:24 +0000165- Implement OASIS XML Catalog support
166 http://www.oasis-open.org/committees/entity/
167
168- Get OASIS testsuite to a more friendly result, check all the results
169 once stable. the check-xml-test-suite.py script does this
170
Daniel Veillard96ed5832001-06-15 22:22:04 +0000171- Implement XSLT
172 => libxslt
173
174- Finish XPath
175 => attributes addressing troubles
176 => defaulted attributes handling
177 => namespace axis ?
178 done as XSLT got debugged
179
Daniel Veillardd7e4d652001-06-15 14:57:10 +0000180- bug reported by Michael Meallin on validation problems
181 => Actually means I need to add support (and warn) for non-deterministic
182 content model.
183- Handle undefined namespaces in entity contents better ... at least
184 issue a warning
Daniel Veillard9403a042001-05-28 11:00:53 +0000185- DOM needs
186 int xmlPruneProp(xmlNodePtr node, xmlAtttrPtr attr);
187 => done it's actually xmlRemoveProp xmlUnsetProp xmlUnsetNsProp
188
Daniel Veillard1e851392000-10-15 10:02:56 +0000189- HTML: handling of Script and style data elements, need special code in
190 the parser and saving functions (handling of < > " ' ...):
191 http://www.w3.org/TR/html4/types.html#type-script
192 Attributes are no problems since entities are accepted.
Daniel Veillarde0854c32000-08-27 21:12:29 +0000193- DOM needs
194 xmlAttrPtr xmlNewDocProp(xmlDocPtr doc, const xmlChar *name, const xmlChar *value)
Daniel Veillard2f2bf412000-08-20 15:11:02 +0000195- problem when parsing hrefs with & with the HTML parser (IRC ac)
196- If the internal encoding is not UTF8 saving to a given encoding doesn't
197 work => fix to force UTF8 encoding ...
198 done, added documentation too
Daniel Veillard32bc74e2000-07-14 14:49:25 +0000199- Add an ASCII I/O encoder (asciiToUTF8 and UTF8Toascii)
200- Issue warning when using non-absolute namespaces URI.
201- the html parser should add <head> and <body> if they don't exist
202 started, not finished.
203 Done, the automatic closing is added and 3 testcases were inserted
Daniel Veillard3f6f7f62000-06-30 17:58:25 +0000204- Command to force the parser to stop parsing and ignore the rest of the file.
Daniel Veillard32bc74e2000-07-14 14:49:25 +0000205 xmlStopParser() should allow this, mostly untested
Daniel Veillardbe803962000-06-28 23:40:59 +0000206- support for HTML empty attributes like <hr noshade>
207- plugged iconv() in for support of a large set of encodings.
208- xmlSwitchToEncoding() rewrite done
Daniel Veillard496a1cf2000-05-03 14:20:55 +0000209- URI checkings (no fragments) rfc2396.txt
Daniel Veillard5d211f42000-04-07 17:00:24 +0000210- Added a clean mechanism for overload or added input methods:
211 xmlRegisterInputCallbacks()
Daniel Veillard361d8452000-04-03 19:48:13 +0000212- dynamically adapt the alloc entry point to use g_alloc()/g_free()
213 if the programmer wants it:
214 - use xmlMemSetup() to reset the routines used.
215- Check attribute normalization especially xmlGetProp()
216- Validity checking problems for NOTATIONS attributes
217- Validity checking problems for ENTITY ENTITIES attributes
218- Parsing of a well balanced chunk xmlParseBalancedChunkMemory()
219- URI module: validation, base, etc ... see uri.[ch]
220- turn tester into a generic program xmllint installed with libxml
Daniel Veillardec303412000-03-24 13:41:54 +0000221- extend validity checks to go through entities content instead of
222 just labelling them PCDATA
Daniel Veillard75c29212000-03-14 18:33:47 +0000223- Save Dtds using the children list instead of dumping the tables,
224 order is preserved as well as comments and PIs
225- Wrote a notice of changes requires to go from 1.x to 2.x
226- make sure that all SAX callbacks are disabled if a WF error is detected
227- checking/handling of newline normalization
228 http://localhost/www.xml.com/axml/target.html#sec-line-ends
229- correct checking of '&' '%' on entities content.
230- checking of PE/Nesting on entities declaration
231- checking/handling of xml:space
232 - checking done.
233 - handling done, not well tested
234- Language identification code, productions [33] to [38]
235 => done, the check has been added and report WFness errors
236- Conditional sections in DTDs [61] to [65]
237 => should this crap be really implemented ???
238 => Yep OASIS testsuite uses them
239- Allow parsed entities defined in the internal subset to override
240 the ones defined in the external subset (DtD customization).
241 => This mean that the entity content should be computed only at
242 use time, i.e. keep the orig string only at parse time and expand
243 only when referenced from the external subset :-(
244 Needed for complete use of most DTD from Eve Maler
245- Add regression tests for all WFC errors
246 => did some in test/WFC
247 => added OASIS testsuite routines
248 http://xmlsoft.org/conf/result.html
249
250- I18N: http://wap.trondheim.com/vaer/index.phtml is not XML and accepted
251 by the XML parser, UTF-8 should be checked when there is no "encoding"
252 declared !
253- Support for UTF-8 and UTF-16 encoding
254 => added some convertion routines provided by Martin Durst
255 patched them, got fixes from @@@
256 I plan to keep everything internally as UTF-8 (or ISO-Latin-X)
257 this is slightly more costly but more compact, and recent processors
258 efficiency is cache related. The key for good performances is keeping
259 the data set small, so will I.
260 => the new progressive reading routines call the detection code
261 is enabled, tested the ISO->UTF-8 stuff
Daniel Veillardad8f99d2000-01-15 14:20:03 +0000262- External entities loading:
263 - allow override by client code
264 - make sure it is alled for all external entities referenced
265 Done, client code should use xmlSetExternalEntityLoader() to set
266 the default loading routine. It will be called each time an external
267 entity entity resolution is triggered.
268- maintain ID coherency when removing/changing attributes
269 The function used to deallocate attributes now check for it being an
270 ID and removes it from the table.
271- push mode parsing i.e. non-blocking state based parser
272 done, both for XML and HTML parsers. Use xmlCreatePushParserCtxt()
273 and xmlParseChunk() and html counterparts.
274 The tester program now has a --push option to select that parser
275 front-end. Douplicated tests to use both and check results are similar.
276
277- Most of XPath, still see some troubles and occasionnal memleaks.
278- an XML shell, allowing to traverse/manipulate an XML document with
279 a shell like interface, and using XPath for the anming syntax
280 - use of readline and history added when available
281 - the shell interface has been cleanly separated and moved to debugXML.c
282- HTML parser, should be fairly stable now
283- API to search the lang of an attribute
284- Collect IDs at parsing and maintain a table.
285 PBM: maintain the table coherency
286 PBM: how to detect ID types in absence of DtD !
287- Use it for XPath ID support
288- Add validity checking
289 Should be finished now !
290- Add regression tests with entity substitutions
291
292- External Parsed entities, either XML or external Subset [78] and [79]
293 parsing the xmllang DtD now works, so it should be sufficient for
294 most cases !
295
296- progressive reading. The entity support is a first step toward
Daniel Veillard260a68f1998-08-13 03:39:55 +0000297 asbtraction of an input stream. A large part of the context is still
298 located on the stack, moving to a state machine and putting everyting
299 in the parsing context should provide an adequate solution.
Daniel Veillardad8f99d2000-01-15 14:20:03 +0000300 => Rather than progressive parsing, give more power to the SAX-like
301 interface. Currently the DOM-like representation is built but
302 => it should be possible to define that only as a set of SAX callbacks
303 and remove the tree creation from the parser code.
304 DONE
Daniel Veillard01791d51998-07-24 19:24:09 +0000305
Daniel Veillardad8f99d2000-01-15 14:20:03 +0000306- DOM support, instead of using a proprietary in memory
307 format for the document representation, the parser should
308 call a DOM API to actually build the resulting document.
309 Then the parser becomes independent of the in-memory
310 representation of the document. Even better using RPC's
311 the parser can actually build the document in another
312 program.
313 => Work started, now the internal representation is by default
314 very near a direct DOM implementation. The DOM glue is implemented
315 as a separate module. See the GNOME gdome module.
316
Daniel Veillard01791d51998-07-24 19:24:09 +0000317- C++ support : John Ehresman <jehresma@dsg.harvard.edu>
318- Updated code to follow more recent specs, added compatibility flag
Daniel Veillard260a68f1998-08-13 03:39:55 +0000319- Better error handling, use a dedicated, overridable error
320 handling function.
321- Support for CDATA.
322- Keep track of line numbers for better error reporting.
323- Support for PI (SAX one).
Daniel Veillardad8f99d2000-01-15 14:20:03 +0000324- Support for Comments (bad, should be in ASAP, they are parsed
325 but not stored), should be configurable.
326- Improve the support of entities on save (+SAX).
Daniel Veillard01791d51998-07-24 19:24:09 +0000327