This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Namespace problem
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] Namespace problem
- From: Mike Brown <mike at skew dot org>
- Date: Wed, 24 Oct 2001 17:54:06 -0600 (MDT)
- Reply-To: xsl-list at lists dot mulberrytech dot com
Uslu, Cihan Y (MED) wrote:
> What is wrong with this Stylesheet?
> The problem is this: When I apply the stylesheet, I get no results
> unless I remove the namespace from the XML document.
In your stylesheet, all your references to element names in the
source document are using no namespace.
For example,
<xsl:value-of select="/VisioDocument/Pages/Page/Shapes"/>
(actual path shortened for brevity)
means
"create a text node using the string-value of the first node
in the node-set consisting of:
elements named 'Shapes' (in no namespace)
that are children of elements named 'Page' (in no namespace)
that are children of elements named 'Pages' (in no namespace)
that are children of elements named 'VisioDocument' (same)
that are children of the root node"
In your stylesheet you have already bound the prefix 'user' to the
URI you need, so all you need to do is use it:
<xsl:value-of select="/user:VisioDocument/user:Pages/user:Page/user:Shapes"/>
- Mike
____________________________________________________________________________
mike j. brown, fourthought.com | xml/xslt: http://skew.org/xml/
denver/boulder, colorado, usa | personal: http://hyperreal.org/~mike/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list