This is the mail archive of the xsl-list@mulberrytech.com mailing list .
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Hi,
I am trying to write some XSL that allows me to specify how the data should be displayed based on the attributes in the given XML. I have been able to use the xsl:if to get a working solution, but I would like to be able to do something a little more generic. Unfortunately, either the xsl:if doesn't support it, or I have been doing it wrong. How do I fix this?
Current XML:
<column name="model" type="String" description="Auto Model" in_textbox="true">Mustang</column>
<column name="vintag" type="String" description="VIN Number" in_textarea="true">abc</column>
desired XML:
<column name="model" type="String" description="Auto Model" field_type="textbox">Mustang</column>
<column name="vintag" type="String" description="VIN Number" field_type="textarea">abc</column>
current XSL:
<!-- test to see whether the value goes in a textarea or text field -->
<xsl:if test="@in_textbox">
<td><INPUT TYPE="text" Name="{$table_name}:{$column_name}" Value="{$field_name}"/></td>
</xsl:if>
<xsl:if test="@in_textarea">
<td><textarea Name="{$table_name}:{$column_name}" ROWS="4" COLS="40"><xsl:value-of select='.'/></textarea></td>
</xsl:if>
desired XSL:
???
Thanks,
Kerry.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |