How to get a readonly tag into an input

Cecil Westerhof

Usenet Archive
Joined
Apr 14, 2004
Messages
35
Reaction score
0
I have the following code in a xslt-file:

<xsl:template match="outputfield">
<xsl:for-each select='.'>
<tr>
<td class = "inputDescription"><xsl:value-of select='.' />:</td> <td><input class = "content" id = "{@id}" /></td> </tr> </xsl:for-each> </xsl:template>

I would like to have:

<xsl:template match="outputfield">
<xsl:for-each select='.'>
<tr>
<td class = "inputDescription"><xsl:value-of select='.' />:</td> <td><input readonly class = "content" id = "{@id}" /></td> </tr> </xsl:for-each> </xsl:template>

To make the input readonly. But with this change the processor crashes. How can this be done?
 

Johannes Koch

Usenet Archive
Joined
Nov 14, 2000
Messages
801
Reaction score
0
Cecil said:
<xsl:template match="outputfield">
<xsl:for-each select='.'>
<tr>
<td class = "inputDescription"><xsl:value-of select='.' />:</td> <td><input readonly class = "content" id = "{@id}" /></td> </tr> </xsl:for-each> </xsl:template>

To make the input readonly

readonly="readonly"
 

Peter Flynn

Usenet Archive
Joined
Jan 2, 2000
Messages
1,813
Reaction score
0
Cecil said:
I have the following code in a xslt-file:

<xsl:template match="outputfield">
<xsl:for-each select='.'>
<tr>
<td class = "inputDescription"><xsl:value-of select='.' />:</td> <td><input class = "content" id = "{@id}" /></td> </tr> </xsl:for-each> </xsl:template>

What is the purpose of the redundant for-each loop in this template?

///Peter
 

Cecil Westerhof

Usenet Archive
Joined
Apr 14, 2004
Messages
35
Reaction score
0
Peter said:
What is the purpose of the redundant for-each loop in this template?

It is possible to hace severall outputfields in the inputfile and they should all be transformed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
548,049
Messages
3,104,246
Members
248,133
Latest member
DujonT

Latest Threads

Top