This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Unwrapping trees
- From: Norman Walsh <ndw at nwalsh dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Thu, 13 Jun 2002 10:56:25 -0400
- Subject: [xsl] Unwrapping trees
- Reply-to: xsl-list at lists dot mulberrytech dot com
Has anyone written the XSLT required to "unwrap" nested links?
I'd like to turn, for example:
<p>
text
<a href="1">
text
<span>
<a href="2">test</a>
text
</span>
text
</a>
text
</p>
into
<p>
text
<a href="1">
text
<span/>
</a>
<span>
<a href="2">test</a>
text
</span>
<a href="1">
text
</a>
text
</p>
With extra bonus points for discarding the empty span (if it doesn't
have an ID :-)
Be seeing you,
norm
--
Norman.Walsh@Sun.COM | Wisdom is only a comparative quality, it will
XML Standards Engineer | not bear a single definition.--Marquess of
XML Technology Center | Halifax
Sun Microsystems, Inc. |
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list