- From: <bugzilla@jessica.w3.org>
- Date: Mon, 03 Dec 2012 06:44:25 +0000
- To: public-html-bugzilla@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=20201 Bug ID: 20201 Summary: polyglot markup and extensions via <script> (and <style>) Classification: Unclassified Product: HTML WG Version: unspecified Hardware: PC URL: http://www.w3.org/TR/html-polyglot/#script-and-style OS: All Status: NEW Severity: normal Priority: P2 Component: HTML/XHTML Compatibility Authoring Guide (ed: Eliot Graff) Assignee: eliotgra@microsoft.com Reporter: xn--mlform-iua@xn--mlform-iua.no QA Contact: public-html-bugzilla@w3.org CC: eliotgra@microsoft.com, mike@w3.org, public-html-wg-issue-tracking@w3.org, public-html@w3.org Depends on: 20198 The XML/HTML task force concluded that one way to embed "islands of XML" in HTML was to sue the <script> as XML container and use JavaScript to make it render in the DOM. See: http://www.w3.org/TR/html-xml-tf-report/#uc04 Example (for a real life solution see <http://www.amplesdk.com/examples/markup/svg/text/>): <script type="application/ample+xml"> <rootelement xmlns="application/foo+xml"/> </script> It seems like Polyglot Markup does not discuss that approach, which could be a useful approach in some situation, such as when the document *must* be served as text/html. So can this method be used in polyglot markup? I believe the answer is yes. With one caveat: there must be no DOCTYPE inside the script element. (And possibly there are other restrictions.) However, the restriction to not escape the "<" seems to me to be unnecessary whenever we use this extension method, as the the purpose is nevertheless to treat the code as markup. (The reason we must escape the "<" inside <script> when script is used fro javascrip is, I believe a different one, relating to the fact that the XML parser inflicts on the javascript or the css. But when the the content of script itself is markup, then this is not the same issue.) This proposal should perhaps end up as an extension of section 9 http://www.w3.org/TR/html-polyglot/#script-and-style though it may also bee needed to be mentioned in the introduction, pending bug 20198 -- You are receiving this mail because: You are the QA Contact for the bug.
Received on Monday, 3 December 2012 06:45:00 UTC