Umbraco XSLT issue

Posted by Brad on Stack Overflow See other posts from Stack Overflow or by Brad
Published on 2010-04-30T19:43:45Z Indexed on 2010/04/30 19:47 UTC
Read the original article Hit count: 499

Filed under:
|
|

I'm trying to use the Umbraco GetMedia function to write an image URL to the screen, I receive an error parsing the XSLT file.

<xsl:for-each select="$currentPage/descendant::node [string(data [@alias='tickerItemActive']) = '1']">
     <xsl:value-of select="data [@alias='tickerText']"/><br />
     <xsl:value-of select="umbraco.library:GetMedia(data [@alias='tickerImage'], 0)/data [@alias = 'umbracoFile']"/>
</xsl:for-each>

The tickerImage field contains the MediaID for which I'd like to display the URL. I can return the field outside the GetMedia function and it works fine. I can also replace the data [@alias='tickerImage] with '1117' (or any valid media ID) the XSLT passes verification and the script runs.

THIS WORKS:

 <xsl:value-of select="umbraco.library:GetMedia('1117', 0)/data [@alias = 'umbracoFile']"/>

THIS DOES NOT:

<xsl:value-of select="umbraco.library:GetMedia(data [@alias='tickerImage'], 0)/data [@alias = 'umbracoFile']"/>

Any help that can be offered would is appreciated.

Thanks!

© Stack Overflow or respective owner

Related posts about umbraco

Related posts about xslt