2 NOTES relative to the implementation
3 ====================================
7 all children except xsl:import can be in any order, so this
8 can be stored as one big structure.
12 this is really similar to XInclude, can be implemented as a
13 nearly separate processing just after the XML stylesheet has been
15 Detect loops using a limited stack ...
19 seems this should be really implemented as having a stylesheet
20 sublist being itself an import list
22 add the list at the end
23 when doing a resolution explore child before siblings in the list
25 3 Data Model, we should operate on parsed trees
29 3.2 use the XML Base call, XSLT-1.1 references it
31 3.4 Whitespace Stripping
33 Seems one may have to do a bit of preprocessing on both the
34 stylesheet trees and the source trees.
38 looks okay, wondering about variable bindings though...
39 default namespace not in scope
43 look in Michael Kay's book about how to efficiently find the
44 template applying to a node. Might influence the in-memory stylesheet
49 the end of that section suggest that the expression could be computed in
50 a simpler way. Maybe templates needs to be evaluated differently than
51 through the normal XPath processing. This can be implemented separately
52 or build an expression tree in the XPath module and use a different
53 evaluation mechanism. Not sure this is best.
55 5.4 Applying Template Rules
57 xsl:apply-templates is the recurstion mechanism, note the select
60 detection of loop: once the applied nodeset has been computed,
61 check that none of the elements is part of the existing set in use, this
62 may be costly and should be triggered only at a certain depth.
64 5.5 Conflict Resolution for Template Rules
66 Sounds again that evaluation of a pattern rule should provide one
67 more information not provided by the standard XPath evaluation
69 5.6 Overriding Template Rules
71 another recursion mechanism, confirm that it is needed to separate
72 the imported stylesheets.
76 Confusing ??? need an example.
82 7.1.1 Literal Result Elements
84 cleanup of the namespace template should be done initially at stylesheet
87 7.1.2 Creating Elements with xsl:element
89 okay, I bet it's usually used with { } expression computations
91 7.1.3 Creating Attributes with xsl:attribute
93 need some running code to better understand all the subtilties
95 7.1.4 Named Attribute Sets
97 Okay just a way to mimick param entities use fo attrib groups in Dtd's
101 adjacent text nodes are merged ... okay
102 output escapeing might need a libxml API extension
104 7.3 Creating Processing Instructions
105 7.4 Creating Comments
107 RAS, one just need to make a couple of trivial checks
111 Okay will need some testing
113 7.6.1 Generating Text with xsl:value-of
115 will be a good test for XPath string() function
116 note in the example that the text nodes are coalesced
118 7.6.2 Attribute Value Templates
124 best seems to parse, generate an evaluation tree then evaluate
125 when accessed. Note that multipe expressions can be associated to
126 a single attribute. Sounds like i will have to introduce a new
127 element type inserted in the attribute nodelist. dohh ...
131 sounds interesting for users but might be costly, we will see ...
133 7.7.1 Number to String Conversion Attributes
135 format="..." :-( it's gonna be painful ...
138 9 Conditional Processing
140 doesn't sounds hard to implement since we are at an interpreter
141 level but really useful in practice. Will be simple once the overall
146 Okay applied to the node list of an xsl:apply-templates or xsl:for-each
148 The NOTEs are a bit scary ...
150 11 Variables and Parameters
152 Variables can only be afttected at the top level, so it
153 seems they act only as global variables ...
154 But this is by regions .... so some of the statements within
155 a stylesheet my use a different set than others ... in practice
156 it turns to be nearly like loacal variables ....
157 Need more thinking on this to handle it properly.
158 Might explain on of TOM's requests w.r.t. variable resolution
160 11.1 Result Tree Fragments
163 actually it's just a node set restricted type
165 11.2 Values of Variables and Parameters
167 okay, real problem is scoping ...
169 11.3 Using Values of Variables and Parameters with xsl:copy-of
173 11.4 Top-level Variables and Parameters
175 It is an error if a stylesheet contains more than one binding
176 of a top-level variable with the same name and same import precedence
178 => ah ah, so it seems one can associate the variable bindings
179 to a stylesheet and if needed recurse down the import list if not
180 found, would simplify things a lot !
182 If the template or expression specifying the value of a global variable
183 x references a global variable y, then the value for y must be computed
184 before the value of x.
186 => Values can probably be computed dynamically at reference
187 time, if this generate a loop, then it's an error. Lazy computations
190 11.5 Variables and Parameters within Templates
193 xsl:variable is allowed anywhere within a template that an instruction
194 is allowed. In this case, the binding is visible for all following siblings
195 and their descendants.
196 It is an error if a binding established by an xsl:variable or xsl:param
197 element within a template shadows another binding established by an
198 xsl:variable or xsl:param element also within the template.
200 => the example seems to imply that we can simply keep a list of
201 local variable binding to a template ... sounds fine.
203 11.6 Passing Parameters to Templates
205 => Okay the parameter overrides the local binding
207 12.1 Multiple Source Documents
212 12.3 Number Formatting
214 reimplementing Java formatting in C is gonna be a pain !
216 12.4 Miscellaneous Additional Functions
220 unparsed-entity-uri() => support in uri.c should do
222 generate-id() => use the in-memory address of the node ???
224 system-property() => sounds simple
237 16.1 XML Output Method
239 sounds that calling directly libxml output on the result tree
240 should do it with a few caveats, for example one need to be
241 able to parametrize the output
243 16.2 HTML Output Method
245 sounds that calling libxml HTML output should do it too
247 16.3 Text Output Method
249 doesn't sounds too hard ...
251 16.4 Disabling Output Escaping
253 hum ... might be a bit painful to implement with the current framework.