firstobject XML Editor Comments
Comments about features and bugs are posted here with most recent at the top and the responses are updated as the questions are addressed in new releases of the editor. Download, screenshots and instructions are on the firstobject XML Editor page.
Great suggestions.
Yes, this is something I've thought would be useful too. I've added it to the to do list.
Thank you. Switching MSXML and XML Schema validation are very high on the to do list.
There has forever been a resistance to reality among XML proponents which has caused them when faced with a file over a megabyte to say that it is not a proper use of XML. Even if larger data sets was not the original intention for XML, it is the reality now. There are other text editors better than foxe at very large files and documents, but certainly the "major" players continue to be oblivious.
Thanks for the suggestions. Let me discuss a little about the option of using Microsoft's XML component, MSXML. DTD Validation support was added in the firstobject XML editor using MSXML such that only those users who invoke that feature would cause MSXML to be loaded. XML Schema Validation would be added in the same way. Every feature that utilizes MSXML is subject to the document size limitations and memory usage requirements of MSXML, which is incongruent with the huge document support of this editor, but it is acceptable when the user explicitly chooses to use it. The reason I mention this is that it would be possible to add full XPath support utilizing MSXML too. CMarkup has lightweight path features constituting common navigation shortcuts, but not approaching full XPath. So there are a couple of options for path support in the editor:
Improve integration of only the CMarkup path features, absolute paths and simple predicates including attribute values (e.g. next //*[@id=678]).
Add an MSXML based XPath Query function to give full XPath support as a separate feature from the CMarkup path features, accepting MSXML's heavy footprint for that specific feature.
Great suggestion. For those not familiar with Tree Customization see below or in the foxe article "Editing" section. The settings.xml also has machine specific information such as screen position coordinates and most recent file list, so you're right it would be clumsy copying that around or extracting the Tree Customzations. An export/import settings function would be ideal. In the meantime you can share the tree customizations by copying and pasting the text in the Preferences Tree Customizations editbox.
Thanks for the suggestion. Since it is designed as a simple text editor, a non-escaped mode might be confusing (then again it might be just what everyone is looking for, so I will keep the idea in mind). Note that values are displayed non-escaped in the tree, though I know this does not help with large data values since the tree only shows one truncated line of data. Another option if you have control over the XML format is to use CDATA Sections which makes it easier to edit and view the unescaped special characters. i.e.
<Data><![CDATA[
10 < 20, A & B, and
the <B>red</B> fox jumps
]]></Data>
A related feature on the "to do" list will allow you to edit and add values using a dialog so that these standard entities are displayed and edited as the characters they stand for, letting the editor escape the special characters when committing the data to the document.
Yes, this is necessary in large files especially, or when there are many occurrences in Replace All. I'll add this to the list.
Here is the updated example FOAL program: foalexample223.zip
Choose a font from the Fonts dialog in the View menu. Although you can get by with some Arabic text, the editor does not properly handle Right To Left (RTL) and bidirectional (BIDI) text (regardless of font). Some of the text will display RTL because the Windows APIs will render pieces of text correctly, but cursor movement and selection will be incorrect.
The reload capability bears some discussion. In practice, the main purpose of an editor feature that senses if the open files have been modified outside the editor is to prompt you when you switch back to the editor. It is very rare to be notified while in an editor that an independent process has modified a file in the background. If such a thing happens, it would require some design in terms of how to notify the user without being a nuisance, especially if it is modified multiple times. As this case is fraught with design issues, and it is rare, I have not attempted to solve it. Also, I initially looked into FindFirstChangeNotification (a feature that only goes back to Windows NT not 9x), but ended up just doing a test of the open files at the time of re-activating the editor. This avoids the complexities of background thread notification when the information is only used at activation anyway. Let me know if this solution is not adequate.
I agree! For the time being I'm using other tools for find and replace, find in files, but I do plan one day to get these essentials into this editor. Thanks for the comment.
Thanks again Thomas for the great feedback. Update: (1) and (2) will be implemented sometime soon, but note that for now you can close the docked help with the ESC key. (3) (4) and (5) are fixed in Beta 2.1.2 shown above.
Great! Your comment is much appreciated.
FOAL stands for "firstobject Access Language," giving you unprecedented ease of access to XML and HTML documents via CMarkup. In the editor, files containing FOAL programs use the filename extention .foal. Use the code generation functions in the editor (see right-click context menus) to automatically generate working programs that you can run (F9), step through (F10, F11), and modify. So far, the language is documented briefly in the editor's help (F1).
As this is a beta release, function names and other language features are subject to change. Subsequent releases will not necessarily be compatible, though changes should be minor.
To see FOAL in action, open the runtest.foal file included in the Beta zip and press F10 and keep pressing F10 to step through line by line. You can click on CMarkup variables shown in the debug bar to watch them in action too.
The settings have been moved from the registry to your user Application Data\firstobject\XML Editor\settings.xml. The settings.xml file is created based on the registry settings if available.
Unicode will not be supported in the status bar until I start compiling the application for Windows Unicode, or obtain a UTF-8 status bar control. I could use the UTF-8 CDataEdit control for the Preferences Tree Customizations editbox, but I suspect for most users proper ANSI support will be adequate. This beta fixes a bug where it was using the double-byte ANSI text from the control as if it was UTF-8 which was garble for non-ASCII.
MSXML Validate supports validation by DTD, and also provides MSXML well-formedness checking. It is a quick way to ensure the document is "good" XML. Validation by XML Schema requires extra setup not implemented yet. And other validation technologies such as Relax NG would require another component.
Others have requested line numbers in the gutter or status bar. The Line/Col status is on the To Do list. There is a "Go to line" function (Ctrl+G) if you know the line number you are looking for.
Both very good suggestions. See Beta 2.0.4.
The license as pertains to the editor is not for extra functionality, it is for the source code. The firstobject XML Editor as an executable utility is FREE to anyone. Just download it (the latest version is foxe203Beta.zip, see below) and use it, free, period. The Advanced CMarkup Developer is for C++ MFC developers who want to use the software components and/or modify the utilities for their own internal purposes.
Update: Reload prompt is implemented since Beta 2.1.3.
I think your 5th item is already supported in the beta except it does not display the attrib= part. You set the particular attributes you would like to "promote" to be displayed with the element name in the Tools Preferences dialog. The other points are good and may be implemented rather quickly (except the 3rd). Grab the latest beta below.
Update: Go To Line (Ctrl+G) is available since Beta 2.0.3.
This is the trade-off with generic parsing that does not do anything special for a specific kind of markup. The result will be even worse with a single less than sign that can often appear in a script. It would be possible to specifically recognize HTML by the pattern of tags and/or the filename extension and this may be implemented at some point.
You can use a comment around the VBScript to avoid this situation. See the HTML specification 18.3.2 Hiding script data from user agents where it says "JavaScript, VBScript, and Tcl allow the script statements to be enclosed in an SGML comment." In the XHTML specification 4.8. Script and Style elements a CDATA Section is recommended. Here is how the syntax highlighting looks when you use a comment:
<html>
<body>
<script type="text/vbscript">
<!--
set xmlDoc=CreateObject("Microsoft.XMLDOM")
xmlDoc.async="false"
xmlDoc.load("books.xml")
set nodes=xmlDoc.selectNodes("/bookstore/book")
for each x in nodes
document.write("<xmp>")
document.write(x.xml)
document.write("</xmp>")
next
' -->
</script>
</body>
</html>
Good observation. I got rid of it when I replaced it with a UTF-8 edit control for which I did not have a listbox. I neglected to mention that in the release notes item "Find/Replace dialog now has Unicode edit box and message boxes." This is due in part to the Windows-95 compatibility. A limitation I am going to cast off one of these days.
Thanks for your suggestions. Number 1 and 3 of the tree hot key suggestions are fixed in beta 2.0.2, and the others will be implemented in an upcoming release. The "grid" like behavior is something to consider.
When the element is opened (expanded) in the tree, the customization text that was next to it is cleared. The original idea was that since it is now likely visible in the items below, it is no longer useful at the top. But after using it for awhile I am convinced this was wrong and it is fixed in beta 2.0.2. Let's see if that solves some of the inconvenience you described, and we'll continue to think about your suggestions for tree customization features for attributes.
Beta 2.0.1 allows customization of the tree view to help in browsing the document tree by elevating details to display with the parent element when it is unexpanded. For example, by adding "ATTENDEE @lastname" to the Tree Preferences, you get the additional information displayed in the tree (shown without and then with ATTENDEE customization):

The Polish keyboard problem was simply a bug that has been fixed in the firstobject XML Editor 2.0.
Your point about the offset from the beginning is well taken. Others have mentioned the need for line numbers (if not in the gutter then in the status bar) and you are helping to raise the priority. As I said earlier, due to the implementation it is not trivial though.
This question ended up illuminating two different issues. There was a multi-language IME issue which has been fixed (see below), but the specific problem described by Richard is a limitation. The Windows OSK (On-Screen Keyboard) is accessed from Start -> All Programs -> Accessories -> Accessibility, and is not an IME program. The problem is that the OSK does not always communicate with "non-Unicode" programs in the system default code page. Though the firstobject editor uses Unicode strings, they are UTF-8 rather than UCS-2 or UTF-16 "wide character" and therefore it is not classified as a Windows Unicode program. When you use the Windows Language bar to switch the OSK layout, the code page of the OSK changes and it does not convert back to the system default code page when it forwards the keystrokes to the program, and this results in the mismatched character set garble he described. However, the OSK will work fine in any language with the firstobject editor as long as you reboot with the corresponding language for non-Unicode programs in the Control Panel Regional Settings.
However, with IME the firstobject XML Editor 2.0 works even if you switch languages. Windows comes with IME capabilites for far eastern language input including "IME Pads" which are on-screen keyboards, as well as mechanisms that appear inside of edit windows. As with the OSK, you can use the Windows Language bar to switch IME languages, but in the case of IME the Unicode text can be accessed on Windows NT-based machines (Windows NT 4.0, Windows 2000, and Windows XP and forward), so the firstobject XML Editor is able to support this.
Yes there was a bug in search that whenever your cursor was at the end of the document and you did a Find (Ctrl+F), the search dialog hanged regardless of what you entered or what your document contained. This is fixed in release 2.0.
Good suggestion. This is implemented in release 2.0.
Thanks for your feedback. Did you know you can press Enter while on a tree item or double-click a tree item to highlight the corresponding text in the editor? Using the keyboard to move around the tree is pretty convenient now with Right-Arrow to expand, and even the Del key works. I can see what you mean that it might be intuitive for F5 (Refresh) to work in the opposite direction when you are in the tree, but since F5 also re-parses the document if modified, it can jump you around in the tree the first time depending on modifications in the document so it might not end up simplifying the user experience.
Update: Go To Line (Ctrl+G) is available since Beta 2.0.3
As you suggested, in release 1.6 the indenting (formatting) works on the parts of the document that parse correctly. Also formatting leaves the selection where you are in the document when you format (which is a big usability improvement), and tab indent and unindent are implemented in release 1.6 too. Thanks for the good suggestions.
Update: Go To Line (Ctrl+G) is available since Beta 2.0.3.
No it is not open source. As mentioned in the firstobject XML Editor article, the full Visual C++ source is available as part of the Advanced CMarkup Developer License. See Product Information.
Great! These are in release 1.6. Use F4 to toggle between panels.
A lot of users have suggested line numbers. The way the CDataEdit Class is implemented to be very fast on large files makes it more of a challenge than in other edit control implementations, but I've designed a way to do line numbers and hope to get it into one of the upcoming releases.
Update: Go To Line (Ctrl+G) is available since Beta 2.0.3.
The non-word-wrap End key, autoscroll, word wrap preference, and indent hot key F8 have been fixed/implemented in release 1.6. The attribute value color has not been changed yet (feel free to make color suggestions), and may be made configurable in an upcoming release.
This has been implemented in release 1.6 and also an asterisk indicates a document modified since it was loaded or saved.
|