Ejemplo n.º 1
0
        private void FillLocation(RelaxngElementBase el)
        {
            el.BaseUri = BaseURI;
            IXmlLineInfo li = this as IXmlLineInfo;

            el.LineNumber   = li != null ? li.LineNumber : 0;
            el.LinePosition = li != null ? li.LinePosition : 0;
        }
Ejemplo n.º 2
0
		private void FillLocation (RelaxngElementBase el)
		{
			el.BaseUri = BaseURI;
			IXmlLineInfo li = this as IXmlLineInfo;
			el.LineNumber = li != null ? li.LineNumber : 0;
			el.LinePosition = li != null ? li.LinePosition : 0;
		}
Ejemplo n.º 3
0
		private RelaxngException Error (
			RelaxngElementBase sourceObj,
			bool useReader,
			string message)
		{
			string msg = String.Concat (
				message,
				sourceObj != null ?
					String.Format (". Related schema component is {0} ({1}) line {2}, column {3}",
						sourceObj.BaseUri,
						sourceObj.GetType ().Name,
						sourceObj.LineNumber,
						sourceObj.LinePosition) :
					String.Empty,
				useReader ?
					String.Format (". {0}", source.BaseURI) :
					String.Empty);

			IXmlLineInfo li = source as IXmlLineInfo;
			if (useReader && li != null && li.HasLineInfo ())
				msg += String.Format (" line {0} column {1}",
					li.LineNumber, li.LinePosition);

			return new RelaxngException (msg);
		}
Ejemplo n.º 4
0
		// FIXME: should create another type of RelaxngException.
		private RelaxngException Error (
			RelaxngElementBase sourceObj,
			string message)
		{
			// This override is mainly for schema component error.
			return Error (sourceObj, false, message);
		}
Ejemplo n.º 5
0
		public RelaxngException (RelaxngElementBase source, string message, Exception innerException)
			: base (message + String.Format (" {0} ({1}, {2})", source.BaseUri, source.LineNumber, source.LinePosition), innerException)
		{
		}
Ejemplo n.º 6
0
		public RelaxngException (RelaxngElementBase source, string message)
			: this (source, message, null)
		{
		}
Ejemplo n.º 7
0
 public RelaxngException(RelaxngElementBase source, string message, Exception innerException)
     : base(message + String.Format(" {0} ({1}, {2})", source.BaseUri, source.LineNumber, source.LinePosition), innerException)
 {
 }
Ejemplo n.º 8
0
 public RelaxngException(RelaxngElementBase source, string message)
     : this(source, message, null)
 {
 }