diff options
author | Eric Guzman | 2012-02-16 00:22:43 -0800 |
---|---|---|
committer | Eric Guzman | 2012-02-16 00:22:43 -0800 |
commit | 82b1a273219f0ae3d119e156c7acccdbe478f441 (patch) | |
tree | 74c45e5e3afc6706b2f7a7918807f72c54cdcfc5 /imports/codemirror/mode/xmlpure/index.html | |
parent | af20ca9b11133dd5cefb9275dbe8fb101c3380d0 (diff) | |
parent | 966f0adaf1d4b7f2dd5a6e31643df58bff713884 (diff) | |
download | ninja-82b1a273219f0ae3d119e156c7acccdbe478f441.tar.gz |
Merge branch 'refs/heads/TreeComponents' into PresetsPanel
Diffstat (limited to 'imports/codemirror/mode/xmlpure/index.html')
-rwxr-xr-x | imports/codemirror/mode/xmlpure/index.html | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/imports/codemirror/mode/xmlpure/index.html b/imports/codemirror/mode/xmlpure/index.html new file mode 100755 index 00000000..721834ac --- /dev/null +++ b/imports/codemirror/mode/xmlpure/index.html | |||
@@ -0,0 +1,59 @@ | |||
1 | <!doctype html> | ||
2 | <html> | ||
3 | <head> | ||
4 | <title>CodeMirror: Pure XML mode</title> | ||
5 | <link rel="stylesheet" href="../../lib/codemirror.css"> | ||
6 | <script src="../../lib/codemirror.js"></script> | ||
7 | <script src="xmlpure.js"></script> | ||
8 | <style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style> | ||
9 | <link rel="stylesheet" href="../../doc/docs.css"> | ||
10 | </head> | ||
11 | <body> | ||
12 | <h1>CodeMirror: XML mode</h1> | ||
13 | <form><textarea id="code" name="code"> | ||
14 | <?xml version="1.0" encoding="UTF-8" standalone="no" ?> | ||
15 | |||
16 | <!-- This is the pure XML mode, | ||
17 | and we're inside a comment! --> | ||
18 | |||
19 | <catalog> | ||
20 | <books> | ||
21 | <book id="bk01"> | ||
22 | <title>Lord of Light</title> | ||
23 | <author>Roger Zelazny</author> | ||
24 | <year>1967</year> | ||
25 | <description><![CDATA[This is a great book, really!!]]></description> | ||
26 | </book> | ||
27 | </books> | ||
28 | </catalog> | ||
29 | </textarea></form> | ||
30 | <script> | ||
31 | var editor = CodeMirror.fromTextArea(document.getElementById("code"), {mode: {name: "xmlpure"}}); | ||
32 | </script> | ||
33 | |||
34 | <p>This is my XML parser, based on the original:</p> | ||
35 | <ul> | ||
36 | <li>No html mode - this is pure xml</li> | ||
37 | <li>Illegal attributes and element names are errors</li> | ||
38 | <li>Attributes must have a value</li> | ||
39 | <li>XML declaration supported (e.g.: <b><?xml version="1.0" encoding="utf-8" standalone="no" ?></b>)</li> | ||
40 | <li>CDATA and comment blocks are not indented (except for their start-tag)</li> | ||
41 | <li>Better handling of errors per line with the state object - provides good infrastructure for extending it</li> | ||
42 | </ul> | ||
43 | |||
44 | <p>What's missing:</p> | ||
45 | <ul> | ||
46 | <li>Make sure only a single root element exists at the document level</li> | ||
47 | <li>Multi-line attributes should NOT indent</li> | ||
48 | <li>Start tags are not painted red when they have no matching end tags (is this really wrong?)</li> | ||
49 | </ul> | ||
50 | |||
51 | <p><strong>MIME types defined:</strong> <code>application/xml</code>, <code>text/xml</code>.</p> | ||
52 | |||
53 | <p><b>@author</b>: Dror BG (<i>deebug.dev[at]gmail.com</i>)<br/> | ||
54 | <p><b>@date</b>: August, 2011<br/> | ||
55 | <p><b>@github</b>: <a href='https://github.com/deebugger/CodeMirror2' target='blank'>https://github.com/deebugger/CodeMirror2</a></p> | ||
56 | |||
57 | <p><strong>MIME types defined:</strong> <code>application/xml</code>, <code>text/xml</code>.</p> | ||
58 | </body> | ||
59 | </html> | ||