xml editor

Supported platforms

Compatible with Windows7 & Mac OS X Snow Leopard

Ready for data server software
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Filtering new tags using XSL


Subject: Re: [xsl] Filtering new tags using XSL
From: Buddhi Dananjaya <buddhi@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 14 Sep 2007 17:04:26 +0530

Hi ,

Thankx for the reply.

I have to transform this with new.xml...??

- Buddhi -

Mukul Gandhi wrote:
Here is a simple stylesheet, which will let you identify the differences.

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:variable name="old-doc" select="document('old.xml')" />

  <xsl:template match="/root">
    <newtags>
      <xsl:for-each select="data">
        <xsl:variable name="temp" select="." />
        <xsl:if test="not($old-doc/root/data[@name = $temp/@name])">
          <xsl:copy-of select="$temp" />
        </xsl:if>
      </xsl:for-each>
    </newtags>
  </xsl:template>

</xsl:stylesheet>

(not tested..)

On 9/14/07, Buddhi Dananjaya <buddhi@xxxxxxxxxxxxxxxxxxx> wrote:
Hi,

Even XSLT is ok. I can transform and get the newly added tags.

- Buddhi -


Current Thread
Keywords
XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2011 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>®XML Editor