RE: Hypermedia & web architecture

Hi David,

>You can serve an html document that contains
>(say) ChemML as inert markup in one script element and some javascript
>in another script element that parses it and processes it in some way
>but the host document (and thus the mime type of the thing) has to be
>text/html even if it just consists of the xml markup of chemML and a
>script element to process it.

What is special about the script element, and why does the content have to be _inside_ the element ie why can't the content be referenced by the href and type attributes?

>If you want that interaction to be controlled by javascript then the
>controlling media type has to be one of the ones for which browsers
>implement script processing, so html, basically.

If browsers contain full xml parsers, then a lot of that seems to be a waste of effort if the controlling media type hast to be html.  But anyway, I'm not trying to say browsers should work differently, because I guess if one wants browsers to work differently, one can always join a project and try to make that happen.  I'm just trying to figure out *why* the contolling media type has to be html.

>
>> Isn't that what <?xml-styleheet spec is for? How does anything
>> discussed here help the XSLT case? which is exactly the behaviour
>> they do all implement for xml-stylesheet PI.
>
> Why is a processing instruction necessary?

> You suggested a <link>
>element but <link> is _HTML_ It would have been wrong for an XML
>stylesheet spec to pre-allocate an element name link 

Not sure why a link element in html is any more wrong than specifying a processing instruction.

> > And, can I run an XSLT 2
>> stylesheet with that facility?

>Indirectly yes, see saxon-ce (internally it uses an xslt 1 stylesheet
>loaded by the browser which just loads a stub html document with a
>script element that loads the (javasript implementation of) the XSLT2
>engine.

And how does the XSLT processor load resources off the web then?  For example xsl:import, xsl:include etc?

Thanks,
Peter

Received on Wednesday, 1 August 2012 22:04:42 UTC