Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I add an HTML <input> tag within my XSL template?

Status
Not open for further replies.

southbeach

Programmer
Jan 22, 2008
879
US
I just inherited what should be a simple project. I have never seen nor worked with XML/XSL before so I am trying to figure my way out of this one.

Scenario:
Data query returns XML document
XSL template parses through XML document thus rendering ...

Problem:
I need to add an <input> tag within the rendered data grid. No matter what I try, my XSL template breaks.

Here is a sample of my latest attempt:
Code:
<td>
  <input type="text" size="6">
    <xsl:attribute name="qty[]"></xsl:attribute>
  </input>
</td>

The above does not allow anything to show on screen, nothing, not one line of data.

I have also tried using just the input tag but evidently, I cannot assign a name attribute to it as it causes an error and the page fails - I get an custom error as set by sysadmin ...

How do I get an input tag to work?

Thanks,



--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.
 
Well, I just changed my code to:
Code:
<td>
  <input type="text" size="6">
    <xsl:attribute name="name">ship[]</xsl:attribute>
  </input>
</td>

and it appears to work ...

Thanks!

--
SouthBeach
The good thing about not knowing is the opportunity to learn - Yours truly, 2008.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top