예제 #1
0
파일: RncWriter.cs 프로젝트: runefs/Marvin
		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;
			}
		}
예제 #2
0
파일: RncWriter.cs 프로젝트: runefs/Marvin
		private void WritePatterns (RelaxngPatternList l, bool parens)
		{
			WritePatterns (l, ',', parens);
		}