Subject: Re: [xsl] Trying to Extract a node with matching attribute value with xsltproc From: "Liam R. E. Quin liam@xxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Sat, 23 Mar 2024 02:19:53 -0000 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Trying to Extract a node with, ohaya ohaya@xxxxxxxx | Thread | Re: [xsl] Trying to Extract a node , BR Chrisman brchrism |
[xsl] Trying to Extract a node with, ohaya ohaya@xxxxxxxx | Date | Re: [xsl] Trying to Extract a node , BR Chrisman brchrism |
Month |