Copied to clipboard

Flag this post as spam?

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


  • Ansar 181 posts 291 karma points
    Mar 28, 2011 @ 08:20
    Ansar
    0

    Contour data and XSLT issue...

    I am trying to print data from contour using XSLT..

    As per the contour documenation sample.. following code shoudl work..

    <xsl:for-each select="umbraco.contour:GetRecord('c0b46ad4-aa34-41d8-99e0-6c891dfb5275')/uformrecord/fields/child::*">
    <xsl:sort select="fullname" order="ascending"/>
    <h4>
    <xsl:value-of select="
    fullname"/>
    </h4>
    </xsl:for-each>

    but its not printing anything..

    I am sure the data is available and the folliwing code is printing complete data as a big string...

    <xsl:variable name="records" select="umbraco.contour:GetRecord('c0b46ad4-aa34-41d8-99e0-6c891dfb5275')" />  
    <xsl:value-of select="$records" /> 

    Can anyone please help me to make this work..

    Thanks and Best Regards,
    Ansar

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Mar 28, 2011 @ 10:48
    Jan Skovgaard
    0

    Hi Ansar

    What does the XML structure that gets outputted look like?

    Instead of <xsl:value-of select="$records" /> try using a xsl:copy-of instead and write the content out in a <textarea> - Then you can see the whole XML structure. You're probably not macthing the XML correctly.

    Try doing this

    <textarea>
    <xsl:copy-of select="$records" />
    </textarea>

    What does the XML look like?

    /Jan

  • Ansar 181 posts 291 karma points
    Mar 28, 2011 @ 11:21
    Ansar
    0

    Hi Jan,

    Thank you for the reply.. I have created a sample page here http://skgep1.aspgulf.net/z_test.aspx

    The 1st table shows all entries and the textarea shows one specific record..

    Regards,
    Ansar

  • Ansar 181 posts 291 karma points
    Mar 28, 2011 @ 16:08
    Ansar
    0

    Hi Jan,

    Thanks.. I got it...

    <xsl:variable name="records1" select="umbraco.contour:GetRecord('c0b46ad4-aa34-41d8-99e0-6c891dfb5275')//fields" />  
    <xsl:value-of select="$records1/comment/values/value" /><br />
     <xsl:value-of select="$records1/name/values/value" />

    Regards,
    Ansar

Please Sign in or register to post replies

Write your reply to:

Draft