2 // System.Xml.XmlNotation.cs
5 // Duncan Mak (duncan@ximian.com)
11 // Permission is hereby granted, free of charge, to any person obtaining
12 // a copy of this software and associated documentation files (the
13 // "Software"), to deal in the Software without restriction, including
14 // without limitation the rights to use, copy, modify, merge, publish,
15 // distribute, sublicense, and/or sell copies of the Software, and to
16 // permit persons to whom the Software is furnished to do so, subject to
17 // the following conditions:
19 // The above copyright notice and this permission notice shall be
20 // included in all copies or substantial portions of the Software.
22 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
26 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
36 public class XmlNotation : XmlNode
49 internal XmlNotation (string localName, string prefix, string publicId,
50 string systemId, XmlDocument doc)
53 this.localName = doc.NameTable.Add (localName);
54 this.prefix = doc.NameTable.Add (prefix);
55 this.publicId = publicId;
56 this.systemId = systemId;
63 public override string InnerXml {
64 get { return String.Empty; }
65 set { throw new InvalidOperationException ("This operation is not allowed."); }
68 public override bool IsReadOnly {
69 get { return true; } // Notation nodes are always read-only
72 public override string LocalName {
73 get { return localName; }
76 public override string Name {
77 get { return (prefix != String.Empty) ? (prefix + ":" + localName) : localName; }
80 public override XmlNodeType NodeType {
81 get { return XmlNodeType.Notation; }
84 public override string OuterXml {
85 get { return String.Empty; }
88 public string PublicId {
97 public string SystemId {
110 public override XmlNode CloneNode (bool deep)
112 throw new InvalidOperationException ("This operation is not allowed.");
115 public override void WriteContentTo (XmlWriter w) { } // has no effect.
117 public override void WriteTo (XmlWriter w) { } // has no effect.