Re: [xsl] Modern web site design with XML and XSLT

Subject: Re: [xsl] Modern web site design with XML and XSLT
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 5 Jan 2010 21:12:57 GMT
> See, that makes sense to me as a REST developer -- serving application/
> xhtml+mathml -- as it applies the self-descriptive messaging constraint.
> What I'm trying to avoid is what I call "the w3schools approach" (which
> the NAG site is an example of), which relies on shared misunderstanding
> of Web architecture.  This has been quite the topic of late:

Not at all. It is an example of following w3c standards to the letter.


> There is nothing about the 'text/xml' media type which can be construed
> as telling browsers anything about how to process that payload.
> Without an XSLT PI, some browsers will display an XML file as a
> collapsible tree, like IE does.  Other browsers will display the
> output, ignoring all tags and CSS XML PIs (unless application/xml is
> used).  What no browser should do, is treat that as text/html and allow
> it to execute scripts -- that would be "privilege escalation" as
> described in my links -- until you put in an XSLT PI (for some
> reason).

That was the main point of developing XML, to allow XML to be served
over the web, and have styling information being supplied by a
referenced stylesheet. If you don't suppy a style then you et a browser
specific default, but since a style is supplied that is not relevant here.


> The point being, will an architecture using the w3schools approach
> still function in new browsers in two years?  Five?  I don't have that
> concern if I'm conforming with native Web architecture.

I fear you are misunderstanding the relevant specifications.
Obviously if browsers stop supporting xslt or the xml-stylesheet within
the next 5 years things will stop working, but otherwise this is a fully
standards conforming site (as is the xhtml version of the MathML2 Rec at
http://www.w3.org/TR/MathML2/overview.xml which uses similar technology)

Given that your suggested alternative appears to involve gratuitously
invalid xhtml and, you report, fails to work, I can't take too seriously
your comments that using xslt in this way breaks web architecture.

David

Current Thread