RE: [xsl] rogue xmlns="" in output xhtml

Subject: RE: [xsl] rogue xmlns="" in output xhtml
From: "Paul Spence" <paul.spence@xxxxxxxxx>
Date: Sat, 15 Oct 2005 11:32:27 +0100
> I think that's probably a mistake. If you are using saxon  6 (as I do in
> the day job, although I use saxon8 for most other stuff) I think it is
> much better to stick with XSLT 1.0 (which is a published recommendation)
> and use saxon:output to get multiple output documents. That way you are
> explictly using an extension element to get extended features.

Fair comment. When I first wrote this code I was heavily influenced by the
first edition of Michael Kay's book, and I've held off on changing this
because I was initially nervous about side-effects of changing to an
extension and because I thought that XSLT 2.0 was an imminent reality.
Anyway, I am in the process of changing my code now at last.

> You are getting
>       <title xmlns="">PROJFULLNAME: Home</title>
> 
> because you have generated a title element in no-namespace and that is
> the only way such an element can be serialised if its parent is in a
> namespace. The solution is to generate title (and all other elements) in
> the xhtml namespace, usually by putting xmlns="..." on xsl:stylesheet
> so it is in scope for the whole stylesheet.

Thanks a lot for your help. I've just replied to Michael Kay's message
explaining in more detail what I've done, and hopefully it's sorted.

Current Thread