xsl-list
[Top] [All Lists]

[xsl] Refencing a parent node attribute from a unknow deep

2006-09-10 08:41:22
Hi,
How can I get the form attribute @name in a field transformation when
a template is applyed recursively?

Ruben

-- xml

<form name="form_name">
  .
  . unknow level of tags
  .
  <field name="field_name"/>
  .
  . unknow level of tags
  .
</form>


--- xslt

<xsl:template match="form">
  <xsl:apply-templates/>
</xsl:template>

<xsl:template match="field">
  <xsl:value-of select="???form_name???">
</xsl:template>

--
Quando um homem não acredita em Deus,
não é que não acredite mais em nada -
é que ele acredita em qualquer coisa.
(G. K. Chesterton)

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>