This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Embedding HTML Select Lists in XSL ????
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] Embedding HTML Select Lists in XSL ????
- From: Mike Brown <mike at skew dot org>
- Date: Mon, 12 Feb 2001 14:17:38 -0700 (MST)
- Reply-To: xsl-list at lists dot mulberrytech dot com
Joey Garcia wrote:
> I am using the <xsl:output method="html"> but that doesn't seem to be
> working since it was barking about a <BR> tag until I changed it <BR/>.
The output method is how you want your result tree to be serialized after
it is constructed. You must still specify the construction of the result
tree in terms of well-formed XML.
Make sure you have
<xsl:output method="html"/>
not
<xsl:output method="html">
Don't use disable-output-escaping.
> <span class="myTitle">Packages</span><BR/>
> <select name="lstPackage" onChange="showContent(this.selectedIndex)">
> <option value="top">Select Package</option>
>
> <!-- Begin - Transform to show ALL Packages -->
> <xsl:for-each select="/package_content_collection/packages/package">
> <xsl:text disable-output-escaping="yes"><</xsl:text>option
> value="<xsl:value-of select="guid"/>"<xsl:text
> disable-output-escaping="yes">></xsl:text><xsl:value-of select="name"/>
> </xsl:for-each>
> <!-- End - Transform to show ALL Packages -->
>
> </select>
> <BR/><BR/>
Try this instead:
<span class="myTitle"Packages</span>
<br/>
<select name="lstPackage" onChange="showContent(this.selectedIndex)">
<option value="top">Select Package</option>
<option value="{guid}">
<xsl:value-of select="name"/>
</option>
</select>
<br/>
<br/>
You would do well to read the parts of the spec that explain the XSLT
processing model. You should understand taht your stylesheet is not a
literal specification for output.
The whitespace in between the markup in the in the stylesheet is
insignificant as long as it is not adjacent to non-whitespace text.
The curly braces can be used in certain attribute values defined in the
spec as "attribute value templates".
- Mike
____________________________________________________________________
Mike J. Brown, software engineer at My XML/XSL resources:
webb.net in Denver, Colorado, USA http://skew.org/xml/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list