+2003-07-26 Atsushi Enomoto <ginga@kit.hi-ho.ne.jp>
+
+ * XmlAttribute.cs : .ctor() shouldallow localName "xml" (not prefix)
+ with http://www.w3.org/XML/1998/namespace.
+ * XmlEntity.cs : patch by Aleksey Sanin. InnerText is now supported.
+ * XmlNode.cs : InnerText should handle CDATA and whitespaces.
+ * XmlTextReader.cs : Should allow " (#PCDATA)* " in ReadContentSpec().
+ * XmlTextWriter.cs : Quick fix for accepting (and writing) same-named
+ attributes (as MS.NET does). It isn't good way and I may change it.
+
2003-07-24 Atsushi Enomoto <ginga@kit.hi-ho.ne.jp>
* DTDObjectModel.cs : Added DTDEntityDeclarationCollection and
if (prefix == "xmlns" || (prefix == "" && localName == "xmlns"))
if (namespaceURI != XmlNamespaceManager.XmlnsXmlns)
throw new ArgumentException ("Invalid attribute namespace for namespace declaration.");
- else if (prefix == "xml" || (prefix == "" && localName == "xml"))
- if (namespaceURI != XmlNamespaceManager.XmlnsXml)
+ else if (prefix == "xml" && namespaceURI != XmlNamespaceManager.XmlnsXml)
throw new ArgumentException ("Invalid attribute namespace for namespace declaration.");
// There are no means to identify the DOM is namespace-
get { return baseUri; }
}
- [MonoTODO]
public override string InnerText {
- get { throw new NotImplementedException (); }
+ get { return base.InnerText; }
set { throw new InvalidOperationException ("This operation is not supported."); }
}
private void AppendChildValues (XmlNode parent, StringBuilder builder)
{
- XmlNode node = parent.FirstChild;
-
- while (node != null) {
- if (node.NodeType == XmlNodeType.Text)
- builder.Append (node.Value);
- AppendChildValues (node, builder);
- node = node.NextSibling;
- }
+ XmlNode node = parent.FirstChild;\r
+\r
+ while (node != null) {\r
+ switch (node.NodeType) {
+ case XmlNodeType.Text:
+ case XmlNodeType.CDATA:
+ case XmlNodeType.SignificantWhitespace:
+ case XmlNodeType.Whitespace:
+ builder.Append (node.Value);\r
+ break;\r
+ }\r
+ AppendChildValues (node, builder);\r
+ node = node.NextSibling;\r
+ }\r
}
public virtual string InnerXml {
Expect ('*');
model.Occurence = DTDOccurence.ZeroOrMore;
}
+ else if (PeekChar () == '*')
+ Expect ('*');
} else {
// Non-Mixed Contents
model.ChildModels.Add (ReadCP (decl));
formatSpace = " ";
// If already written, then break up.
- if (checkMultipleAttributes &&
- writtenAttributes.Contains (formatPrefix + localName))
- return;
+// if (checkMultipleAttributes &&
+// writtenAttributes.Contains (formatPrefix + localName))
+// return;
w.Write ("{0}{1}{2}={3}", formatSpace, formatPrefix, localName, quoteChar);
if (checkMultipleAttributes)