By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,246 Members | 2,131 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,246 IT Pros & Developers. It's quick & easy.

"if tests" and spaces

P: n/a
The transform below should create a dropdown where the
entry for "SSS Building I" is selected. (Or am I missing something? )

This transform creates the dropdown but doesn't do the select.

Can "if tests" work when there are spaces?


<building>SSS Building I</building>
<xsl:stylesheet version="1.0"
<xsl:output method="html"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"

<xsl:template match="/">

<select name="building">
<option selected="selected">
<xsl:if test="not(/xml_data/building)">
<xsl:attribute name="selected">selected</xsl:attribute>
</xsl:if>Select One
<option value="SSS Building I">
<xsl:if test="/xml_data/building='SSS Building I'">
<xsl:attribute name="selected">selected</xsl:attribute>
</xsl:if>SSS Building I
<option value="SSS Building II">
<xsl:if test="/xml_data/building='SSS Building II'">
<xsl:attribute name="selected">selected</xsl:attribute>
</xsl:if>SSS Building II
<option value="HHH Building III">
<xsl:if test="/xml_data/building='HHH Building III'">
<xsl:attribute name="selected">selected</xsl:attribute>
</xsl:if>HHH Building III


Jul 20 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.