From: Paul Ferwerda [mailto:pflists(_at_)gmail(_dot_)com]
Sent: Monday, September 29, 2008 2:37 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Confusing namespaces and xslt
I have a newbie question. I've gone round and around on this issue and
haven't been able to make any headway on my own. I suspect I'm missing
some basic understanding of how to use XPath expressions and how
namespaces are used. so I apologize in advance if the question is a
stupid one.
I need to handle the following xml and generate new xml that makes
some changes to some of the attributes;
[...]
In your XSL, on the stylesheet or transform element declare the namespace with
whatever prefix you desire. That will allow you to use that prefix in your
XPath statements. So:
<xsl:stylesheet version="1.0"
xmlns:client="http://somecompany.com/box/client"
xmlns:box="http://somecompany.com/box"
Now in your XPath:
/client:box-client/client:network/box:components
Andy.
--~------------------------------------------------------------------
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>
--~--