[RESOLVED] XSLT: Syntax for html controls
Hi and thanks for reading.
Is there a difference between these two formatting options for a text box in an XSLT documet:
VB Code:
<INPUT TYPE="text">
<xsl:attribute name="id">
<xsl:text>txtLocation</xsl:text>
</xsl:attribute>
<xsl:attribute name="name">
<xsl:text>txtLocation</xsl:text>
</xsl:attribute>
</INPUT>
VB Code:
<INPUT TYPE="text" id="txtLocation" name="txtLocation">
They both seem to produce the same result! :confused:
OneSource
Re: XSLT: Syntax for html controls
Apart from the second one being more efficient in this scenario, nope.
However, should the ID/name change based on the XML document, the first (or following example) would be a better choice.
Code:
<INPUT TYPE="text" id="{NodeRef}" name="{NodeRef}" />
Where {NodeRef} refers to the XPath to execute to get the value. May only work in the MSXML4+ processor.