-
Notifications
You must be signed in to change notification settings - Fork 12
/
TODO.txt
75 lines (49 loc) · 2.47 KB
/
TODO.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
- consider switching from REXML to nokogiri and/or, maybe, ox.
- XML::XXPath: Write a real XPath parser eventually
- XML::XXPath: avoid duplicates in path.all(node) result arrays when
using the descendants ("//") axis
- invent an XPath-like language for Ruby object graphs (i.e. a
language that is to Ruby object graphs what XPath is to XML
trees). Use expressions in that language as a generalization of
"attribute names" (e.g. the 1st parameter to single attribute node
factory methods). The language could more or less be Ruby itself,
but the write support would need some extra work...
- XML::XXPath:
- implement .[@attrname] steps
- returns the context node iff it contains an attrname attribute
- doesn't work properly in REXML::XPath?
- implement *[@attrname] steps
- implement *[@attrname='attrvalue'] steps
- id/idref support (write support possible?)
- XML::Mapping: make SubObjectBaseNode a mixin instead of a subclass
of SingleAttributeNode ("mapping sub-objects" and "mapping to a
single attribute" are orthogonal concepts; inheritance is bad design
here)
- documentation:
- consider switching to YARD
- reasons: parameter/return type metadata, (maybe) plugin for the
code snippet inclusion stuff
- user_manual:
- document/show usage of default_when_xpath_err outside node type
implementations
- user_manual_xxpath:
- mention new step types, new axes, xml/xpath_methods
- XML::XXPath/XML::Mapping: support for XML namespaces in XML::XXPath
(match nodes with specific namespaces only) and XML::Mapping
(use_namespace etc.)
- add streaming input/output to XML::Mapping, i.e. SAX-based input in
addition to the current REXML/DOM - based one. Probably won't be
implementable for some more complicated XPaths -- raise meaningful
exceptions in those cases.
- would need support in xxpath
- should probably be built on top of the Ruby 2.0 lazy enumeration
stuff
- XML::XXPath/XML::Mapping: add XML text nodes (the sub-node of an
element node that contains that element's text) first-class to
XML::XXPath. Use it for things like text_node :contents, "text()".
Along those lines: promote XPath node "unspecifiedness" from an
attribute to a REXML node object of "unspecified" class that's
turned into an attribute/element/text node when necessary
- (eventually, maybe) provide a "scaffolding" feature to automatically
turn a dtd/schema into a set of node type definitions or even a set
of mapping classes