Re: [xsl] statically known namespaces

Subject: Re: [xsl] statically known namespaces
From: Frans Englich <frans.englich@xxxxxxxxx>
Date: Mon, 10 Jul 2006 14:27:10 +0000
On Monday 10 July 2006 13:41, andrew welch wrote:
> On 7/10/06, Florent Georges <darkman_spam@xxxxxxxx> wrote:
> > andrew welch wrote:
> >
> >   Hi
> >
> > > I would have thought that XSLT 2.0 could benefit from having
> > > "xsl" and "xs" predefined, any thoughts?
> >
> >   Because an XSLT script is an XML document, I don't see any interest
> > in having the XSLT namespace already bound.  The XML Schema namespace
> > could be interesting, but IMHO not if it is the only one.
>
> ....ahh completely forgot the XML side of things, been reading XQuery
> this morning.  The main point came from xs: though as my editor
> doesn't auto-generate it, and as I've never committed it to memory I
> have to cut and paste it each time...
>
> It's certainly a nice feature of XQuery, and as "xs:" is only used in
> attribute values it could be inbuilt and the stylesheet would still be
> well-formed XML... but of course "xsl:" would still need defining so
> there's not much point.

I agree the pre-defines makes writing queries easier.

I also sympathize with Nic James' comment on that one must have a rather well 
trained memory in order to create the boiler plate code in an XSL-T 
stylesheet without using a template. I think it heavily contributes to the 
verboseness and cumbersomeness of stylesheets. Perhaps a big plus for a 
programming language is "one must be able to write reasonable code without 
using a template." Well, the tradeoffs of XSL-T being XML is clear.

However, I know that some people disagree that XQuery predefines prefixes is a 
good thing. I didn't dwelve into their motivation, but it could be that some 
XQueries are valid XML except for not being namespace well-formed, and hence 
cause trouble. Don't ask me in what constellation.


Cheers,

		Frans

Current Thread