Author: atsushi
Date: 2006-04-18 03:26:33 -0400 (Tue, 18 Apr 2006)
New Revision: 59576
Modified:
trunk/mcs/class/Commons.Xml.Relaxng/Commons.Xml.Nvdl/ChangeLog
trunk/mcs/class/Commons.Xml.Relaxng/Commons.Xml.Nvdl/NvdlSimplified.cs
Log:
2006-04-18 Atsushi Enomoto <[EMAIL PROTECTED]>
* NvdlSimplified.cs : according to the section 6.4.10 overriden rules
should be filtered out, and rules with cancelNestedAction should be
removed *after* filtering overriden rules out.
Modified: trunk/mcs/class/Commons.Xml.Relaxng/Commons.Xml.Nvdl/ChangeLog
===================================================================
--- trunk/mcs/class/Commons.Xml.Relaxng/Commons.Xml.Nvdl/ChangeLog
2006-04-18 06:27:08 UTC (rev 59575)
+++ trunk/mcs/class/Commons.Xml.Relaxng/Commons.Xml.Nvdl/ChangeLog
2006-04-18 07:26:33 UTC (rev 59576)
@@ -1,5 +1,11 @@
2006-04-18 Atsushi Enomoto <[EMAIL PROTECTED]>
+ * NvdlSimplified.cs : according to the section 6.4.10 overriden rules
+ should be filtered out, and rules with cancelNestedAction should be
+ removed *after* filtering overriden rules out.
+
+2006-04-18 Atsushi Enomoto <[EMAIL PROTECTED]>
+
* NvdlSimplified.cs, NvdlValidator.cs :
fixed several context path related bugs.
- Path steps must be trimmed.
Modified: trunk/mcs/class/Commons.Xml.Relaxng/Commons.Xml.Nvdl/NvdlSimplified.cs
===================================================================
--- trunk/mcs/class/Commons.Xml.Relaxng/Commons.Xml.Nvdl/NvdlSimplified.cs
2006-04-18 06:27:08 UTC (rev 59575)
+++ trunk/mcs/class/Commons.Xml.Relaxng/Commons.Xml.Nvdl/NvdlSimplified.cs
2006-04-18 07:26:33 UTC (rev 59576)
@@ -282,8 +282,12 @@
int checkMax = al.Count;
NvdlModeCompileContext mctx = ctx.GetModeContext (this);
foreach (SimpleRule rule in rules) {
- if (ctx.CancelledRules [rule] != null)
- continue;
+ // Don't skip cancelled rules here. They are
+ // needed to filter overriden rules out
+ // (according to 6.4.10)
+ //if (ctx.CancelledRules [rule] != null)
+ // continue;
+
bool exclude = false;
for (int i = 0; i < checkMax; i++) {
SimpleRule r = (SimpleRule) al [i];
@@ -301,6 +305,14 @@
}
foreach (SimpleMode mode in mctx.Included)
mode.ConsumeIncludes (al, ctx);
+
+ // remove cancelled rules at this stage.
+ for (int i = 0; i < al.Count; ) {
+ if (ctx.CancelledRules [(SimpleRule) al [i]] !=
null)
+ al.RemoveAt (i);
+ else
+ i++;
+ }
}
private void CheckCollision (ArrayList al, ref SimpleRule el,
ref SimpleRule attr)
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches