This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 10788 - @srcdoc in polyglot documents
Summary: @srcdoc in polyglot documents
Status: CLOSED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML/XHTML Compatibility Authoring Guide (ed: Eliot Graff) (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Leif Halvard Silli
QA Contact: HTML WG Bugzilla archive list
URL: http://dev.w3.org/html5/html-xhtml-au...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-28 06:53 UTC by Leif Halvard Silli
Modified: 2011-08-04 05:07 UTC (History)
6 users (show)

See Also:


Attachments

Description Leif Halvard Silli 2010-09-28 06:53:10 UTC
Depending on outcome of   Issue-100 and Issue-103, describe how to write make @srcdoc XML-compatible.

Also see: http://www.w3.org/2002/09/wbs/40318/issue-103-objection-poll/results
Comment 1 Eliot Graff 2010-10-29 19:51:21 UTC
Hi Leif. 

Sine these issues are now decided, can you be clear about what you are looking for? What do you want to see added? Is it just something about the way the attributes value is encoded, or is it making the document thats inside the sourcedoc an xml-compatible document?

I'd appreciate it if you could propose text for any change required.

Thanks,

Eliot
Comment 2 Eliot Graff 2010-11-22 18:49:46 UTC
The two issues mentioned in the original bug have been resolved. As such, I am resolving this bug as "needs info." Please indicate whether any action should be taken based on the decisions. If no action needs to be taken, the bug can remain resolved.

Thanks,

Eliot
Comment 3 Leif Halvard Silli 2011-01-21 06:15:20 UTC
HTML5 now says:

http://dev.w3.org/html5/spec/the-iframe-element.html#process-the-iframe-attributes

]] Due to restrictions of the XML syntax, in XML the U+003C LESS-THAN SIGN character (<) needs to be escaped as well. In order to prevent attribute-value normalization, some of XML's whitespace characters  specifically U+0009 CHARACTER TABULATION (HT), U+000A LINE FEED (LF), and U+000D CARRIAGE RETURN (CR)  also need to be escaped. [XML] [[

Btw, this bug also directly relates to  bug 9965. As such the issue could be seen as being covered by bug 9965.

However, if you don't objecet, then I would suggest adding a note specifically about @srcdoc, as it is a very new, anti-pattern-ish attribute. 

May be you could solve this issue as part of solving bug 9965.  That is, I think you could specifically mention @srcdoc under secftion 7:
http://dev.w3.org/html5/html-xhtml-author-guide/html-xhtml-authoring-guide.html#attributes 
E.g. add, there, that escaping of tabs, line-feed and carriage-return is a particulary relevant with regard to @srcdoc.

Either that or make separate in another place in the document.
Comment 4 Eliot Graff 2011-02-12 00:39:31 UTC
I added the following example in section 7:

Example
<iframe srcdoc="<p>Hello &#x0A; &#x09; world!</p>" src="demo_iframe_srcdoc.htm"></iframe>

I believe that this fulfills the requirements of this bug and so I have resolved it.

Thanks for your help,

Eliot
Comment 5 Leif Halvard Silli 2011-02-13 19:32:20 UTC
(In reply to comment #4)

> Example
> <iframe srcdoc="<p>Hello &#x0A; &#x09; world!</p>"
> src="demo_iframe_srcdoc.htm"></iframe>

Very good. I am satisfied. But you have forgotten to escape all the necessary characters: the  '<' (Less than) sign occurs twice inside that @srcdoc attribute. And "<" must be escaped in XML.
Comment 6 Eliot Graff 2011-03-03 22:31:31 UTC
Changed the example to the following:

Example<iframe srcdoc="&lt;p&gt;Hello &#x0A; &#x09; world!&lt;/p&gt;" src="demo_iframe_srcdoc.htm"&gt;</iframe>

Thanks!

Eliot
Comment 7 Leif Halvard Silli 2011-03-03 23:30:41 UTC
(In reply to comment #6)
> Changed the example to the following:
> 
> Example<iframe srcdoc="&lt;p&gt;Hello &#x0A; &#x09; world!&lt;/p&gt;"
> src="demo_iframe_srcdoc.htm"&gt;</iframe>

Dear Eliot ... The point is to show what _needs_ to be escaped, and to leave everythingelse un-escaped, right? 

And - in fact - the ">" does _not_ need to be escaped.  (And this is the reason why I did _not_ ask you to escape the ">"  - I only asked you to escape the "<". I only asked you to escape the "<".

So please revert the &gt; to >.
Comment 8 Eliot Graff 2011-03-04 01:51:29 UTC
Hi Leif.

Reverted:

]]
Example
<iframe srcdoc="&lt;p>Hello &#x0A; &#x09; world!&lt;/p>" src="demo_iframe_srcdoc.htm"></iframe>
[[

Thanks for keeping me honest!

Eliot
Comment 9 Michael[tm] Smith 2011-08-04 05:07:00 UTC
mass-move component to LC1
Comment 10 Michael[tm] Smith 2011-08-04 05:07:24 UTC
mass-move component to LC1