[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Recursively link XML blocks
Hi,
would this suffice? XML: <document> <element_A> textA textA textA <insert>element_B</insert> textA textA textA </element_A> <element_B> textB textB textB <insert>element_C</insert> textB textB textB </element_B> <element_C> textC textC textC textC textC textC </element_C> </document> XSLT: <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="document"> <xsl:apply-templates select="*[1]"/> </xsl:template> <xsl:template match="insert"> <xsl:variable name="element" select="."/> <xsl:apply-templates select="/document/*[name()=$element]"/> </xsl:template> </xsl:stylesheet>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|