|
Subject: Re: [xsl] Indirect referencing in XSLT/XPath? From: "Roger L Costello costello@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Sat, 5 Apr 2025 20:23:23 -0000 |
Peter's solution is nice. I revised his XML to be consistent with my original
post:
<Document>
<AIRCRAFT xml:id="AIRCRAFT" ref="ALTITUDE"/>
<ALTITUDE xml:id="ALTITUDE" ref="UNITS"/>
<UNITS xml:id="UNITS">FLIGHT_LEVEL</UNITS>
</Document>
AIRCRAFT references ALTITUDE which references UNITS which has value
FLIGHT_LEVEL.
The below XSLT traverses the reference chain:
<xsl:template match="/*">
<xsl:message>
<xsl:value-of select="AIRCRAFT/id(@ref)/id(@ref)/text()"/>
</xsl:message>
</xsl:template>
which prints:
FLIGHT_LEVEL
Thank you, Peter.
/Roger
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Indirect referencing in X, Peter Flynn peter@xx | Thread | Re: [xsl] Indirect referencing in X, Dimitre Novatchev dn |
| Re: [xsl] Indirect referencing in X, Roger L Costello cos | Date | Re: [xsl] Indirect referencing in X, Liam R. E. Quin liam |
| Month |