DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Adding A Value To An Input Box With XSL

  • submit to reddit
        The XSL attribute has a name that refers to an attribute in the html tag that it follows. In this case, value. The content within the the xsl tags will be assigned to that attribute.

      <input type="text" name="sharesLook" onclick="this.value=''" >
      <xsl:attribute name="value">Content</xsl:attribute>

will output

      <input type="text" value-"Content" name="sharesLook" onclick="this.value=''" >