W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2010

[whatwg] Fwd: <INCLUDE> and links with @rel=embed

From: bjartur <svartman95@gmail.com>
Date: Wed, 19 May 2010 13:48:31 +0000
Message-ID: <4bf3ec37.e198d80a.29a8.380e@mx.google.com>
--------
> This all seems way too abstract - I think you are arguing for the
> wrong case with the right reasons. But in any case, you should try and
> make an example markup with your ideas and check if it really gives
> you what you think it will. I have sincere doubts.
Yeah, maybe my crazy idealism and tendency to reuse existing things don't mix up in this case.
The main purpose of <video> and <audio> is to create a scripting interface to online video.
But they also add new linking capabilities which should be available to any content whatsoever.
OK, letting me loose and only using current draft as a vague guideline.

<include href="./gpl" title="GNU General Public License> <!-- URI of general resource -->
	<include rel="alternate" href="./gpl.en" hreflang="en_US" title="GPL"> <!-- Some other way of marking alternatives would be better -->
		<!-- may add hreflang to all links herein for maximum compatibility -->
		<a rel="embed" href="./gpl.en.text" type="text/plain">...</a>
		<a rel="embed" href="./gpl.en.html" type="text/html" charset="..">...</a>
	</include>
	<include rel="alternate" href="./gpl.fr" hreflang="fr" title="GPL">
		<!-- similiar to above -->
	</include>
	<include href="./gpl-notes" title="Some secondary resource that should be bundled with the GPL">
		<a rel="alternate embed" href="./gpl-notes.en" hreflang="en_US">Notes on GPL</a>
		<a rel="alternate embed" href="./gpl-notes.fr" hreflang="is" lang="is">Um GPL</a>
	</include>
</include>

More sane rewrite:

<choose href="./gpl" title="GNU General Public License" id="gpl">
	<choose href="./gpl.en" hreflang="en_US">
		<a rel="embed" href="./gpl.en.text" type="text/plain">...</a>
		<a rel="embed" href="./gpl.en.html" type="text/html" charset="..">...</a>
	</choose>
	<choose href="./gpl.fr" hreflang="fr">
		<!-- ... -->
	</choose>
</choose>
<choose href="./gpl-notes" tilte="Notes on GPL" id="notes">
	<!-- ... -->
</choose>

Note: choose states relationship between alternative resources, not that the UA
must choose to render only one of them. Element might be named <alt>.

Note: Requires more metadata to state relationship between #gpl and #notes.

I think that making one of those elements a media element might make some sense.
Also, I think that <a rel="embed"> should be substituted for <source> and @src
of <video> and <audio> should be removed, and <a rel="embed"> used instead.
If that brakes scripting, ignore my suggestion.

Radically changing <link> might also fulfill these use cases.
That's not compatible with existing implementations though,
and that might require allowing <link> inside of <body>.

Do you think that <link rdf:about="./gpl" rel="alternate" hreflang="fr" href="./gpl.fr">
is better? Or
<div rdf:about="./gpl">
	<div rdf:about="./gpl.en" about-/href-lang="en_US">
		<link rel="alternate" type="text/plain"	href="./gpl.en.text">
		<link rel="alternate" type="text/html"	href="./gpl.en.html">
	</div>
	<link rel="alternate" hreflang="fr" href="./gpl.fr">
</div>
Although it brakes compatibility with browsers it expresses the desired info.
This feels like something that might be in a XHTML+XLink document.
Received on Wednesday, 19 May 2010 06:48:31 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:23 UTC