* lisp/bookmark.el (bookmark-load-hook): Fix doc string as suggested
[emacs.git] / lisp / nxml / TODO
bloba5ac542f9428a055418ed493c94aaec67953b483
1 * High priority
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.
9 ** Command to tag a region.  With a schema should complete using legal
10 tags, but should work without a schema as well.
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.
15 * Outlining
17 ** Implement C-c C-o C-q.
19 ** Install pre/post command hook for moving out of invisible section.
21 ** Put a modify hook on invisible sections that expands them.
23 ** Integrate dumb folding somehow.
25 ** An element should be able to be its own heading.
27 ** Optimize to avoid complete buffer scan on each command.
29 ** Make it work with HTML-style headings (i.e. level indicated by
30 name of heading element rather than depth of section nesting).
32 ** Recognize root element as a section provided it has a title, even
33 if it doesn't match section-element-name-regex.
35 ** Support for incremental search automatically making hidden text
36 visible.
38 ** Allow title to be an attribute.
40 ** Command that says to recognize the tag at point as a section/heading.
42 ** Explore better ways to determine when an element is a section
43 or a heading.
45 ** rng-next-error needs to either ignore invisible portion or reveal it
46 (maybe use isearch oriented text properties).
48 ** Errors within hidden section should be highlighted by underlining the
49 ellipsis.
51 ** Make indirect buffers work.
53 ** How should nxml-refresh outline recover from non well-formed tags?
55 ** Hide tags in title elements?
57 ** Use overlays instead of text properties for holding outline state?
58 Necessary for indirect buffers to work?
60 ** Allow an outline to go in the speedbar.
62 ** Split up outlining manual section into subsections.
64 ** More detail in the manual about each outlining command.
66 ** More menu entries for hiding/showing?
68 ** Indication of many lines have been hidden?
70 * Locating schemas
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?
76 ** Support for adding new schemas to schema-locating files. Add
77 documentElement and namespace elements.
79 ** C-c C-w should be able to report current type id.
81 ** Implement doctypePublicId.
83 ** Implement typeIdBase.
85 ** Implement typeIdProcessingInstruction.
87 ** Support xml:base.
89 ** Implement group.
91 ** Find preferred prefix from schema-locating files.  Get rid of
92 rng-preferred-prefix-alist.
94 ** Inserting document element with vacuous schema should complete using
95 document elements declared in schema locating files, and set schema
96 appropriately.
98 ** Add a ruleType attribute to the <include> element?
100 ** Allow processing instruction in prolog to contain the compact syntax
101 schema directly.
103 ** Use RDDL to locate a schema based on the namespace URI.
105 ** Should not prompt to add redundant association to schema locating
106 file.
108 ** Command to reload current schema.
110 * Schema-sensitive features
112 ** Should filter dynamic markup possibilities using schema validity, by
113 adding hook to nxml-mode.
115 ** Dynamic markup word should (at least optionally) be able to look in
116 other buffers that are using nxml-mode.
118 ** Should clicking on Invalid move to next error if already on an error?
120 ** Take advantage of a:documentation. Needs change to schema format.
122 ** Provide feasible validation (as in Jing) toggle.
124 ** Save the validation state as a property on the error overlay to enable
125 more detailed diagnosis.
127 ** Provide an Error Summary buffer showing all the validation errors.
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.
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.
136 ** Allow validation to handle XInclude.
138 ** ID/IDREF support.
140 * Completion
142 ** Make it work with icomplete.  Only use a function to complete when
143 some of the possible names have undeclared namespaces.
145 ** How should C-return in mixed text work?
147 ** When there's a vacuous schema, C-return after < will insert the
148 end-tag.  Is this a bug or a feature?
150 ** After completing start-tag, ensure we don't get unhelpful message
151 from validation
153 ** Syntax table for completion.
155 ** Should complete start-tag name with a space if namespace attributes
156 are required.
158 ** When completing start-tag name with no prefix and it doesn't match
159 should try to infer namespace from local name.
161 ** Should completion pay attention to characters after point?  If so,
162 how?
164 ** When completing start-tag name, add required atts if only one required
165 attribute.
167 ** When completing attribute name, add attribute value if only one value
168 is possible.
170 ** After attribute-value completion, insert space after close delimiter
171 if more attributes are required.
173 ** Complete on enumerated data values in elements.
175 ** When in context that allows only elements, should get tag
176 completion without having to type < first.
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?
181 ** When completing attributes, more consistent to ignore all attributes
182 after point.
184 ** Inserting attribute value completions needs to be sensitive to what
185 delimiter is used so that it quotes the correct character.
187 ** Complete on encoding-names in XML decl.
189 ** Complete namespace declarations by searching for all namespaces
190 mentioned in the schema.
192 * Well-formed XML support
194 ** Deal better with Mule-UCS
196 ** Deal with UTF-8 BOM when reading.
198 ** Complete entity names.
200 ** Provide some support for entity names for MathML.
202 ** Command to repeat the last tag.
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.
209 ** Provide a comment command to bind to M-; that works better than the
210 normal one.
212 ** Make indenting in a multi-line comment work.
214 ** Structure view.  Separate buffer displaying element tree. Be able to
215 navigate from structure view to document and vice-versa.
217 ** Flash matching >.
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.
225 ** ispell integration.
227 ** Block-level items in mixed content should be indented, e.g:
228   <para>This is list:
229     <ul>
230       <li>item</li>
232 ** Provide option to indent like this:
234 **   <para>This is a paragraph
235     occupying multiple lines.</para>
237 ** Option to add make a / that closes a start-tag electrically insert a
238 space for the XHTML guys.
240 ** C-M-q should work.
242 * Datatypes
244 ** Figure out workaround for CJK characters with regexps.
246 ** Does category C contain Cn?
248 ** Do ENTITY datatype properly.
250 * XML Parsing Library
252 ** Parameter entity parsing option, nil (never), t (always),
253 unless-standalone (unless standalone="yes" in XML declaration).
255 ** When a file is currently being edited, there should be an option to
256 use its buffer instead of the on-disk copy.
258 * Handling all XML features
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).
265 ** Handle internal general entity declarations containing elements.
267 ** Handle external general entity declarations.
269 ** Handle default attribute declarations in internal subset.
271 ** Handle parameter entities (including DTD).
273 * RELAX NG
275 ** Do complete schema checking, at least optionally.
277 ** Detect include/external loops during schema parse.
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.
283 * Catching XML errors
285 ** Check public identifiers.
287 ** Check default attribute values.
289 * Performance
291 ** Explore whether overlay-recenter can cure overlays performance
292 problems.
294 ** Cache schemas. Need to have list of files and mtimes.
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.
301 ** Cache after first tag.
303 ** Introduce a new name class that is a choice between names (so that
304 we can use member)
306 ** intern-choice should simplify after patterns with same 1st/2nd args
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?
318 * Error recovery
320 ** Don't stop at newline in looking for close of start-tag.
322 ** Use indentation to guide recovery from mismatched end-tags
324 ** Don't keep parsing when currently not well-formed but previously
325 well-formed
327 ** Try to recover from a bad start-tag by popping an open element if
328 there was a mismatched end-tag unaccounted for.
330 ** Try to recover from a bad start-tag open on the hypothesis that there
331 was an error in the namespace URI.
333 ** Better recovery from ill-formed XML declarations.
335 * Useability improvements
337 ** Should print a "Parsing..." message during long movements.
339 ** Provide better position for reference to undefined pattern error.
341 ** Put Well-formed in the mode-line when validating against any-content.
343 ** Trim marking of illegal data for leading and trailing whitespace.
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.
348 ** When narrowed, Valid or Invalid status should probably consider only
349 validity of narrowed region.
351 * Bug fixes
353 ** Need to give an error for a document like: <foo/><![CDATA[  ]]>
355 ** Make nxml-forward-balanced-item work better for the prolog.
357 ** Make filling and indenting comments work in the prolog.
359 ** Should delete RNC Input buffers.
361 ** Figure out what regex use for NCName and use it consistently,
363 ** Should have not-well-formed tokens in ref.
365 ** Require version in XML declaration? Probably not because prevents
366 use for external parsed entities. At least forbid standalone
367 without version.
369 ** Reject schema that compiles to rng-not-allowed-ipattern.
371 ** Move point backwards on schema parse error so that it's on the right token.
373 * Internal
375 ** Use rng-quote-string consistently.
377 ** Use parsing library for XML to texinfo conversion.
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.
383 ** Can we set fill-prefix to nil and rely on indenting?
385 ** xmltok should make available replacement text of entities containing
386 elements
388 ** In rng-valid, instead of using modification-hooks and
389 insert-behind-hooks on dependent overlays, use same technique as
390 nxml-mode.
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.
396 * Fontification
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?
403 * Other
405 ** Support RELAX NG XML syntax (use XML parsing library).
407 ** Support W3C XML Schema (use XML parsing library).
409 ** Command to infer schema from current document (like trang).
411 * Schemas
413 ** XSLT schema should take advantage of RELAX NG to express cooccurrence
414 constraints on attributes (e.g. xsl:template).
416 * Documentation
418 ** Move material from README to manual.
420 ** Document encodings.
422 * Notes
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.
430 ** How should rng-goto-next-error deal with narrowing?
432 ** Perhaps should merge errors having same start position even if they
433 have different ends.
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.
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.)
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.
447 ** Use XML to represent this file.
449 ** I had a TODO which said simply "split-string". What did I mean?
451 ** Investigate performance on large files all on one line.
453 * Issues for Emacs versions >= 22
455 ** Take advantage of UTF-8 CJK support.
457 ** Supply a next-error-function.
459 ** Investigate this NEWS item "Emacs now tries to set up buffer coding
460 systems for HTML/XML files automatically."
462 ** Take advantage of the pointer text property.
464 ** Leverage char-displayable-p.
466 Local variables:
467 mode: outline
468 end: