Re: [xslt] xsl:element namespace query



From: "Le grande pinguin" <rm@mh-freiburg.de>
> > > I'll change the code to move the namespace down to the children
elements.
>
> Please, don't! There are many situations where this would blow up file
> size dramatically (authogenerated XML, catalog files for example, where
all
> entries look like:
>  <item price="12.90$" vendor:avail="56" > ....
> moving the namespace decl. for the vendor prefix down from the parent node
> to each item will blow up documents).
>

I can definitely understand your view, libxslt does provide a nicer
more-compact
solution at present.

I'm still only learning XSLT so excuse me if this is wrong, but can't you
design the
stylesheet to specifically declare the namespaces in the parent nodes?
The tutorial on the following page has two examples, one where the
namespaces
are declared on the parent node (as libxslt does now), the other where the
namespaces are declared against each element (as the other XSLT processors
do,
and my proposed change will achieve).
http://www.xml.com/pub/a/2001/04/04/trxml/index.html
So, the nice compact solution is still available, it just needs the
stylesheet to be
designed differently.

I have no definite requirement to change this behaviour apart from bringing
libxslt
in line with other processors by using a more literal reading of the spec,
and
Daniel pointed out that by doing this will help ease in a couple of changes
required
for XML Namespaces 1.1. Other than this though, I have no overriding
argument
against your reasons.

As Daniel will still have final say on applying it to libxslt, the best
thing I can think
of is if I still produce a patch to cover the change, people can choose
whether or
not they actually want to use it.

Oh, and thanks to yourself and Daniel for pointing out what was wrong with
relying on prefixes for namespaces...

Richard



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]