Altova Mailing List Archives


Re: [xsl] Filtering new tags

From: "Mukul Gandhi" <gandhi.mukul@--------->
To:
Date: 1/25/2008 7:31:00 PM
I am getting similar result with MSXML 4.0 as well.

Following is the example I tried:

old.xml
----------
<root>
  <data name="XY">
    <value>XY Editor</value>
    <comment>XY</comment>
  </data>
</root>

new.xml
------------
<root>
  <data name="DE">
     <value>Drawing Editor</value>
     <comment>DE</comment>
  </data>
  <data name="XY">
     <value>XY Editor</value>
     <comment>XY</comment>
  </data>
  <data name="PQ">
     <value>PQ Editor</value>
     <comment>PQ</comment>
   </data>
 </root>

The stylesheet is what you posted. Except, I added this line:
<xsl:output method="xml" encoding="UTF-8" /> (just to improve
serialization on the command prompt).

msxsl invocation produces following output:

C:\xml>msxsl new.xml test.xsl
<?xml version="1.0" encoding="UTF-8"?>
<newtags>
  <data name="DE">
    <value>Drawing Editor</value>
    <comment>DE</comment>
  </data>
  <data name="PQ">
    <value>PQ Editor</value>
    <comment>PQ</comment>
 </data></newtags>

Same output is produced with Xalan-J 2.7.1.

Is this what you are looking for? Or, we haven't understood your requirement ...

On 1/25/08, buddhi <buddhi@xxxxxxxxxxxxxxxxxxx> wrote:
> hi Gandi and all,
>
> yes you are absolutely correct but I am not getting only newly added
> text, I am getting old tags + newly added tags. I am using MS XSLT
>
> - Buddhi -


-- 
Regards,
Mukul Gandhi

Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.