private void WritePatterns (RelaxngPatternList l, char sep, bool parens) { switch (l.Count) { case 0: w.Write ("empty"); break; case 1: parens = (l [0] is RelaxngBinaryContentPattern || l [0] is RelaxngData && ((RelaxngData) l [0]).Except != null); if (parens) w.Write ('('); l [0].WriteRnc (this); if (parens) w.Write (')'); break; default: if (parens) w.Write ('('); l [0].WriteRnc (this); for (int i = 1; i < l.Count; i++) { if (sep != ',') w.Write (' '); w.Write (sep); w.Write (' '); l [i].WriteRnc (this); } if (parens) w.Write (')'); break; } }
private void WritePatterns (RelaxngPatternList l, bool parens) { WritePatterns (l, ',', parens); }