Copied to clipboard

Flag this post as spam?

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


  • Michael 34 posts 54 karma points
    Aug 24, 2012 @ 15:14
    Michael
    0

    XSLT Content:Encoded

    Hi,

    I was wondering if someon would be able to help me with XSLT as i have been using the code below, but since upgrading to 4.8.1 it no longer works

    <p><xsl:value-of select="umbraco.library:TruncateString(content:encoded, number(700), '...')" disable-output-escaping="yes" /></p>

    Any help would be great...the error i get is below

     

    Error occured

    System.Xml.Xsl.XslLoadException: Prefix 'content' is not defined. An error occurred at C:\inetpub\wwwroot\LibertyComms\xslt\634814144542980000_temp.xslt(22,6).
    at System.Xml.Xsl.XslCompiledTransform.LoadInternal(Object stylesheet, XsltSettings settings, XmlResolver stylesheetResolver)
    at umbraco.presentation.webservices.codeEditorSave.SaveXslt(String fileName, String oldName, String fileContents, Boolean ignoreDebugging)

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Aug 24, 2012 @ 21:45
    Jan Skovgaard
    0

    Hi Michael

    Are you reading data from another xml feed? If so you just need to declare the "content" namespace in the beginning of the XSLT file. Can't remember exactly from the top of my head but if you try posting all of the code then I might be able to be more specific :) (Unless Chriztian Steinmeier sees this post before you respond :D).

    /Jan

  • Michael 34 posts 54 karma points
    Aug 28, 2012 @ 16:27
    Michael
    0

    Hi Jan,

    I did a complete re-install and then updated to 4.8.1 again and then re-built the site and it worked.

    Thanks for your reply

Please Sign in or register to post replies

Write your reply to:

Draft