Copied to clipboard

Flag this post as spam?

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


  • Sean Dooley 289 posts 528 karma points
    Jun 10, 2011 @ 13:04
    Sean Dooley
    0

    macro error in richtexteditor

    The following XSLT macro saves without any errors, umbDebugShowTrace=true shows no errors, but the rich text editor renders an error.

    It seems to error when attempting to GetMedia

    <xsl:variable name="image" select="umbraco.library:GetMedia($thumbnail, 0)" />

    Below is the full XSLT macro code

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
    <xsl:stylesheet
      version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:msxml="urn:schemas-microsoft-com:xslt"
      xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" xmlns:ucomponents.cms="urn:ucomponents.cms" xmlns:ucomponents.dates="urn:ucomponents.dates" xmlns:ucomponents.io="urn:ucomponents.io" xmlns:ucomponents.media="urn:ucomponents.media" xmlns:ucomponents.members="urn:ucomponents.members" xmlns:ucomponents.nodes="urn:ucomponents.nodes" xmlns:ucomponents.search="urn:ucomponents.search" xmlns:ucomponents.strings="urn:ucomponents.strings" xmlns:ucomponents.urls="urn:ucomponents.urls" xmlns:ucomponents.xml="urn:ucomponents.xml"
      exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets ucomponents.cms ucomponents.dates ucomponents.io ucomponents.media ucomponents.members ucomponents.nodes ucomponents.search ucomponents.strings ucomponents.urls ucomponents.xml ">
      <xsl:output method="xml" omit-xml-declaration="yes"/>
      <xsl:param name="currentPage"/>
      <xsl:param name="thumbnail" select="/macro/thumbnail"/> <!--mediaCurrent-->
      <xsl:param name="video" select="/macro/video"/> <!--mediaCurrent-->
      <xsl:template match="/">
        <!-- start writing XSLT -->
        
        <xsl:if test="($thumbnail !='') and ($video !='')">
          <xsl:variable name="image" select="umbraco.library:GetMedia($thumbnail, 0)" />
          <xsl:variable name="vid" select="umbraco.library:GetMedia($video, 0)" />
          <a class="video-link" href="#player">
            <img alt="Play video" name="{$vid/umbracoFile}" src="{$image/umbracoFile}" />
          </a>
        </xsl:if>
      </xsl:template>
    </xsl:stylesheet>

    Any ideas?

Please Sign in or register to post replies

Write your reply to:

Draft