[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Wrapping an element in front of many other element

Subject: Re: Wrapping an element in front of many other elements
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Thu, 07 May 2009 19:29:45 +0200
Re:  Wrapping an element in front of many other element
Douglas Wade wrote:
I tried a couple of things (looked online and such), but ended up
getting more confused. I want insert <xxx> before the <afi> element.
There are many elements prior to the element closing. This sounds
simple, but newbie-ness is getting in the way.

before:
<afi><fault fcode="xx-xx-xxx"/><describe><fdesc>xxx</fdesc></describe></afi>

after:
<afi><xxx><fault
fcode="xx-xx-xxx"/><describe><fdesc>xxx</fdesc></describe><xxx></afi>

<xsl:template match="afi"> <xsl:copy> <xxx> <xsl:apply-templates/> </xxx> </xsl:copy> </xsl:template>

  <xsl:template match="@* | node()">
    <xsl:copy>
      <xsl:apply-templates select="@* | node()"/>
    </xsl:copy>
  </xsl:template>


--


	Martin Honnen
	http://msmvps.com/blogs/martin_honnen/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.