![]() |
|
|
|||||||
![]() |
XML - How to get a readonly tag into an input |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
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? Cecil Westerhof |
|
|
|
|
#2 |
|
Posts: n/a
|
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) |
|
|
|
#3 |
|
Posts: n/a
|
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 |
|
|
|
#4 |
|
Posts: n/a
|
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. |
|
|
|
#5 |
|
Posts: n/a
|
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. |
|