Subject: Re: [xsl] 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 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Trying to Extract a node , Liam R. E. Quin liam | Thread | Re: [xsl] Trying to Extract a node , ohaya ohaya@xxxxxxxx |
Re: [xsl] Trying to Extract a node , Liam R. E. Quin liam | Date | Re: [xsl] Trying to Extract a node , ohaya ohaya@xxxxxxxx |
Month |