[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
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,B 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: B http://www.fromoldbooks.org
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|