xsl-list
[Top] [All Lists]

Re: [xsl] with or without namespace

2010-11-16 11:38:01
ac wrote:

To process these elements irrespective of their namespace, I can use
expressions like
*[local-name(.) = "a"] and *[local-name(.) = "b"]
all through the stylesheet but, in the stylesheet, I would much rather
map everything to the same namespace (possibly to default- or
no-namespace) and either use a single prefix, or better still, no
prefix, all over the stylesheet, to refer to all or any of these elements.
/xx:a, /xx:b, or /a , /b, for example
What would be the best way to declare the stylesheet namespaces to
achieve this, if possible?

With XSLT/XPath 2.0 you are allowed to use
  /*:a, /*:b
to select elements with local name 'a' respectively 'b' in any namespace (including no namespace).

--

        Martin Honnen
        http://msmvps.com/blogs/martin_honnen/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--