private NvdlReject ReadReject() { NvdlReject el = new NvdlReject(); ReadCommonActionContent(el); return(el); }
internal void SimplifyPhase2(NvdlCompileContext ctx) { ArrayList al = new ArrayList(); ConsumeIncludes(al, ctx); SimpleRule anyElement = null; SimpleRule anyAttribute = null; // 6.4.12 + part of 6.4.13 CheckCollision(al, ref anyElement, ref anyAttribute); // 6.4.13 if (anyElement == null) { NvdlAnyNamespace ann = new NvdlAnyNamespace(); ann.SourceUri = this.SourceUri; ann.LineNumber = this.LineNumber; ann.LinePosition = this.LinePosition; NvdlReject reject = new NvdlReject(); reject.SourceUri = this.SourceUri; reject.LineNumber = this.LineNumber; reject.LinePosition = this.LinePosition; ann.Actions.Add(reject); ann.Match = NvdlRuleTarget.Elements; al.Add(new SimpleRule(ann, false, ctx)); } if (anyAttribute == null) { NvdlAnyNamespace ann = new NvdlAnyNamespace(); ann.SourceUri = this.SourceUri; ann.LineNumber = this.LineNumber; ann.LinePosition = this.LinePosition; NvdlAttach attach = new NvdlAttach(); attach.SourceUri = this.SourceUri; attach.LineNumber = this.LineNumber; attach.LinePosition = this.LinePosition; ann.Match = NvdlRuleTarget.Attributes; ann.Actions.Add(attach); al.Add(new SimpleRule(ann, true, ctx)); } rules = (SimpleRule [])al.ToArray(typeof(SimpleRule)); }
// 6.4.14 public SimpleValidate(NvdlReject reject, NvdlCompileContext ctx) : this(CreateBuiltInValidate(reject), ctx) { }
private NvdlReject ReadReject () { NvdlReject el = new NvdlReject (); ReadCommonActionContent (el); return el; }
// 6.4.14 public SimpleValidate (NvdlReject reject, NvdlCompileContext ctx) : this (CreateBuiltInValidate (reject), ctx) { }
internal void SimplifyPhase2 (NvdlCompileContext ctx) { ArrayList al = new ArrayList (); ConsumeIncludes (al, ctx); SimpleRule anyElement = null; SimpleRule anyAttribute = null; // 6.4.12 + part of 6.4.13 CheckCollision (al, ref anyElement, ref anyAttribute); // 6.4.13 if (anyElement == null) { NvdlAnyNamespace ann = new NvdlAnyNamespace (); ann.SourceUri = this.SourceUri; ann.LineNumber = this.LineNumber; ann.LinePosition = this.LinePosition; NvdlReject reject = new NvdlReject (); reject.SourceUri = this.SourceUri; reject.LineNumber = this.LineNumber; reject.LinePosition = this.LinePosition; ann.Actions.Add (reject); ann.Match = NvdlRuleTarget.Elements; al.Add (new SimpleRule (ann, false, ctx)); } if (anyAttribute == null) { NvdlAnyNamespace ann = new NvdlAnyNamespace (); ann.SourceUri = this.SourceUri; ann.LineNumber = this.LineNumber; ann.LinePosition = this.LinePosition; NvdlAttach attach = new NvdlAttach (); attach.SourceUri = this.SourceUri; attach.LineNumber = this.LineNumber; attach.LinePosition = this.LinePosition; ann.Match = NvdlRuleTarget.Attributes; ann.Actions.Add (attach); al.Add (new SimpleRule (ann, true, ctx)); } rules = (SimpleRule []) al.ToArray (typeof (SimpleRule)); }