Welcome to mirror list, hosted at ThFree Co, Russian Federation.

XmlNotation.cs « System.Xml « System.XML « class « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7a8ddbd91c8967c9f6772d49f898d5c19f530361 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
//
// System.Xml.XmlNotation.cs
//
// Author:
//	Duncan Mak  (duncan@ximian.com)
//
// (C) Ximian, Inc.
//

using System;
using System.Xml;

namespace System.Xml
{
	public class XmlNotation : XmlNode
	{
		#region Fields
		
		string localName;
		string publicId;
		string systemId;
		string prefix;
		
		#endregion
		
		#region Constructor
		
		internal XmlNotation (string localName, string prefix, string publicId,
				      string systemId, XmlDocument doc)
			: base (doc)
		{
			this.localName = localName;
			this.prefix = prefix;
			this.publicId = publicId;
			this.systemId = systemId;
		}

		#endregion

		#region Properties
		
		public override string InnerXml {
			get { return String.Empty; }
			set { throw new InvalidOperationException ("This operation is not allowed."); }
		}

		public override bool IsReadOnly {
			get { return true; } // Notation nodes are always read-only
		}

		public override string LocalName {
			get { return localName; }
		}

		public override string Name {
			get { return prefix + ":" + localName; }
		}

		public override XmlNodeType NodeType {
			get { return XmlNodeType.Notation; }
		}

		public override string OuterXml {
			get { return String.Empty; }
		}

		public string PublicId {
			get {
				if (publicId != null)
					return publicId;
				else
					return null;
			}
		}

		public string SystemId {
			get {
				if (systemId != null)
					return systemId;
				else
					return null;
			}
		}

		#endregion

		#region Methods
		
		public override XmlNode CloneNode (bool deep)
		{
			throw new InvalidOperationException ("This operation is not allowed.");
		}

		public override void WriteContentTo (XmlWriter w) {	} // has no effect.

		public override void WriteTo (XmlWriter w) {	} // has no effect.
		       
		#endregion
	}
}