Joseph Kesselman said:
[serving XML with xml-stylesheet PI in WWW context]
Style on the server
Serve XML and style on the client
Intelligently switch between the two (the server knows
what the client is, and can decide whether it trusts the
client's processor)
Actually, the server *doesn't* know what the client is, what
with UA's lying about themselves in User-Agent headers and
corporate proxies mangling request headers to prevent
divulging information that might lead to discovery of
attack routes for their internal networks (yes, that's
security-through-obscurity; and yes, that's a fact of life
whatever we might think about it). But that's beside the
point, because maintaining the capability tables is wrong,
hair-raising, mind-boggling and, ultimately, just plain
impossible. We tried that in the 90s when we didn't know
what the heck we were doing.
So all we really know is the Accept header (if the proxy was
so kind as to leave it be), and as far as I can tell
there's absolutely no indication there whether the UA will
be able to properly transform and render the text/xml that
it is so cheerfully willing to accept.
Offer the user their choice
I wouldn't think Joe U. Average would be particularly
thrilled by choosing 'HTML version' or 'XML+XSLT version'
upon visiting a website, especially given the fact that Joe
U. Average does not know and has no desire to know what all
that gobbledygook means. Again, choosing versions was
something we did back in the 90s. Nowadays, no one in their
right mind does that anymore. It's either graceful
degradation, stripping of the unnecessary gimmicks to
ensure maximum coverage or, for some delinquents,
displaying something along the lines of 'You need
WonkaWonka 2.3.15+ support to view this page'.
My personal take is that we're in the same position we
were before folks started demanding more consistant
behavior from HTML rendering,
Largely, we are. Note that even HTML+CSS rendering is still
not truly consistent, even in Standards mode, even across
major user-agents only. Things *have* improved greatly on
that front, there's no doubt about that.
and the proper response is the same: try to drive the
clients to properly support the specs, make them compete
for users on that basis,
The problem is that, IME, if User A cannot use Service B due
to many faults of his User-Agent C, he's not going to blame
the vendor of the user-agent. He's going to blame the
provider of the service. Arguably, he'd be right, too.
and provide fallbacks for those users who aren't
willing/able to upgrade (thought the fallbacks may not
offer all the bells and whistles.)
People in business of selling plane tickets to the
travellers are supremely uninterested in evangelising to
user-agent vendors. Come to think of it, isn't that
perfectly understandable of them? So it's either losing
some of the potential clients (and no businessman is going
to like that), or investing into designing and implementing
a system of fallbacks with little return (and no
businessman is going to like that either). Mind you, I'm
all for industry standards, but a standard is not an
industry standard until it's well-supported in the
industry. I'm also all for new and improved industry
standards, but I feel it would be unethical to promote
those at the expense of my employers, or worse, at the
expense of the employers of the people I'm giving advice
to.
We probably want to serve XML to customers, for
aggregation and automation and smart clients and so on.
Right, like I'm going to argue about that. Yes, we do. No,
convincing our employers to go with that before we can rely
on widespread support is not the right way to achieve the
desired results. Morally, if not otherwise.
Server-side styling is clearly the way to go in some
cases. Client side styling ditto.
Tools for tasks.
Absolutes are always inherently false, including this one.
Absolutely. <smirk/> Yes, even in WWW context there are sets
of requirements where going with serving XML+XSLT would be
the right thing to do. Those are rare.
I'm often sticking to absolutes when giving advice on the
newsgroups because people capable of making the right
choice in situations like this don't need my advice. They'd
be perfectly aware of the pros and cons, or capable of
doing all the needed research and reasoning and doing the
right thing afterwards, and my reiterating all the many
facets of the problem in question would be entirely
superfluous.
Now, people new to the field often take advice in the form
of 'foo is the right thing to do in most cases, but there
are these and those reasons that might make bar useful
under some circumstances' as an excuse to do bar anyway,
even when it's the wrong thing. Because they want to, and
don't understand (yet) whatever problems there might be
with bar approach.
ObXSLT: Compare with my Religious Hatred of xsl:for-each.
When talking about it, I just say 'Don't use it. Ever. It's
evil.' People capable of using it properly don't need my
ramblings, and likely are independent enough thinkers to
ignore any sermon I might be spewing forth. But if I
started explaining that *sometimes* it's the right and
goodly thing to do, someone would surely nest gazillionteen
xsl:for-eaches in <xsl:template match="/"/> and say it was
one of those cases. Like bloody hell it was.
Now, entirely OT: what does ObFoo really parse to? I'm
entirely Oblivious to the meaning of this Obscure
Obfuscation, and been unable to Obtain any sources of
relevant information by googling.