Re: [xsl] Embedding HTML Select Lists in XSL ????

Subject: Re: [xsl] Embedding HTML Select Lists in XSL ????
From: Mike Brown <mike@xxxxxxxx>
Date: Mon, 12 Feb 2001 14:17:38 -0700 (MST)
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"/>
   <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">&lt;</xsl:text>option
> value=&quot;<xsl:value-of select="guid"/>&quot;<xsl:text
> disable-output-escaping="yes">&gt;</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>
<select name="lstPackage" onChange="showContent(this.selectedIndex)">
   <option value="top">Select Package</option>
   <option value="{guid}">
      <xsl:value-of select="name"/>

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: in Denver, Colorado, USA    

 XSL-List info and archive:

Current Thread