Merge from emacs--rel--22
[bpt/emacs.git] / lisp / nxml / TODO
1 * High priority
2
3 ** Command to insert an element template, including all required
4 attributes and child elements. When there's a choice of elements
5 possible, we could insert a comment, and put an overlay on that
6 comment that makes it behave like a button with a pop-up menu to
7 select the appropriate choice.
8
9 ** Command to tag a region. With a schema should complete using legal
10 tags, but should work without a schema as well.
11
12 ** Provide a way to conveniently rename an element. With a schema should
13 complete using legal tags, but should work without a schema as well.
14
15 * Outlining
16
17 ** Implement C-c C-o C-q.
18
19 ** Install pre/post command hook for moving out of invisible section.
20
21 ** Put a modify hook on invisible sections that expands them.
22
23 ** Integrate dumb folding somehow.
24
25 ** An element should be able to be its own heading.
26
27 ** Optimize to avoid complete buffer scan on each command.
28
29 ** Make it work with HTML-style headings (i.e. level indicated by
30 name of heading element rather than depth of section nesting).
31
32 ** Recognize root element as a section provided it has a title, even
33 if it doesn't match section-element-name-regex.
34
35 ** Support for incremental search automatically making hidden text
36 visible.
37
38 ** Allow title to be an attribute.
39
40 ** Command that says to recognize the tag at point as a section/heading.
41
42 ** Explore better ways to determine when an element is a section
43 or a heading.
44
45 ** rng-next-error needs to either ignore invisible portion or reveal it
46 (maybe use isearch oriented text properties).
47
48 ** Errors within hidden section should be highlighted by underlining the
49 ellipsis.
50
51 ** Make indirect buffers work.
52
53 ** How should nxml-refresh outline recover from non well-formed tags?
54
55 ** Hide tags in title elements?
56
57 ** Use overlays instead of text properties for holding outline state?
58 Necessary for indirect buffers to work?
59
60 ** Allow an outline to go in the speedbar.
61
62 ** Split up outlining manual section into subsections.
63
64 ** More detail in the manual about each outlining command.
65
66 ** More menu entries for hiding/showing?
67
68 ** Indication of many lines have been hidden?
69
70 * Locating schemas
71
72 ** Should rng-validate-mode give the user an opportunity to specify a
73 schema if there is currently none? Or should it at least give a hint
74 to the user how to specify a non-vacuous schema?
75
76 ** Support for adding new schemas to schema-locating files. Add
77 documentElement and namespace elements.
78
79 ** C-c C-w should be able to report current type id.
80
81 ** Implement doctypePublicId.
82
83 ** Implement typeIdBase.
84
85 ** Implement typeIdProcessingInstruction.
86
87 ** Support xml:base.
88
89 ** Implement group.
90
91 ** Find preferred prefix from schema-locating files. Get rid of
92 rng-preferred-prefix-alist.
93
94 ** Inserting document element with vacuous schema should complete using
95 document elements declared in schema locating files, and set schema
96 appropriately.
97
98 ** Add a ruleType attribute to the <include> element?
99
100 ** Allow processing instruction in prolog to contain the compact syntax
101 schema directly.
102
103 ** Use RDDL to locate a schema based on the namespace URI.
104
105 ** Should not prompt to add redundant association to schema locating
106 file.
107
108 ** Command to reload current schema.
109
110 * Schema-sensitive features
111
112 ** Should filter dynamic markup possibilities using schema validity, by
113 adding hook to nxml-mode.
114
115 ** Dynamic markup word should (at least optionally) be able to look in
116 other buffers that are using nxml-mode.
117
118 ** Should clicking on Invalid move to next error if already on an error?
119
120 ** Take advantage of a:documentation. Needs change to schema format.
121
122 ** Provide feasible validation (as in Jing) toggle.
123
124 ** Save the validation state as a property on the error overlay to enable
125 more detailed diagnosis.
126
127 ** Provide an Error Summary buffer showing all the validation errors.
128
129 ** Pop-up menu. What is useful? Tag a region (should be greyed out if
130 the region is not balanced). Suggestions based on error messages.
131
132 ** Have configurable list of namespace URIs so that we can provide
133 namespace URI completion on extension elements or with schema-less
134 documents.
135
136 ** Allow validation to handle XInclude.
137
138 ** ID/IDREF support.
139
140 * Completion
141
142 ** Make it work with icomplete. Only use a function to complete when
143 some of the possible names have undeclared namespaces.
144
145 ** How should C-return in mixed text work?
146
147 ** When there's a vacuous schema, C-return after < will insert the
148 end-tag. Is this a bug or a feature?
149
150 ** After completing start-tag, ensure we don't get unhelpful message
151 from validation
152
153 ** Syntax table for completion.
154
155 ** Should complete start-tag name with a space if namespace attributes
156 are required.
157
158 ** When completing start-tag name with no prefix and it doesn't match
159 should try to infer namespace from local name.
160
161 ** Should completion pay attention to characters after point? If so,
162 how?
163
164 ** When completing start-tag name, add required atts if only one required
165 attribute.
166
167 ** When completing attribute name, add attribute value if only one value
168 is possible.
169
170 ** After attribute-value completion, insert space after close delimiter
171 if more attributes are required.
172
173 ** Complete on enumerated data values in elements.
174
175 ** When in context that allows only elements, should get tag
176 completion without having to type < first.
177
178 ** When immediately after start-tag name, and name is valid and not
179 prefix of any other name, should C-return complete on attribute names?
180
181 ** When completing attributes, more consistent to ignore all attributes
182 after point.
183
184 ** Inserting attribute value completions needs to be sensitive to what
185 delimiter is used so that it quotes the correct character.
186
187 ** Complete on encoding-names in XML decl.
188
189 ** Complete namespace declarations by searching for all namespaces
190 mentioned in the schema.
191
192 * Well-formed XML support
193
194 ** Deal better with Mule-UCS
195
196 ** Deal with UTF-8 BOM when reading.
197
198 ** Complete entity names.
199
200 ** Provide some support for entity names for MathML.
201
202 ** Command to repeat the last tag.
203
204 ** Support for changing between character references and characters.
205 Need to check that context is one in which character references are
206 allowed. xmltok prolog parsing will need to distinguish parameter
207 literals from other kinds of literal.
208
209 ** Provide a comment command to bind to M-; that works better than the
210 normal one.
211
212 ** Make indenting in a multi-line comment work.
213
214 ** Structure view. Separate buffer displaying element tree. Be able to
215 navigate from structure view to document and vice-versa.
216
217 ** Flash matching >.
218
219 ** Smart selection command that selects increasingly large syntactically
220 coherent chunks of XML. If point is in an attribute value, first
221 select complete value; then if command is repeated, select value plus
222 delimiters, then select attribute name as well, then complete
223 start-tag, then complete element, then enclosing element, etc.
224
225 ** ispell integration.
226
227 ** Block-level items in mixed content should be indented, e.g:
228 <para>This is list:
229 <ul>
230 <li>item</li>
231
232 ** Provide option to indent like this:
233
234 ** <para>This is a paragraph
235 occupying multiple lines.</para>
236
237 ** Option to add make a / that closes a start-tag electrically insert a
238 space for the XHTML guys.
239
240 ** C-M-q should work.
241
242 * Datatypes
243
244 ** Figure out workaround for CJK characters with regexps.
245
246 ** Does category C contain Cn?
247
248 ** Do ENTITY datatype properly.
249
250 * XML Parsing Library
251
252 ** Parameter entity parsing option, nil (never), t (always),
253 unless-standalone (unless standalone="yes" in XML declaration).
254
255 ** When a file is currently being edited, there should be an option to
256 use its buffer instead of the on-disk copy.
257
258 * Handling all XML features
259
260 ** Provide better support for editing external general parsed entities.
261 Perhaps provide a way to force ignoring undefined entities; maybe turn
262 this on automatically with <?xml encoding=""?> (with no version
263 pseudo-att).
264
265 ** Handle internal general entity declarations containing elements.
266
267 ** Handle external general entity declarations.
268
269 ** Handle default attribute declarations in internal subset.
270
271 ** Handle parameter entities (including DTD).
272
273 * RELAX NG
274
275 ** Do complete schema checking, at least optionally.
276
277 ** Detect include/external loops during schema parse.
278
279 ** Coding system detection for schemas. Should use utf-8/utf-16 per the
280 spec. But also need to allow encodings other than UTF-8/16 to support
281 CJK charsets that Emacs cannot represent in Unicode.
282
283 * Catching XML errors
284
285 ** Check public identifiers.
286
287 ** Check default attribute values.
288
289 * Performance
290
291 ** Explore whether overlay-recenter can cure overlays performance
292 problems.
293
294 ** Cache schemas. Need to have list of files and mtimes.
295
296 ** Make it possible to reduce rng-validate-chunk-size significantly,
297 perhaps to 500 bytes, without bad performance impact: don't do
298 redisplay on every chunk; pass continue functions on other uses of
299 rng-do-some-validation.
300
301 ** Cache after first tag.
302
303 ** Introduce a new name class that is a choice between names (so that
304 we can use member)
305
306 ** intern-choice should simplify after patterns with same 1st/2nd args
307
308 ** Large numbers of overlays slow things down dramatically. Represent
309 errors using text properties. This implies we cannot incrementally
310 keep track of the number of errors, in order to determine validity.
311 Instead, when validation completes, scan for any characters with an
312 error text property; this seems to be fast enough even with large
313 buffers. Problem with error at end of buffer, where there's no
314 character; need special variable for this. Need to merge face from
315 font-lock with the error face: use :inherit attribute with list of two
316 faces. How do we avoid making rng-valid depend on nxml-mode?
317
318 * Error recovery
319
320 ** Don't stop at newline in looking for close of start-tag.
321
322 ** Use indentation to guide recovery from mismatched end-tags
323
324 ** Don't keep parsing when currently not well-formed but previously
325 well-formed
326
327 ** Try to recover from a bad start-tag by popping an open element if
328 there was a mismatched end-tag unaccounted for.
329
330 ** Try to recover from a bad start-tag open on the hypothesis that there
331 was an error in the namespace URI.
332
333 ** Better recovery from ill-formed XML declarations.
334
335 * Useability improvements
336
337 ** Should print a "Parsing..." message during long movements.
338
339 ** Provide better position for reference to undefined pattern error.
340
341 ** Put Well-formed in the mode-line when validating against any-content.
342
343 ** Trim marking of illegal data for leading and trailing whitespace.
344
345 ** Show Invalid status as soon as we are sure it's invalid, rather than
346 waiting for everything to be completely up to date.
347
348 ** When narrowed, Valid or Invalid status should probably consider only
349 validity of narrowed region.
350
351 * Bug fixes
352
353 ** Need to give an error for a document like: <foo/><![CDATA[ ]]>
354
355 ** Make nxml-forward-balanced-item work better for the prolog.
356
357 ** Make filling and indenting comments work in the prolog.
358
359 ** Should delete RNC Input buffers.
360
361 ** Figure out what regex use for NCName and use it consistently,
362
363 ** Should have not-well-formed tokens in ref.
364
365 ** Require version in XML declaration? Probably not because prevents
366 use for external parsed entities. At least forbid standalone
367 without version.
368
369 ** Reject schema that compiles to rng-not-allowed-ipattern.
370
371 ** Move point backwards on schema parse error so that it's on the right token.
372
373 * Internal
374
375 ** Use rng-quote-string consistently.
376
377 ** Use parsing library for XML to texinfo conversion.
378
379 ** Rename xmltok.el to nxml-token.el. Use nxml-t- prefix instead of
380 xmltok-. Change nxml-t-type to nxml-t-token-type, nxml-t-start to
381 nxml-t-token-start.
382
383 ** Can we set fill-prefix to nil and rely on indenting?
384
385 ** xmltok should make available replacement text of entities containing
386 elements
387
388 ** In rng-valid, instead of using modification-hooks and
389 insert-behind-hooks on dependent overlays, use same technique as
390 nxml-mode.
391
392 ** Port to XEmacs. Issues include: Unicode (XEmacs seems to be based on
393 Mule-UCS); overlays/text properties vs extents; absence of
394 fontification-functions hook.
395
396 * Fontification
397
398 ** Allow face to depend on element qname, attribute qname, attribute
399 value. Use list with pairs of (R . F), where R specifies regexps and
400 F specifies faces. How can this list be made to depend on the
401 document type?
402
403 * Other
404
405 ** Support RELAX NG XML syntax (use XML parsing library).
406
407 ** Support W3C XML Schema (use XML parsing library).
408
409 ** Command to infer schema from current document (like trang).
410
411 * Schemas
412
413 ** XSLT schema should take advantage of RELAX NG to express cooccurrence
414 constraints on attributes (e.g. xsl:template).
415
416 * Documentation
417
418 ** Move material from README to manual.
419
420 ** Document encodings.
421
422 * Notes
423
424 ** How can we allow an error to be displayed on a different token from
425 where it is detected? In particular, for a missing closing ">" we
426 will need to display it at the beginning of the following token. At
427 the moment, when we parse the following token the error overlay will
428 get cleared.
429
430 ** How should rng-goto-next-error deal with narrowing?
431
432 ** Perhaps should merge errors having same start position even if they
433 have different ends.
434
435 ** How to handle surrogates? One possibility is to be compatible with
436 utf8.e: represent as sequence of 4 chars. But utf-16 is incompatible
437 with this.
438
439 ** Should we distinguish well-formedness errors from invalidity errors?
440 (I think not: we may want to recover from a bad start-tag by implying
441 an end-tag.)
442
443 ** Seems to be a bug with Emacs, where a mouse movement that causes
444 help-echo text to appear counts as pending input but does not cause
445 idle timer to be restarted.
446
447 ** Use XML to represent this file.
448
449 ** I had a TODO which said simply "split-string". What did I mean?
450
451 ** Investigate performance on large files all on one line.
452
453 * CVS emacs issues
454
455 ** Take advantage of UTF-8 CJK support.
456
457 ** Supply a next-error-function.
458
459 ** Investigate this NEWS item "Emacs now tries to set up buffer coding
460 systems for HTML/XML files automatically."
461
462 ** Take advantage of the pointer text property.
463
464 ** Leverage char-displayable-p.
465
466 Local variables:
467 mode: outline
468 end: