Exemple #1
0
        private RelaxngNameChoice ReadNameClassChoice()
        {
            RelaxngNameChoice nc = new RelaxngNameChoice();

            FillLocation(nc);
            if (IsEmptyElement)
            {
                throw new RelaxngException("Name choice must have at least one name class.");
            }

            Read();
            while (NodeType != XmlNodeType.EndElement)
            {
                nc.Children.Add(ReadNameClass());
            }
            if (nc.Children.Count == 0)
            {
                throw new RelaxngException("Name choice must have at least one name class.");
            }

            expectEnd("choice");
            return(nc);
        }
Exemple #2
0
		private RelaxngNameChoice ReadNameClassChoice ()
		{
			RelaxngNameChoice nc = new RelaxngNameChoice ();
			FillLocation (nc);
			if (IsEmptyElement)
				throw new RelaxngException ("Name choice must have at least one name class.");

			Read ();
			while (NodeType != XmlNodeType.EndElement) {
				nc.Children.Add (ReadNameClass ());
			}
			if (nc.Children.Count == 0)
				throw new RelaxngException ("Name choice must have at least one name class.");

			expectEnd ("choice");
			return nc;
		}
Exemple #3
0
		public void WriteNameChoice (RelaxngNameChoice c)
		{
			WriteNames (c.Children, false);
		}