how to split file with xslt 2.0 <xsl:result-document>

Discussion in 'XML' started by sqad, Oct 12, 2007.

  1. sqad

    sqad Guest

    Hi Guys,

    I am following along this example here:
    http://www.ibm.com/developerworks/xml/library/x-tipmultxsl.html

    It works, but instead of outputting only the value of the attribute:
    <xsl:value-of select="@run"/>

    within each of the generated documents, I want each of the files to
    have the actual xml content like so:

    test1.html
    <testrun run="test1">
    <test name="foo" pass="true" />
    <test name="bar" pass="true" />
    <test name="baz" pass="true" />
    </testrun>

    test2.html
    <testrun run="test2">
    <test name="foo" pass="true" />
    <test name="bar" pass="false" />
    <test name="baz" pass="false" />
    </testrun>

    Is this possible? This is because I am splitting a very large xml
    document into individual xml documents.

    Hope someone can help.

    Thank you.

    /sqad
     
    sqad, Oct 12, 2007
    #1
    1. Advertising

  2. sqad

    sqad Guest

    On Oct 12, 8:19 am, sqad <> wrote:
    > Hi Guys,
    >
    > I am following along this example here:http://www.ibm.com/developerworks/xml/library/x-tipmultxsl.html
    >
    > It works, but instead of outputting only the value of the attribute:
    > <xsl:value-of select="@run"/>
    >
    > within each of the generated documents, I want each of the files to
    > have the actual xml content like so:
    >
    > test1.html
    > <testrun run="test1">
    > <test name="foo" pass="true" />
    > <test name="bar" pass="true" />
    > <test name="baz" pass="true" />
    > </testrun>
    >
    > test2.html
    > <testrun run="test2">
    > <test name="foo" pass="true" />
    > <test name="bar" pass="false" />
    > <test name="baz" pass="false" />
    > </testrun>
    >
    > Is this possible? This is because I am splitting a very large xml
    > document into individual xml documents.
    >
    > Hope someone can help.
    >
    > Thank you.
    >
    > /sqad


    Nevermind,

    <xsl:copy-of select="."/>

    does the trick.

    /sqad
     
    sqad, Oct 12, 2007
    #2
    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. Replies:
    1
    Views:
    3,688
    A. Bolmarcich
    May 27, 2005
  2. Replies:
    4
    Views:
    713
  3. Replies:
    0
    Views:
    1,382
  4. Replies:
    1
    Views:
    2,305
    Pavel Lepin
    Mar 14, 2008
  5. Michael Tan
    Replies:
    32
    Views:
    1,074
    Ara.T.Howard
    Jul 21, 2005
Loading...

Share This Page