Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1264)

Side by Side Diff: third_party/libxslt/NOTES

Issue 2865973002: Check in the libxslt roll script. (Closed)
Patch Set: Consistent quotes. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/libxslt/Makefile.in ('k') | third_party/libxslt/README » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1
2 NOTES relative to the implementation
3 ====================================
4
5 xsl:stylesheet:
6
7 all children except xsl:import can be in any order, so this
8 can be stored as one big structure.
9
10 xsl:include:
11
12 this is really similar to XInclude, can be implemented as a
13 nearly separate processing just after the XML stylesheet has been
14 parsed.
15 Detect loops using a limited stack ...
16
17 xsl:import:
18
19 seems this should be really implemented as having a stylesheet
20 sublist being itself an import list
21
22 add the list at the end
23 when doing a resolution explore child before siblings in the list
24
25 3 Data Model, we should operate on parsed trees
26
27 3.1 No problem
28
29 3.2 use the XML Base call, XSLT-1.1 references it
30
31 3.4 Whitespace Stripping
32
33 Seems one may have to do a bit of preprocessing on both the
34 stylesheet trees and the source trees.
35
36 4 Expressions
37
38 looks okay, wondering about variable bindings though...
39 default namespace not in scope
40
41 5.1 Processing Model
42
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
45 representation
46
47 5.2 Patterns
48
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.
54
55 5.4 Applying Template Rules
56
57 xsl:apply-templates is the recurstion mechanism, note the select
58 mechanism.
59
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.
63
64 5.5 Conflict Resolution for Template Rules
65
66 Sounds again that evaluation of a pattern rule should provide one
67 more information not provided by the standard XPath evaluation
68
69 5.6 Overriding Template Rules
70
71 another recursion mechanism, confirm that it is needed to separate
72 the imported stylesheets.
73
74 5.7 Modes
75
76 Confusing ??? need an example.
77
78 6 Named Templates
79
80 No big deal it seems
81
82 7.1.1 Literal Result Elements
83
84 cleanup of the namespace template should be done initially at stylesheet
85 parsing.
86
87 7.1.2 Creating Elements with xsl:element
88
89 okay, I bet it's usually used with { } expression computations
90
91 7.1.3 Creating Attributes with xsl:attribute
92
93 need some running code to better understand all the subtilties
94
95 7.1.4 Named Attribute Sets
96
97 Okay just a way to mimick param entities use fo attrib groups in Dtd's
98
99 7.2 Creating Text
100
101 adjacent text nodes are merged ... okay
102 output escapeing might need a libxml API extension
103
104 7.3 Creating Processing Instructions
105 7.4 Creating Comments
106
107 RAS, one just need to make a couple of trivial checks
108
109 7.5 Copying
110
111 Okay will need some testing
112
113 7.6.1 Generating Text with xsl:value-of
114
115 will be a good test for XPath string() function
116 note in the example that the text nodes are coalesced
117
118 7.6.2 Attribute Value Templates
119
120 hum, this is
121 - contextual
122 - uses XPath
123
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 ...
128
129 7.7 Numbering
130
131 sounds interesting for users but might be costly, we will see ...
132
133 7.7.1 Number to String Conversion Attributes
134
135 format="..." :-( it's gonna be painful ...
136
137 8 Repetition
138 9 Conditional Processing
139
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
142 framework is set-up.
143
144 10 Sorting
145
146 Okay applied to the node list of an xsl:apply-templates or xsl:for-each
147
148 The NOTEs are a bit scary ...
149
150 11 Variables and Parameters
151
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
159
160 11.1 Result Tree Fragments
161
162 Dohhh a new type ...
163 actually it's just a node set restricted type
164
165 11.2 Values of Variables and Parameters
166
167 okay, real problem is scoping ...
168
169 11.3 Using Values of Variables and Parameters with xsl:copy-of
170
171 No surprize
172
173 11.4 Top-level Variables and Parameters
174
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
177
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 !
181
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.
185
186 => Values can probably be computed dynamically at reference
187 time, if this generate a loop, then it's an error. Lazy computations
188 are great ...
189
190 11.5 Variables and Parameters within Templates
191
192
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.
199
200 => the example seems to imply that we can simply keep a list of
201 local variable binding to a template ... sounds fine.
202
203 11.6 Passing Parameters to Templates
204
205 => Okay the parameter overrides the local binding
206
207 12.1 Multiple Source Documents
208 12.2 Keys
209
210 skipped for now
211
212 12.3 Number Formatting
213
214 reimplementing Java formatting in C is gonna be a pain !
215
216 12.4 Miscellaneous Additional Functions
217
218 current() => trivial
219
220 unparsed-entity-uri() => support in uri.c should do
221
222 generate-id() => use the in-memory address of the node ???
223
224 system-property() => sounds simple
225
226 13 Messages
227
228 trivial I/Os
229
230 14 Extensions
231 15 Fallback
232
233 skipped for now
234
235 16 Output
236
237 16.1 XML Output Method
238
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
242
243 16.2 HTML Output Method
244
245 sounds that calling libxml HTML output should do it too
246
247 16.3 Text Output Method
248
249 doesn't sounds too hard ...
250
251 16.4 Disabling Output Escaping
252
253 hum ... might be a bit painful to implement with the current framework.
OLDNEW
« no previous file with comments | « third_party/libxslt/Makefile.in ('k') | third_party/libxslt/README » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698