xsl-list
[Top] [All Lists]

RE: [xsl] xlink:href - how do I get the value of?

2008-06-18 03:00:13
I have an equation graphic that contains a "xlink:href" 
attribute that I want to get the value of to use as the image 
src. I have tried numerous ways of accessing this value but I 
keep getting an error! For example if I use:

<xsl:value-of select="@xlink:href" />

I get the following error:

"A Transformer object cannot be created that satisfies the 
configuration requested. This could be due to a failure in 
compiling the XSL text."

First thing you need to do is to sort out your development environment so
that you are seeing the real error messages, not just some summary that
tells you there were error messages that you haven't seen. The chances are
the real messages are going to some log file somewhere.

Alternatively, run your stylesheet through a development environment such as
Stylus Studio or Oxygen that shows you the errors on the screen.

Most likely explanation for this one is that you didn't declare the
namespace. Try writing:

<xsl:value-of select="@xlink:href"
xmlns:xlink="http://www.w3.org/1999/xlink"/>

(It's more usual to put all the namespaces on the xsl:stylesheet element,
but if there's only one use of the namespace, it's less obtrusive to declare
it locally.)

Michael Kay
http://www.saxonica.com/


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