Leif H. S. wrote:

Another option could be to use XXE to produce HTML *but* to save as
.xht, .xhtml or .xml.

XXE cannot load or save HTML, only XHTML. For example, tag omissions, data-* attributes, etc, are not supported by XXE.



But note that "sanitize for Web" would be
necessary also for this option - even if there would be less to sanitize.

    How about adding a "sanitize for Web" function? What I mean is a
    saving/conversion feature which would save a copy of the current
    XHTML document as an HTML document and which would, during the
    conversion, also
    1. strip non valid features (such as PI’s),
    2. convert XML features to HTML features (e.g. change xml:lang="nn"
    to lang="nn" and change <?xml version="1.0" encoding="UTF-8"?> to
    <meta charset="UTF-8"/>
    3. save with the correct file extension


If you use "File|New" and select the document template called "XHTML|5.0|HTML Page", you'll already have 2) and 3).

1) could indeed be implemented by "XHTML|Preview".


--
XMLmind XML Editor Support List
xmleditor-support@xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to