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