XSL Multiple copies of the original file with minor changes

Discussion in 'XML' started by EastvanAxon, Mar 14, 2012.

  1. EastvanAxon

    EastvanAxon

    Joined:
    Mar 14, 2012
    Messages:
    1
    Hi everybody,

    I'm new to XSL and I need some help. My goal is to generate multiple .xml files which differs only by the content of one tag. Here an example:

    The original .xml file has the form:

    <root>
    <a>
    [...]
    </a>
    <b>
    [...]
    </b>
    <c>
    [...]
    </c>
    <d>
    <t1>
    </t1>
    <t2>
    </t2>
    <t3>
    </t3>
    </d>
    </root>

    and I would like to generate 3 different files:

    <root>
    <a>
    [...]
    </a>
    <b>
    [...]
    </b>
    <c>
    [...]
    </c>
    <d>
    <NEW>
    </NEW>
    <t2>
    </t2>
    <t3>
    </t3>
    </d>
    </root>

    <root>
    <a>
    [...]
    </a>
    <b>
    [...]
    </b>
    <c>
    [...]
    </c>
    <d>
    <t1>
    </t1>
    <NEW>
    </NEW>
    <t3>
    </t3>
    </d>
    </root>

    <root>
    <a>
    [...]
    </a>
    <b>
    [...]
    </b>
    <c>
    [...]
    </c>
    <d>
    <t1>
    </t1>
    <t2>
    </t2>
    <NEW>
    </NEW>
    </d>
    </root>


    have you got any ideas (I'm using xsl 2.0)?

    Best,
    Axon
    EastvanAxon, Mar 14, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Richard

    minor changes to division demo

    Richard, Nov 3, 2003, in forum: HTML
    Replies:
    22
    Views:
    806
    Hywel Jenkins
    Nov 4, 2003
  2. Ilpo =?iso-8859-1?Q?Nyyss=F6nen?=

    XSL: Parametrized copies of a common block

    Ilpo =?iso-8859-1?Q?Nyyss=F6nen?=, May 24, 2004, in forum: XML
    Replies:
    1
    Views:
    352
    Ilpo =?iso-8859-1?Q?Nyyss=F6nen?=
    May 24, 2004
  3. schaf@2wire.ch
    Replies:
    1
    Views:
    3,583
    A. Bolmarcich
    May 27, 2005
  4. Doug Glidden
    Replies:
    4
    Views:
    114
    David A. Black
    Sep 8, 2008
  5. Jen
    Replies:
    3
    Views:
    160
    Shadowfirebird
    Mar 4, 2011
Loading...

Share This Page