Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • skiltz 501 posts 701 karma points
    Sep 01, 2011 @ 23:13
    skiltz
    0

    using ":" in xslt attribute.

    Trying to do the following.

    <a class="addthis_counter addthis_pill_style">
    <xsl:attribute name="addthis:url">
    <xsl:value-of select="umbraco.library:NiceUrl($post/@id)" />
    </xsl:attribute>
    </a>

    Error: System.Xml.Xsl.XslLoadException: Prefix 'addthis' is not defined

    Any Solutions?

     

  • Chriztian Steinmeier 2726 posts 8320 karma points MVP 4x admin c-trib
    Sep 01, 2011 @ 23:46
    Chriztian Steinmeier
    3

    Hi skiltz,

    You need to add a namespace declaration on the <xsl:stylesheet> element to declare the addthis prefix, e.g.:

    <xsl:stylesheet version="1.0" xmlns:addthis="http://www.addthis.com/help/api-spec">

    And you can then do this:

    <a class="addthis_counter addthis_pill_style"
    addthis:url="{umbraco.library:NiceUrl($post/@id)}">...</a>

    /Chriztian

  • skiltz 501 posts 701 karma points
    Sep 01, 2011 @ 23:58
    skiltz
    0

    Thank you heaps.  Appreciated.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies