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

Re: Trying to Extract a node with matching attribute

Subject: Re: Trying to Extract a node with matching attribute value with xsltproc
From: "BR Chrisman brchrisman@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 23 Mar 2024 18:08:36 -0000
Re:  Trying to Extract a node with matching attribute
Might need to use <xsl:output method="text"/> as well.

On Fri, Mar 22, 2024 at 7:19b/PM Liam R. E. Quin liam@xxxxxxxxxxxxxxxx <
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> On Sat, 2024-03-23 at 01:55 +0000, ohaya ohaya@xxxxxxxxx wrote:
> [...]
>
> I think what you want is simply XPath here.
>
> But with XSLT you could use,
>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>
>   <xsl:template match="/">
>     <xsl:value-of select="//Setting[@Name = 'TheOneIWant']" />
>   </xsl:template>
> </xsl:stylesheet>
>
> The xsl:value-of "instruction" evalueates its argument and converts the
> result to a string (actually a "text node").
>
> The contents of the "select" attribute is an XPath expression.
>
> liam
>
>
> --
> Liam Quin, https://www.delightfulcomputing.com/
> Available for XML/Document/Information Architecture/XSLT/
> XSL/XQuery/Web/Text Processing/A11Y training, work & consulting.
> Barefoot Web-slave, antique illustrations:  http://www.fromoldbooks.org

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.