XML Editor - WYSIWYG Editors

WYSIWYG Editors

WYSIWYG editors let people edit files directly with the tags represented by some form of graphical viewing rather than bare XML code. Often, WYSIWYG editors attempt to emulate the end result of some transform or CSS stylesheet application. This emulation may or may not be possible, depending on the transformation from XML into the end result.

Naive use of a WYSIWYG editor can lead to the creation of documents that do not have the intrinsic semantics of the particular XML language. This comes about if the user is focused on trying to achieve a certain visual presentation with the editor, rather than using the WYSIWYG to make editing the document easier. For instance, someone creating a web page could use an H2 element (meaning: second level title) instead of H1 (meaning: first level title) because it looks smaller on their current WYSIWYG editor. Such an author is making a choice based on the apparent visual representation, but a visitor to the author's web page can offer a very different rendering in their browser.

However, as long as the underlying meaning of the document is understood by the author, and the author does not make decisions based on the exact look in the WYSIWYG editor, such an editor can be of value to the writer. It is generally much easier to read a document that is being rendered in some fashion than it is to read the raw XML code. Also, editing can be much more intuitive, as the WYSIWYG editor can use tools similar to many word processing applications. Some WYSIWYG editors even allow the user to use a DTD or Schema and define their own user interface for editing.

Usually WYSIWYG editors support CSS but not XSLT, because XSLT transformations can be very complex, and guessing what the user meant when changing the end result can be impossible. The WYSIWYG editors that do support XSLT, such as Syntext Serna, will therefore apply changes directly to the original XML, while updating the view by running the XSLT for every change.

In the above example, a stylesheet is used to color table cells in a particular way. For instance, even rows do not have the same background color as odd rows, in order to make reading easier.

Read more about this topic:  XML Editor

Famous quotes containing the word editors:

    The trenchant editorials plus the keen rivalry natural to extremely partisan papers made it necessary for the editors to be expert pugilists and duelists as well as journalists. An editor made no assertion that he could not defend with fists or firearms.
    —Federal Writers’ Project Of The Wor, U.S. public relief program (1935-1943)