how to generate xml file with only some elements of another xml file using xsl file.
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   srinivas_rallapalli
Posted On:   Sunday, May 25, 2003 09:12 PM

Re: how to generate xml file with only some elements of another xml file using xsl file.

Posted By:   Roseanne_Zhang  
Posted On:   Monday, May 26, 2003 08:53 AM

Jan Matèrne wrote: "I played a little bit. Maybe it will help you (maybe Roseanne has a better solution :-)"



Thanks Jan, I want to give a summary. It just depends how many you want to copy over.


  1. If you only want to copy a few, then disable all default templates and only write the copy templates for those you want to copy.

  2. If you want to copy all but exclude a few, then use identity template, and only disable a few templates for those you want not to copy.

  3. How to disable some templates? Simple:



  4. How to write identity template?







  5. What is copy templates?





    Attention, this will copy it and its decendents.

Re: how to generate xml file with only some elements of another xml file using xsl file.

Posted By:   Anonymous  
Posted On:   Monday, May 26, 2003 04:45 AM

I played a little bit. Maybe it will help you (maybe Roseanne has a better solution :-):

data.xml with testdata

one
two
three
four
five

six



filter.xsl which does the job


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










match="one"
>





















































Test output


one

four three




About | Sitemap | Contact