Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 20th, 2011, 09:51 AM
Registered User
 
Join Date: Sep 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Retrieve Option Display Text from Dropdown

<option value = "test value">Test Test</option>

How do I retrieve the value of the display text ("Test Text") in the above drop down using XSLT? I am able to retrieve the option value using the following code.

<xsl:value-of select="/root/officeBuilding" />
 
Old September 20th, 2011, 10:19 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

If the above was in an HTML document you wanted to parse then you'd get the text value with something like this:

Code:
<xsl:value-of select="option[@value='test value']"/>
However I suspect that is really the question you wanted to ask.
__________________
/- Sam Judson : Wrox Technical Editor -/

Think before you post: What have you tried?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Double display of html:select option cesarv JSP Basics 6 July 20th, 2009 05:49 AM
Retrieve and Display Image asters .NET Framework 1.x 0 September 18th, 2008 03:56 AM
Reloading page when option selected in dropdown chandrasekhar200 Beginning PHP 1 March 10th, 2006 04:52 AM
How to retrieve last selected text line in text bo garetho General .NET 1 May 3rd, 2005 09:17 PM
Extract text from text file & put in dropdown box tsukey Beginning PHP 5 July 20th, 2004 09:49 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.