2006-04-03 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / mcs / class / Commons.Xml.Relaxng / Commons.Xml.Relaxng / ChangeLog
1 2006-04-03  Atsushi Enomoto <atsushi@ximian.com>
2
3         * RelaxngPattern.cs : set XmlResolver that is passed by
4           RelaxngPattern.Read() as its property.
5
6 2006-03-29  Atsushi Enomoto <atsushi@ximian.com>
7
8         * RelaxngDatatype.cs : Compare() should not be just a stupid object
9           comparison, but should rather be type-dependent equality.
10           Thanks to Alexandre.
11
12 2006-03-28  Atsushi Enomoto <atsushi@ximian.com>
13
14         Based on the patch by Alexandre Alapetite:
15         * RelaxngException.cs : added another constructor that takes
16           pattern, string and innerException.
17         * RelaxngReader.cs
18           RelaxngPattern.cs :
19           - wrap xml resolution error in RelaxngInclude.Read(). This change
20             is argurable but might be convenient for certain users.
21           - Added another constructor to RelaxngReader, and another overload
22             for RelaxngPattern.Read(), otherwise RelaxngPattern.Read() can
23             never use different XmlResolvers.
24
25 2006-03-27  Atsushi Enomoto <atsushi@ximian.com>
26
27         Patch by Alexandre Alapetite (http://alexandre.alapetite.net/cv/)
28         * RelaxngPattern.cs : RelaxngInclude.Read() could be NRE when
29           there is an error in XmlTextReader .ctor().
30         * RelaxngValidatingReader.cs : If the input XmlReader is already 
31           positioned on the first node to validate, skip Read() here.
32
33 2006-02-02  Atsushi Enomoto <atsushi@ximian.com>
34
35         * RelaxngValidatingReader.cs : removed extra tables.
36
37 2006-01-16  Atsushi Enomoto <atsushi@ximian.com>
38
39         * RelaxngValidatingReader.cs : fixed warning.
40
41 2006-01-16  Atsushi Enomoto <atsushi@ximian.com>
42
43         * RelaxngValidatingReader.cs : just keep previous TextDeriv() result
44           for each pattern; they are mostly not reused. It makes validator
45           about 30% faster in certain validation and reduces memory use.
46
47 2006-01-13  Atsushi Enomoto <atsushi@ximian.com>
48
49         * RelaxngValidatingReader.cs : actually using Hashtable of Hashtable
50           (instead of ArrayList of custom MemoizationStart class) is much
51           better for performance. It makes StartTagOpenDeriv and
52           StartAttDeriv more than 10x faster than before.
53
54 2006-01-13  Atsushi Enomoto <atsushi@ximian.com>
55
56         * RelaxngDatatype.cs, RelaxngDefaultDatatypes.cs,
57           XsdDatatypeProvider.cs, RelaxngValidatingReader.cs :
58           Memoize TextDeriv() results for context independent inputs.
59
60           Due to the API freeze they are kept as internal virtual for now.
61
62 2006-01-12  Atsushi Enomoto <atsushi@ximian.com>
63
64         * RelaxngValidatingReader.cs : Use RdpPattern.EmptyTextDeriv(). It
65           significantly improves performance wrt empty text nodes.
66
67 2006-01-10  Atsushi Enomoto <atsushi@ximian.com>
68
69         * RelaxngValidatingReader.cs :
70           - Split memoization support things into MemoizationStore class.
71           - Split single memo ArrayList into a couple of Hashtables and 
72             ArrayLists which memoize each kind of derivative results.
73           - Introduced StartAttDeriv() and EndAttDeriv() to replace AttDeriv()
74             and memoize results efficiently. It is textually written in the
75             "derivative algorithm", but not formally specified.
76           - Introduced IsTextValueDependent and EmptyTextDeriv() to 
77             differentiate those patterns which results differ depending on
78             the text value and those which doesn't.
79             Those EmptyTextDeriv results are memoized.
80
81 2006-01-10  Atsushi Enomoto <atsushi@ximian.com>
82
83         * Misc.cs : NormalizeWhitespace() was creating extraneous char[] and
84           it could be heavily called depending on patterns.
85         * RelaxngDefaultDatatypes.cs : avoid extraneous call to
86           NormalizeWhitespace().
87
88 2006-01-05  Atsushi Enomoto <atsushi@ximian.com>
89
90         * RelaxngValidatingReader.cs :
91           - weak match 3 in Section 6.2.7 was missing (in derivative, it is
92             childrenDeriv cx p [] = childrenDeriv cx p [(TextNode "")] ).
93           - uncommented out whitespace handling in TextOnlyDeriv (it is 
94             "in if whitespace s then choice p p1 else p1" in derivative).
95           - MixedTextDeriv() is not fixed to not require string argument.
96         * XsdDatatypeProvider.cs : call Read() after ReadTypedValue().
97
98 2006-01-04  Alexandre Miguel Pedro Gomes <alexmipego@gmail.com>
99
100         * RelaxngValidatingReader.cs: fix typo
101
102 2006-01-04  Atsushi Enomoto <atsushi@ximian.com>
103
104         * RelaxngValidatingReader.cs :
105           - Simplified CreateValidationError().
106           - Don't validate 1) whitespaces outside element and 2) whitespaces
107             which do not consist of text only content.
108           - Implemented "memoization":
109             http://www.thaiopensource.com/relaxng/derivative.html#Memoization
110           - with related to memoization, use new TextOnlyDeriv() and 
111             MixedTextDeriv() to validate texts. See also RdpPattern changes.
112         * RelaxngGrammar.cs : don't update pool tables for static instances.
113
114 2005-12-27  Atsushi Enomoto <atsushi@ximian.com>
115
116         * Misc.cs RelaxngDatatype.cs RelaxngPattern.cs RelaxngException.cs
117           RelaxngMergedProvider.cs RelaxngPatternType.cs RelaxngReader.cs
118           RelaxngDefaultDatatypes.cs XsdDatatypeProvider.cs
119           RelaxngValidatingReader.cs RelaxngDatatypeProvider.cs
120           RelaxngGrammar.cs RelaxngNameClass.cs :
121
122           This is the smarter way to set eol-style without messing code
123           history.
124
125 2005-12-27  Atsushi Enomoto <atsushi@ximian.com>
126
127         * RelaxngDatatype.cs RelaxngPattern.cs RelaxngException.cs
128           RelaxngMergedProvider.cs RelaxngPatternType.cs RelaxngReader.cs
129           RelaxngDefaultDatatypes.cs XsdDatatypeProvider.cs
130           RelaxngValidatingReader.cs RelaxngDatatypeProvider.cs
131           RelaxngGrammar.cs RelaxngNameClass.cs :
132           turned out that they all have LF on copyright lines while they are
133           written to have CRLF.
134
135 2005-12-27  Atsushi Enomoto <atsushi@ximian.com>
136
137         * Misc.cs : it has inconsistent newlines. Removed unused code.
138
139 2005-12-27  Atsushi Enomoto <atsushi@ximian.com>
140
141         * RelaxngGrammar.cs : A constraint in 4.18 that grammar must have at
142           least one start element was missing. This fixes test #199 and #200.
143
144 2005-12-27  Atsushi Enomoto <atsushi@ximian.com>
145
146         * RelaxngValidatingReader.cs : validate whitespaces as text nodes. It
147           rather invalidated some valid documents incorrectly (since it kept
148           text pattern remaining). This fixed following tests: 237/2.v.xml,
149           256/2.i.xml, 258/2.i.xml, 261/1.v.xml, 261/3.v.xml, 261/4.v.xml,
150           268/2.v.xml and 269/2.v.xml, while it exposed bugs on 260/2.i.xml
151           and 261/6.i.xml (they are not regressions).
152
153 2005-12-27  Atsushi Enomoto <atsushi@ximian.com>
154
155         * XsdDatatypeProvider.cs : Namespace remapping was required to make
156           simple type restriction work fine. This fixes test #261/1.v.xml,
157           #268/2.v.xml and #269/2.v.xml.
158
159 2005-12-27  Atsushi Enomoto <atsushi@ximian.com>
160
161         * RelaxngValidatingReader.cs : it needs to cache text nodes to allow
162           split texts by such nodes as comments or processing instructions.
163           This fixes test #268 and #269.
164
165 2005-12-27  Atsushi Enomoto <atsushi@ximian.com>
166
167         * RelaxngGrammar.cs : expand refs before checking content pattern.
168
169 2005-12-16  Atsushi Enomoto <atsushi@ximian.com>
170
171         * RelaxngPattern.cs : RelaxngData and RelaxngValue was writing QName
172           instead of NCName for type attribute (wrong).
173
174 2005-12-16  Atsushi Enomoto <atsushi@ximian.com>
175
176         * RelaxngPattern.cs : in WriteCompact(), use WriteNamespace() to
177           let RncWriter handle namespace output by itself.
178
179 2005-09-20  Atsushi Enomoto <atsushi@ximian.com>
180
181         * RelaxngValidatingReader.cs : added explicit error message for
182           attribute XmlReader validation (spec section 7.1.5 explicitly
183           prohibits start//attribute so such validation never happens).
184         * RelaxngGrammar.cs : name class analysis is now done inside
185           CheckConstraints(), so nothing to add here.
186         * RelaxngPattern.cs : (RdpUnresolvedRef) now GetLabels() could be
187           invoked here, so just ignore.
188
189 2005-07-31  Atsushi Enomoto <atsushi@ximian.com>
190
191         * RelaxngGrammar.cs : spec 7.3 check is kinda implemented but cannot
192           verify now because of weird exception handling in the runtime.
193
194 2005-06-07  Atsushi Enomoto <atsushi@ximian.com>
195
196         * RelaxngReader.cs : When ReadPattern() if no valid pattern appears
197           then raise an error. In Read() when there are only non RELAX NG 
198           elements it resulted in an infinite loop.
199
200 2005-04-06  Atsushi Enomoto <atsushi@ximian.com>
201
202         * RelaxngPattern.cs : fixed incorrect use of virtual.
203
204 2005-03-18  Atsushi Enomoto <atsushi@ximian.com>
205
206         * XsdDatatypeProvider.cs : quick hack to workaround not to be rejected 
207           under MS.NET because of NOTATION type (thus, NOTATION type is not
208           available in this provider).
209
210 2005-03-01  Atsushi Enomoto <atsushi@ximian.com>
211
212         * RelaxngReader.cs : there was two public namespace constant. One
213           should be obsoleted.
214
215 2005-03-01  Atsushi Enomoto <atsushi@ximian.com>
216
217         * RelaxngPattern.cs : RdpUnresolvedRef should process empty/notAllowed
218           elimination on its referenced pattern.
219
220 2005-02-27  Atsushi Enomoto <atsushi@ximian.com>
221
222         * XsdDatatypeProvider.cs : Added simpleType parameter support.
223         * RelaxngValidatingReader.cs : added ReportDetails flag to report all
224           expected element names / attribute names. Removed all unused code.
225
226 2005-02-06  Atsushi Enomoto <atsushi@ximian.com>
227
228         * RelaxngReader.cs : ns attribute on root element should also be 
229           handled as well as datatypeLibrary.
230
231 2005-02-06  Atsushi Enomoto <atsushi@ximian.com>
232
233         * RelaxngReader.cs : it was not handling datatypeLibrary attribute
234           on root element. Added DefaultNamespace handling.
235         * RelaxngGrammar.cs : added DefaultNamespace property.
236         * RelaxngPattern.cs : WriteCompact() now outputs "default namespace =..".
237
238 2005-01-26  Atsushi Enomoto <atsushi@ximian.com>
239
240         * RelaxngPattern.cs : fixed 2.0 typo.
241
242 2005-01-26  Atsushi Enomoto <atsushi@ximian.com>
243
244         * RelaxngGrammar.cs, RelaxngPattern.cs, RelaxngNameClass.cs :
245           added RelaxngPattern.WriteCompact(TextWriter) and all internal 
246           WriteRnc() overrides.
247
248 2004-12-06  Atsushi Enomoto <atsushi@ximian.com>
249
250         * RelaxngValidatingReader.cs :
251           - Existing GetLabels() was insufficient to support attribute labels
252             by design (since those state object always reflects the status
253             after Read() and inside Read() attributes are checked and attribute
254             derivatives are consumed). So just made existing stuff as obsolete.
255           - Added object GetCurrentState() that returns RdpPattern wrapper.
256           - Added Emptiable(object state) that returns whether the 
257             specified state is emptiable.
258           - Added GetElementLabels(object state) and GetAttributeLabels(object
259             state) that returns the collection of XmlQualifiedName that 
260             represents possible element names or attribute names from the
261             argument state.
262           - Added AfterOpenStartTag(state,name,ns), OpenStartTag(state,name,
263             ns), AfterAttribute(state, name, ns), Attribute(state,name,ns),
264             AfterCloseStartTag(state), CloseStartTag(state),
265             AfterEndTag(state) and EndTag(state) to simulate state transition.
266             AfterXXX() returns another state instance if the transition was
267             successful or null. XXX() returns bool that indicates if the 
268             transition was successful or not and proceeds the state in case
269             of success.
270
271 2004-12-06  Atsushi Enomoto <atsushi@ximian.com>
272
273         * RelaxngException.cs : Added new .ctor() that takes RelaxngElementBase
274           to provide target grammar component location.
275
276 2004-12-06  Atsushi Enomoto <atsushi@ximian.com>
277
278         * RelaxngNameClass.cs,
279           RelaxngPattern.cs,
280           RelaxngGrammar.cs :
281           Added related grammar component location to error message.
282           In RelaxngDefine, Compile() caused error on duplicate key on
283           Hashtable.Add().
284         * RelaxngReader.cs : In GetStrippedAttribute(), use 
285           GetAttribute(string,string).
286
287 2004-12-06  Atsushi Enomoto <atsushi@ximian.com>
288
289         * RelaxngException.cs : don't store debug string. It was so harmful
290           for performance.
291
292 2004-12-05  Atsushi Enomoto <atsushi@ximian.com>
293
294         * RelaxngValidatingReader.cs :
295           - Better way to expose API; use ExpectedElements and 
296             ExpectedAttributes of type ICollection. Now GetLabels is obsolete.
297           - Implemented notAllowed check. It might be too heavy since it
298             checks all the QNames returned by GetLabels. In such case, use
299             RoughLabelCheck = true.
300           - Added RoughLabelCheck of type bool that indicates to omit
301             notAllowed check.
302
303 2004-12-05  Atsushi Enomoto <atsushi@ximian.com>
304
305         * RelaxngValidatingReader.cs : no, it was very easy. But to avoid
306           state-changeful property, it is now bool Emptiable().
307
308 2004-12-05  Atsushi Enomoto <atsushi@ximian.com>
309
310         * RelaxngValidatingReader.cs : reverted IsEmptiable. It was not ready.
311
312 2004-12-05  Atsushi Enomoto <atsushi@ximian.com>
313
314         * RelaxngPattern.cs : added GetLabels() override to RdpUnresolvedRef.
315         * RelaxngValidatingReader.cs :
316           Added GetLabels() that collects "allowed element names and
317           attributes" at current state.
318           Added IsEmptiable that indicates whether current reader can be
319           closed by an end tag.
320
321 2004-11-28  Atsushi Enomoto <atsushi@ximian.com>
322
323         * RelaxngGrammar.cs : fixed error that happened on recompilation.
324
325 2004-07-14  Atsushi Enomoto <atsushi@ximian.com>
326
327         * RelaxngGrammar.cs : When definition is missing, the error message
328           should show what definition is missing.
329
330 2004-06-25  Atsushi Enomoto <atsushi@ximian.com>
331
332         * Misc.cs, RelaxngDatatype.cs, RelaxngDatatypeProvider.cs,
333           RelaxngDefaultDatatype.cs, RelaxngException.cs, RelaxngGrammar.cs,
334           RelaxngMergedProvider.cs, RelaxngNameClass.cs, RelaxngPattern.cs,
335           RelaxngPatternType.cs, RelaxngReader.cs, RelaxngValidatingReader.cs,
336           XsdDatatypeProvider.cs : Added/replaced novell license term.
337
338 2004-06-21  Atsushi Enomoto <atsushi@ximian.com>
339
340         * Misc.cs,
341           RelaxngPattern.cs,
342           RelaxngReader.cs :
343           Use XmlResolver (or XmlUrlResolver) directly. XmlResolver was
344           incorrectly _used_ before null check. Don't create XmlResolver
345           instance for _every_ pattern object.
346         * RelaxngPattern.cs : UnresolvedRef.ExpandRef() should return not
347           try to find target derivative pattern twice. It was the culprit of
348           infinite loop. Removed dirty switches.
349         * RelaxngGrammar.cs : code cleanup.
350
351 2004-06-17  Atsushi Enomoto <atsushi@ximian.com>
352
353         * Misc.cs, RelaxngGrammar.cs, RelaxngPattern.cs, RelaxngReader.cs :
354           Added XmlResolver property to fix bug #60334.
355           Check incrrect recursion check that caused possible infinite loop.
356
357 2004-05-31  Atsushi Enomoto <atsushi@ximian.com>
358
359         * Misc.cs : made Util class internal.
360         * RelaxngDatatypeProvider.cs : looks commit was missing.
361         * RelaxngException.cs : made one .ctor() internal that accepts
362           RdpPattern.
363         * RelaxngNameClas.cs : Names list should not be settable.
364         * RelaxngPattern.cs : RelaxngRefPattern class is internal use only.
365         * RelaxngPatternType.cs : there is not "Include" pattern.
366
367 2004-05-30  Atsushi Enomoto <atsushi@ximian.com>
368
369         * RelaxngDatatypeProvider.cs : removed meaningless using alias.
370         * RelaxngGrammar.cs : modified ArrayList to RelaxngGrammarContentList.
371           RelaxngMergedProvider.cs : Added #if PNET switch to support non-
372           xmlschema available environment.
373         * RelaxngPattern.cs : added IGrammarContent and
374           RelaxngGrammarContentList.
375
376 2004-03-17  Atsushi Enomoto <atsushi@ximian.com>
377
378         * RelaxngNameClass.cs : Introduced RelaxngNameClassList class.
379
380 2004-03-15  Atsushi Enomoto <atsushi@ximian.com>
381
382         * RelaxngGrammar.cs,
383           RelaxngNameClass.cs,
384           RelaxngPattern.cs : Added Write() support.
385
386 2004-02-28  Atsushi Enomoto <atsushi@ximian.com>
387
388         * RelaxngReader.cs : ReadPattern() should be public.
389
390 2004-02-25  Atsushi Enomoto <atsushi@ximian.com>
391
392         * Removed 
393           - RngGrammar.cs
394           - RngNameClass.cs
395           - RngPattern.cs
396           - RngPatternType.cs
397           They are moved to RelaxngXXX.cs and improved
398
399 2004-02-25  Atsushi Enomoto <atsushi@ximian.com>
400
401         * Added 
402           - RelaxngDatatype.cs
403           - RelaxngDatatypeProvider.cs
404           - RelaxngDefaultDatatypes.cs
405           - RelaxngException.cs
406           - RelaxngGrammar.cs
407           - RelaxngMergedProvider.cs
408           - RelaxngNameClass.cs
409           - RelaxngPattern.cs
410           - RelaxngPatternType.cs
411           - XsdDatatypeProvider.cs
412         * Misc.cs,
413           RelaxngReader.cs,
414           RelaxngValidatingReader.cs : Radical design changes.
415
416         In short:
417           - API redesign (renaming RngXxx to RelaxngXxx)
418           - Strict grammar validation
419           - Datatype support (XML Schema primitive datatypes)
420           - Some derivative bugfixes such as list validation.
421
422 2003-05-19  Atsushi Enomoto <ginga@kit.hi-ho.ne.jp>
423
424         * RelaxngReader.cs :
425           + Now skips immaterial content correctly.
426           + Removed MoveToContent().
427           + Trimming attribute values and names.
428           + Fixed ReadNameClassChoice(), ReadNameClassExcept(),
429             ReadPatternExcept (). They require one or more contents.
430           + QName resolver fix.
431           + ReadListPattern() failed to read actual content.
432         * RelaxngValidatingReader.cs :
433           + Fixed incorrect error message.
434           + Fixed incorrect attribute namespace handling.
435         * RngGrammar.cs : Some simplification stuff fix. 
436           Support for illegal recursion check.
437         * RngNameClass.cs : fixed RngNsName ctor() (argument not passed).
438         * RngPattern.cs : fixed ParentRef.Compile() (was treated same as Ref).
439
440 2003-05-05  Atsushi Enomoto <ginga@kit.hi-ho.ne.jp>
441
442         * RelaxngReader.cs : ReadExternalRef() hadn't resolved base uri.
443
444 2003-04-29  Atsushi Enomoto <ginga@kit.hi-ho.ne.jp>
445
446         * Started.
447         * added ChangeLog, RelaxngReader.cs, RelaxngValidatingReader.cs,
448           RngGrammar.cs, RngNameClasses.cs, RngPattern.cs, RngPatternType.cs
449           and Misc.cs.
450