Bug 634 - <!DOCTYPE html SYSTEM "about:legacy-compat"> has side effects in BlueGriffon
Summary: <!DOCTYPE html SYSTEM "about:legacy-compat"> has side effects in BlueGriffon
Status: RESOLVED FIXED
Alias: None
Product: BlueGriffon
Classification: Unclassified
Component: General (show other bugs)
Version: trunk
Hardware: PC Mac OS
: P5 normal
Target Milestone: ---
Assignee: Daniel Glazman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-21 08:27 PST by Leif Halvard Silli
Modified: 2015-04-08 03:51 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Leif Halvard Silli 2014-01-21 08:27:27 PST
HTML5 specifies two variants of the HTML5 doctype:

   Common: <!DOCTYPE html>
Uncommmon: <!DOCTYPE html SYSTEM "about:legacy-compat">

The purpose of the uncommon variant is to silence (XML) tools that refues to produce a DOCTYPE without a URI. It is not supposed to have any effect that is different from the common variant. (I use the uncommon variant now and then because I have an - otherwise exellent - XML editor that otherwise makes a lot of noise. I have also found the uncommon doctype in online documents.)

However, in BlueGriffon, the uncommon variant triggers HTML syntax generation - as opposed to XHTML syntax generation. And the trigger effect overrides other signals (such as the XML prologue (<?xml version="1.0"?>) or the XHTML namespace declaration) that for documents with the common DOCTYPE, triggers XHTML generation.

Exampe - do this:

   1. In some editor, create a valid XHTML5 file:

<?xml version="1.0"?>
<!DOCTYPE html SYSTEM "about:legacy-compat">
<html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head><meta charset="UTF-8"/><title></title>
</head><body><p>abc<br/></p></body></html>

2. Save the file with the .xhtml file suffix
3. Open the file in BlueGriffon.
4. Check the source code

Expected results: 
    Same behavior as when using <!DOCTYPE html>:
    That is: BlueGriffon produces XHTML syntax.
Actual results:
    BG produces HTML5 syntax thatis both non-XML and non-polyglot.

Please make it irrelevant whether the common or the uncommon doctype is used.