X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FCommons.Xml.Relaxng%2FCommons.Xml.Relaxng.Derivative%2FRdpPatterns.cs;h=b65e59f33575c873b7d4274556f707350e622f19;hb=48992d4b3f8b568be17180372160d2f3e03b8ccb;hp=a729b8db56bc0f70d9a9fe8b0121478af1b7b579;hpb=07ec1253c277856bdbb74213e2defc8ed23cf8e3;p=mono.git diff --git a/mcs/class/Commons.Xml.Relaxng/Commons.Xml.Relaxng.Derivative/RdpPatterns.cs b/mcs/class/Commons.Xml.Relaxng/Commons.Xml.Relaxng.Derivative/RdpPatterns.cs index a729b8db56b..b65e59f3357 100644 --- a/mcs/class/Commons.Xml.Relaxng/Commons.Xml.Relaxng.Derivative/RdpPatterns.cs +++ b/mcs/class/Commons.Xml.Relaxng/Commons.Xml.Relaxng.Derivative/RdpPatterns.cs @@ -48,6 +48,16 @@ namespace Commons.Xml.Relaxng.Derivative // for now). public abstract class RdpPattern { + public static readonly RdpPattern Anything; + + static RdpPattern () + { + RdpPattern anyAtts = new RdpList (new RdpAttribute (RdpAnyName.Instance, RdpText.Instance)); + RdpElement anyElement = new RdpElement (RdpAnyName.Instance, null); + Anything = new RdpChoice (RdpEmpty.Instance, new RdpChoice (anyAtts, new RdpChoice (RdpText.Instance, new RdpList (anyElement)))); + anyElement.Children = Anything; + } + internal bool nullableComputed; internal bool isNullable; Hashtable patternPool; @@ -2125,12 +2135,12 @@ namespace Commons.Xml.Relaxng.Derivative constraintsChecked = true; if (attribute || list || dataExcept) throw new RelaxngException ("Not allowed element occurence was specified in the pattern."); - this.Children.CheckConstraints (false, oneOrMore, oneOrMoreGroup, oneOrMoreInterleave, false, false); + this.Children.CheckConstraints (false, false, false, oneOrMoreInterleave, false, false); } internal override bool ContainsText() { - return children.ContainsText (); + return false; } }