[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
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
|
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
|