xsl-list
[Top] [All Lists]

RE: namespace woes

2005-02-03 23:03:37
Hi,

I have a xsl stylesheet that uses str:split to convert a value into
fragment.

e.g.
...
<id>10.20.50</10>
...

Becomes

<root xmlns="http://www.w3.org/1999/XSL/Transform";>
  <pg id=10.20.50>
    <s>10</s>
    <s>20</s>
    <s>50</s>
  </pg>
</root>

Everything works great except, my root node is output with the default
namespace. This causes me much grief when I try to access a 
node by name
with an XPath expression.

My question is. How do I reference a node in the namespace context as
noted above,

Just declare xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; in your 
stylesheet and then use e.g. xsl:root/xsl:pg/xsl:s

or how can I prevent str:split from outputting 
the default
namespace?

Don't set the default namespace to be the XSLT one in the str:split template.

Cheers,

Jarno

--~------------------------------------------------------------------
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>
--~--



<Prev in Thread] Current Thread [Next in Thread>
  • namespace woes, Jerry Orabona
    • RE: namespace woes, Jarno.Elovirta <=