[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: namespace woes

Subject: RE: namespace woes
From: <Jarno.Elovirta@xxxxxxxxx>
Date: Fri, 4 Feb 2005 08:03:37 +0200
str split xslt
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.