Copied to clipboard

Flag this post as spam?

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


  • D-au 26 posts 76 karma points
    Jan 19, 2012 @ 00:00
    D-au
    0

    parsing value on input attribute issue 4.6.1

    Hi guys,

    Just quick question regarding 4.6.1 version, does some of the xslt code had become dysfunctional for example:

    This does not work: select="./node" (works on 4.0.4.2 though)

    But this works: select="./*"

    Is there any other major changes that we need to take note of?

     

    Thats just the first bad impression that I encounter while using the later version. Here is the real issue.

    For some reason I just can't parse the value on my alias into input attribute, however I could use @nodeName to parse as value.

    For example this works:

    <xsl:element name="input">
            <xsl:attribute name="type">hidden</xsl:attribute>
          <xsl:attribute name="value"><xsl:value-of select="./@nodeName" /></xsl:attribute>
            <xsl:attribute name="name">item_name</xsl:attribute>
        </xsl:element>

    This turns out blank when executed:

    <xsl:element name="input">
            <xsl:attribute name="type">hidden</xsl:attribute>
          <xsl:attribute name="value"><xsl:value-of select="umbraco.library:Item(./@id,'foodDescription')" /></xsl:attribute>
            <xsl:attribute name="name">item_name</xsl:attribute>
        </xsl:element>

    Strange thing is that <xsl:value-of select="umbraco.library:Item(./@id,'foodDescription')" /> rendered just fine outside the input attributes. 

    Any takers? or anyone experiencing the same issue?

  • Chriztian Steinmeier 2800 posts 8791 karma points MVP 8x admin c-trib
    Jan 19, 2012 @ 00:15
    Chriztian Steinmeier
    0

    Hi D-au,

    Yes, the XML Schema had a major upgrade in v.4.5 (and later) - you should familiarise yourself with those here

    For your specific problem, try this instead:

    <input type="hidden" name="item_name" value="{foodDescription}" />

     

    /Chriztian

  • D-au 26 posts 76 karma points
    Jan 19, 2012 @ 00:43
    D-au
    0

    Hey Thanks /Chriztian

    I'll take a look at those updates. Man, it is surprising how convenient the code is in comparison. Does the trick for me.

Please Sign in or register to post replies

Write your reply to:

Draft