Copied to clipboard

Flag this post as spam?

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


  • Simon 24 posts 64 karma points
    Feb 19, 2013 @ 15:49
    Simon
    0

    New schema problem with macro

    Hi all, I am currently upgrading our website from umbraco 4.0 to 6.0. I have some code that I have run through the converter I found at http://blackpoint.dk/umbraco-workbench/tools/convert-xml-schema-to-45-.aspx?p=2 but it still does not want to work.

    The old code I used was

    <xsl:value-of select="$source/node/data [@alias = 'bodyText']" disable-output-escaping="yes"/>

    The code it changed it to is

    <xsl:value-of select="$source/node/bodyText" disable-output-escaping="yes"/>

    This does not pull anything back, the only way I can get it to pull anything back is to use

    <xsl:value-of select="$source" disable-output-escaping="yes"/>

    Which pulls back more than just bodyText obviously. I can't find a way to get it to only pull through the contents of bodyText.

    Any help is greatly appreciated.

  • Chriztian Steinmeier 2800 posts 8791 karma points MVP 8x admin c-trib
    Feb 19, 2013 @ 16:05
    Chriztian Steinmeier
    100

    Hi Simon,

    You should use this instead:

    <xsl:value-of select="$source/*[@isDoc]/bodyText" disable-output-escaping="yes" />

    Note that no matter how many documents you have below $source, only the first will be output (but that was the same with the original, so... :)

    /Chriztian

  • Simon 24 posts 64 karma points
    Feb 19, 2013 @ 16:09
    Simon
    0

    Hi Chriztian, thanks for the fast response. That works for me now, thanks so much!

  • 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