Copied to clipboard

Flag this post as spam?

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


  • Brad 94 posts 151 karma points
    Jul 24, 2013 @ 08:11
    Brad
    0

    Poll class is not defined.

    I'm having a crack at adding a poll to my site using Tim's example on http://www.nibble.be/?p=81

    After adding the custom xlst extention to my support project (calling it Poll), I copied that projects dll to the Umbraco bin folder. 

    I then went to add a declaration of this to the exltExtensions.xml file, not mentioned in Tim's tutorial but learned from this video.. 

    http://090978.org/umbraco-screencasts/xsltExtensions.html

    That file did not exist in the Umbraco/Config folder, so I created it. 

    (Not sure if I need this or not). The error below persists regardless of this file. 

    Back in Umbraco I created a new xlst file, pasted in Tim's xslt code for displaying the results. 

    To see if my extention is there I hit the 'Insert Value-Of button. Sure enough  its there. So far so good. 

    Seems Umbraco can see my method. 

    In the xslt I need to change the xsl:for-each loop. 

    From this.. 

     <xsl:for-each select="contourpoll:PossibleAnswers($formid)//question">

    to this

    <xsl:for-each select="UserControls.Poll:PossibleAnswers($formid)//question">

    What could go wrong from here?

    Not defined? How can Umbraco find it, but then say it's undefined? What am I missing here?

  • Kim Nedergaard 37 posts 144 karma points
    Jul 24, 2013 @ 08:55
    Kim Nedergaard
    101

    You need to properly need to add the prefix to your

    Add the following attribute to the in the top of your xslt document:

    xmlns:UserControls.Poll="urn:UserControls.Poll" 

    and add:

    UserControls.Poll to the exclude-result-prefixes attribute.

  • Brad 94 posts 151 karma points
    Jul 25, 2013 @ 01:37
    Brad
    0

    That did the trick. I'm not sure I ever whould have worked that out. Thanks Kim

Please Sign in or register to post replies

Write your reply to:

Draft