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

Re: output modified branch - best practice

Subject: Re: output modified branch - best practice
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Mon, 21 Jun 2010 12:25:49 -0400
Re:  output modified branch - best practice
Hey look,

Martin just did what I suggested in that other thread, to manage a merge ... which turns out to be an interesting kind of value mapping....

At 11:29 AM 6/20/2010, he wrote:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  <xsl:output method="xml" encoding="UTF-8" indent="yes"/>
  <xsl:strip-space elements="*"/>

<xsl:key name="k1" match="/root/update/data/*" use="node-name(.)"/>

  <xsl:template match="/">
    <xsl:apply-templates select="root/base/data"/>

  <xsl:template match="/root/base/data">

  <xsl:template match="/root/base/data/*">
    <xsl:variable name="var.update" select="key('k1', node-name(.))"/>
      <xsl:when test="exists($var.update)">
        <xsl:copy-of select="$var.update"/>
        <xsl:copy-of select="."/>


Cheers, Wendell

Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
  Mulberry Technologies: A Consultancy Specializing in SGML and XML

Current Thread


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.
First Name
Last Name
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.