Copied to clipboard

Flag this post as spam?

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


  • Matthew Jarvis 129 posts 129 karma points
    Mar 13, 2012 @ 17:37
    Matthew Jarvis
    0

    Issues validating Pliable Form_Table with W3C Validation

    As the subject says, having real difficulty trying to make the Pliable Form_Table XSLT validate with W3C validation tool.

    The issue is related to the closing of the <input> tags.  W3C it seems doesnt like the way Pliable Form is closing it's input tags </input>.

    I've opened/closed Input tags like this previously <input type="text" name="" value=""/>

    XSLT looks like this:-

    <td class="input"> 
                      <xsl:variable name="className">
                        <xsl:text>pText</xsl:text>
                        <xsl:if test="string-length(class) &gt; 0">
                          <xsl:text> </xsl:text>
                          <xsl:value-of select="class" />
                        </xsl:if>
                        <xsl:if test="string-length(defaultValue) &gt; 0 and placeholder = '1'">
                          <xsl:text> placeholder</xsl:text>
                        </xsl:if>
                        <xsl:if test="string(required) = '1'">
                          <xsl:text> pRequiredText</xsl:text>
                        </xsl:if>
                      </xsl:variable>
                      <xsl:choose>
                        <xsl:when test="string(multipleLine) != '1'">
                          <input type="text" id="{$prefix}_{@id}" name="{$name}" class="{$className}">
                            <xsl:if test="string-length(defaultValue) &gt; 0">
                              <xsl:attribute name="value">
                                <xsl:value-of select="defaultValue" />
                              </xsl:attribute>
                            </xsl:if>
                            <xsl:if test="string-length(regexValidation) &gt; 0">
                              <xsl:attribute name="data-validation">
                                <xsl:value-of select="regexValidation" />
                              </xsl:attribute>
                            </xsl:if>
                        </input>

    Any help much appreciated

  • aghy 129 posts 308 karma points
    Mar 14, 2012 @ 11:44
    aghy
    0

    Hi Matthew,

    I think instead of using <input ... </input> you could try using <xsl:element name="input"> (Add the type, id, name, and class using attributes) </xsl:element>

    See if that works for you.

    Ben

  • 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