blob: ed77622c2f5ba324359a7ac2bce7872220b7ed4a (
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
|
MonoDevelop XML Editor Issues and TODO list
-------------------------------------------
This list should be moved to the SourceForge issues tracker.
* Cannot create an XML file with any extension other than .xml. MonoDevelop problem.
* XML Editor has a list of file extensions that it recognises as XML content. Really
this should be using the mime type. The XML editor add-in should install extra
types into the mime type database.
* At the moment it only recognises the mime type "text/xml". XSL files, for example,
have a mime type of "text/xsl". However, the XML editor checks the file extension
as well so an XSL file will be opened in the XML editor.
* 11 unit tests are currently not working. Atsushi Eno has been fixing issues as
quick as I can report them, so a lot of these unit tests should work under the
next release of Mono.
* Autocompletion of elements, after typing in the greater than sign, is over zealous.
* The autocompletion list requires an icon. I would prefer not to have one for
XML completion, but at the moment it is using the stock forward icon.
* When validating XML documents errors are added to the task list by creating a
CompilerResult object. There is no other way to create an error task.
* The XML menu option is displayed all the time. In SharpDevelop I used the
activewindow property to show/hide the menu when the XML editor is being
used/not used. Unable to get this working.
* Mixed namespace handling is limited. The element completion list is based on the
parent element at the current location. Really this should take into account any
other available namespaces that are allowed at that location.
* Commenting out regions of XML. SharpDevelop implements this, but there are a few
bugs.
* The "Show Schema Annotation" XML Editor option does nothing. Schema annotation
is always displayed if available.
* Goto Schema Definition does not scroll to the correct line the first time the
schema is opened. The XmlEditorView.JumpTo method is called correctly, but
for some reason it does not scroll.
* Fix 7 obsolete methods/classes used warnings due to moving to .NET 2.0. The
"Use XmlReader created by XmlReader.Create() method" is easy to fix. The
"XmlSchema.Compile' is obsolete: `Use XmlSchemaSet.Compile() instead." might not
be fixed since the XmlSchemaSet.Compile broke a lot of the unit tests when I
tried the same thing with SharpDevelop.
* Hold off switching to using XmlReader.Create. Doing this we hit an error in
Mono (1.1.15):
System.NullReferenceException: Object reference not set to an instance of an object
in <0x0006d> Mono.Xml.Schema.XmlSchemaValidatingReader:get_Prefix ()
in <0x0004f> System.Xml.XmlDocument:ReadAttributeNode (System.Xml.XmlReader reader)
in <0x00253> System.Xml.XmlDocument:ReadNodeCore (System.Xml.XmlReader reader)
in <0x000be> System.Xml.XmlDocument:ReadNode (System.Xml.XmlReader reader)
in <0x00044> System.Xml.XmlDocument:Load (System.Xml.XmlReader xmlReader)
Loading an xml schema using code:
StringReader stringReader = new StringReader(xml);
XmlTextReader xmlReader = new XmlTextReader(stringReader);
xmlReader.XmlResolver = null;
XmlReaderSettings settings = new XmlReaderSettings();
settings.ValidationType = ValidationType.Schema;
settings.ValidationFlags = XmlSchemaValidationFlags.None;
settings.XmlResolver = null;
settings.Schemas.Add(schema);
XmlReader reader = XmlReader.Create(xmlReader, settings);
XmlDocument doc = new XmlDocument();
doc.Load(reader);
|