W3C home > Mailing lists > Public > public-publ-wg@w3.org > July 2017

Re: Web Publications via HTML Imports

From: Laurent Le Meur <laurent.lemeur@edrlab.org>
Date: Mon, 24 Jul 2017 11:56:32 +0200
Message-Id: <6CE67970-741A-4C08-8794-E8B47BB09FEF@edrlab.org>
Cc: W3C Publishing Working Group <public-publ-wg@w3.org>
To: Dave Cramer <dauwhe@gmail.com>
I see some drawbacks in such a prototype:

- a web publication must convey structured metadata. The html meta element is a poor solution for metadata exchange (e.g. no way to validate the model).
- this import mechanism, when supported by a browser, fetches the complete set of imported resources. This is not really the need expressed (-> to list the resources and enable selective fetch).
- a native reading system would spend more time parsing such html (tag soup) structure than a small JSON or XML structure. 

One could easily create an equivalent prototype with an HTML document fetching a JSON structure (.eg via jQuery.getJSON). The HTML document could then be used as a "browser-friendly" start page. 

Cordialement, 

Laurent Le Meur
EDRLab


> Le 24 juil. 2017 à 05:31, Dave Cramer <dauwhe@gmail.com> a écrit :
> 
> I've been experimenting a bit with a different approach to creating web publications.
> 
> Our fundamental goal is figuring out how to treat a collection of web resources as a single entity. It's not hard to create a list of such resources--EPUB had the package, PWG has been talking about JSON manifests. But both those things just refer to the resources rather than including them, and both those things aren't HTML. 
> 
> And it occured to me that this exact problem was solved twice in the XML document world, first with external entities and then with xinclude. And HTML has created just such a feature, in the form of HTML imports*.
> 
> A web publication can be represented by a single HTML document that includes other documents via html imports:
> 
> <link rel="import" href="chapter-1.html">
> <link rel="import" href="chapter-2.html">
> 
> I've made a little example at:
> 
>  https://dauwhe.github.io/zero-labs/MobyDickImport/MobyDickImport.html <https://dauwhe.github.io/zero-labs/MobyDickImport/MobyDickImport.html> 
> (see #2 below for why you should view using Chrome). 
> 
> I see lots of advantages:
> 
> 1. It's harder to argue about what the URL of the web publication is :)
> 
> 2. It's easy to provide fallback behavior. If you view the above link in Chrome, you see the entire copy of the book, as Chrome supports HTML imports. If you view the link in Safari or Firefox, you see the book table of contents, so you can still access every resource. And yes, there's a polyfill for HTML imports. 
> 
> 3. The HTML file containing the imports provides a "canvas" for authors who wish to supply their own user interface, and also allows reading systems to just take the links.
> 
> 4. Nested web publications become easy.
> .
> 5. Resources can be shared between different web publications.
> 
> 6. The master HTML file is a natural location for publication metadata, which can be expressed with all the richness and i18n support of HTML (and can also be embedded as JSON-LD, etc.
> 
> 7. Web app manifests could still be used to provide save-to-homescreen, etc.
> 
> 
> *Yes, HTML imports are controversial, and may evolve into a module system. Lots of interesting discussions at https://github.com/w3c/webcomponents/issues/645 <https://github.com/w3c/webcomponents/issues/645>. Might be fun to talk to Web Platform WG folks about our use cases. Finally something fun to do on Friday at TPAC!
> 
> Dave
> 
> 
>  
> 
> 
> 
> 


Received on Monday, 24 July 2017 09:57:04 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:52:14 UTC