|
Subject: Re: [xsl] Indirect referencing in XSLT/XPath? From: "Peter Flynn peter@xxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Sat, 5 Apr 2025 17:49:05 -0000 |
Is there any way to do indirect referencing in XSLT/XPath?
The following returns the value "this". Is that the kind of thing you meant?
======================== test.xml
<test>
<thing xml:id="foo" ref="blort">
<another xml:id="bar" ref="stuff"/>
</thing>
<yetmore xml:id="blort" ref="bar">
<something ref="foo"/>
</yetmore>
<else xml:id="stuff" value="this"/>
</test>======================== test.xsl <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
<xsl:template match="something">
<xsl:apply-templates
select="id(@ref)/id(@ref)/id(@ref)/id(@ref)/@value"/>
</xsl:template>| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Indirect referencing in X, Martin Honnen martin | Thread | Re: [xsl] Indirect referencing in X, Roger L Costello cos |
| Re: [xsl] Indirect referencing in X, Martin Honnen martin | Date | Re: [xsl] Indirect referencing in X, Dimitre Novatchev dn |
| Month |