Copied to clipboard

Flag this post as spam?

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


  • jayanthi 66 posts 86 karma points
    Sep 15, 2011 @ 20:45
    jayanthi
    0

    xslt transformed email-unable to get the data entered in the form

    All,

    I am trying  to send a xslt transformed email and i was not able to retrieve the data entered in the form.I have tried the sample xslt's provided, but ending with xslt error

    Error by the line "$records//fields/child::*"-Expression must evaluate to a node-set

    .Can any one help me.

  • bob baty-barr 1180 posts 1294 karma points MVP
    Sep 16, 2011 @ 17:38
    bob baty-barr
    0

    my for-each statement looks like this...

    <xsl:for-each select="$records//fields/child::*[name() != 'spamcheck']">

    and it works just fine... i have a captcha field on my form, hence the negation of the spamcheck field.

    can you paste a bit more of your code so we can get a better picture of what is going on?

    thanks,

  • jayanthi 66 posts 86 karma points
    Sep 21, 2011 @ 20:21
    jayanthi
    0

    Hi bob,

    this is my code it's very simple

    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt"
    xmlns:user="urn:my-scripts"
    xmlns:umbraco.library="urn:umbraco.library" exclude-result-prefixes="xsl msxsl user umbraco.library">
      <xsl:output method="html" indent="yes"  encoding="utf-8"/>
      <xsl:param name="records" />
      <xsl:template match="/">
      <table style="border-collapse:collapse;border:1px solid black;">
          <xsl:value-of select="$records//fields/child::*[caption = 'First Name']"/>
           </table>
         </xsl:template>
    </xsl:stylesheet> 

    this results in xslt error.(Expression must evaluate to a node-set)

  • bob baty-barr 1180 posts 1294 karma points MVP
    Sep 21, 2011 @ 20:24
    bob baty-barr
    0

    i believe that is becaue the param $records is an actual xml nodeset... try listing all fields using a for-each as i noted above, not targeting a caption directly.

  • jayanthi 66 posts 86 karma points
    Nov 01, 2011 @ 13:57
    jayanthi
    0

    Issue solved  iam trying to save it in xslt files, i just need to upload the file.

Please Sign in or register to post replies

Write your reply to:

Draft