Results 1 to 3 of 3

Thread: [RESOLVED] XSLT: Syntax for html controls

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Mobile, AL, USA
    Posts
    600

    Resolved [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:
    1. <INPUT TYPE="text">
    2.     <xsl:attribute name="id">
    3.         <xsl:text>txtLocation</xsl:text>
    4.     </xsl:attribute>
    5.     <xsl:attribute name="name">
    6.         <xsl:text>txtLocation</xsl:text>
    7.     </xsl:attribute>
    8. </INPUT>
    VB Code:
    1. <INPUT TYPE="text" id="txtLocation" name="txtLocation">

    They both seem to produce the same result!

    OneSource

  2. #2
    Frenzied Member axion_sa's Avatar
    Join Date
    Jan 2002
    Location
    Joburg, RSA
    Posts
    1,724

    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.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Mobile, AL, USA
    Posts
    600

    axion_sa ...

    Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width