Andy Dingley <di*****@codesmiths.com> wrote:
VK wrote: I still prefer Martin's solution (if it works cross IE/Gecko)
The problem with that is that it only tells you "where you are", once
you've arrived there. If your intention is to serve text/html output
vs. application/xml (or a variant), then by the time you make this
test, you've already completed the HTTP transfer and its headers.
Sorry to say, but I'm not working with XHTML: first of all I don't like
it, secondly it is just not not supported enough to bother with
alternative solution. I'm using the HTML 4.01 Transitional (see the
link in the previous post). I just need some runtime template
adjustment, mainly in declared namespaces for IE. The first one is VML
namespace (counterpaired with SVG in Gecko/Opera 9 Beta). That could be
scripted over document.namespaces.add later, but why to patch something
later if it can be done on place? The second issue (that was the actual
reason of my post) is the anonymous content. While XBL allows to use
anonymous content on any element, Microsoft Viewlink requires to
pre-declare custom elements in a separate namespace. Doing all this
afterwards over scripting gets too messy and unreliable.
And yes, I know the next arguments - "so use only universally supported
features" :-) Thanks for advise (if it was ment), but with the same
success it can be applied to XSLT itself :-)