This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Inserting a parent node.
- From: Morten Primdahl <morten at it-c dot dk>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Sun, 19 May 2002 21:30:03 +0200
- Subject: [xsl] Inserting a parent node.
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi.
I need to insert a parent node on a node-set read by
URL.
<xsl:template match="ref">
<xsl:variable name="content" select="document(@url)"/>
<xsl:apply-templates select="$content"/>
</xsl:template>
The content variable may hold an element "f", in the template
for that, I need to match a parent - and not the implicit
document root.
<xsl:template match="f">
<xsl:if test="parent::stuff">
</xsl:if>
</xsl:template>
Can this be done by somehow creating the content variable in
another fashion?
Thanks,
Morten
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list