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

RE: Cannot Access Attribute with colon

Subject: RE: Cannot Access Attribute with colon
From: "Clifford, Karen" <Karen.Clifford@xxxxxxxxxxxx>
Date: Wed, 16 Oct 2002 15:56:06 +0100
xslt access attribute
Thanks for the suggestion......

I added it to the stylesheet and also found that to access it I had to use,
for example, 

 <xsl:when test="./link/@show='new'"> as opposed to xlink:@show

Thanks again for all your help.

Karen

-----Original Message-----
From: Jeni Tennison [mailto:jeni@xxxxxxxxxxxxxxxx]
Sent: Wednesday, October 16, 2002 3:10 PM
To: Clifford, Karen
Cc: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
Subject: Re:  Cannot Access Attribute with colon


Hi Karen,

> I need to access the values of the xlink:show and xlink:href
> attributes, unfortunately using '@xlink:show' does not work, (ie
> <xsl:value-of select="@xlink:show"/>) it doesnt seem to like the
> colon ' :'

My guess would be that you haven't declared the 'xlink' prefix within
your stylesheet. A name like xlink:show is a qualified name, with a
prefix ('xlink') and a local part ('show'). In order to resolve the
qualified name, the XSLT processor needs to be able to tell what
namespace the prefix 'xlink' is referring to, so it needs to have a
namespace declaration in scope.

Try adding a namespace declaration for the 'xlink' prefix to the
<xsl:stylesheet> element, as follows:

<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:xlink="http://www.w3.org/1999/xlink">
...
</xsl:stylesheet>

and the processor should stop complaining about the ':'.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.