[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Embedding HTML Select Lists in XSL ????

Subject: Re: Embedding HTML Select Lists in XSL ????
From: Mike Brown <mike@xxxxxxxx>
Date: Mon, 12 Feb 2001 14:17:38 -0700 (MST)
xsl html select option
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">&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>
<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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.