[Home] [By Thread] [By Date] [Recent Entries]

Subject: Re: StreamBurner to preview Atom and RSS
From: "Liam R. E. Quin liam@xxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 7 Mar 2026 00:10:22 -0000
On Fri, 6 Mar 2026 12:15:08 -0000
"Schimon Jehudah sch@xxxxxxxxxxxx"
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:


> Is it valid or possible to allocate XPath directives as variables and
> apply the variables as XPath directives, similarly to "eval"?
> 
> <xsl:variable name="feed-subtitle"
>               select="'atom:subtitle'"/>  
> 
> <xsl:variable name="entry-iterate"
>               select="'atom:entry'">

No, but you can have,

<xsl:template match="atom:subtitle">
  <xsl:value-of select="." />
</xsl:template>

and call it by name or implicitly with apply-templates.

In xslt 3 and 4 you can be more clever.


-- 
Liam Quin: Delightful Computing - Training and Consultancy in
XSLT / XML Markup / Typography / CSS / Accessibility / and more...
Outreach for the GNU Image Manipulation Program
Vintage art digital files - fromoldbooks.org

Current Thread
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member