467,888 Members | 1,383 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,888 developers. It's quick & easy.

How to get a readonly tag into an input

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?

Feb 8 '07 #1
  • viewed: 4028
Share:
4 Replies
Cecil Westerhof schrieb:
<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"
--
Johannes Koch
Spem in alium nunquam habui praeter in te, Deus Israel.
(Thomas Tallis, 40-part motet)
Feb 8 '07 #2
Cecil Westerhof wrote:
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
Feb 8 '07 #3
Peter Flynn wrote:
Cecil Westerhof wrote:
>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?
It is possible to hace severall outputfields in the inputfile and they
should all be transformed.

Feb 9 '07 #4
Johannes Koch wrote:
Cecil Westerhof schrieb:
> <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"
This works. Thanks.

Feb 9 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Gary Homewood | last post: by
4 posts views Thread by datactrl | last post: by
3 posts views Thread by Hamish | last post: by
7 posts views Thread by Jimbo | last post: by
2 posts views Thread by J. McConnell | last post: by
reply views Thread by MrMoon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.