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. Advertisements

  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. Advertisements

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. Peter Gerstbach

    [XSLT 1.1] xsl:document

    Peter Gerstbach, Aug 11, 2004, in forum: XML
    Replies:
    2
    Views:
    2,517
    Peter Gerstbach
    Aug 11, 2004
  2. Vijay singh
    Replies:
    1
    Views:
    611
    Martin Honnen
    Nov 4, 2004
  3. Replies:
    1
    Views:
    3,928
    A. Bolmarcich
    May 27, 2005
  4. Replies:
    4
    Views:
    976
  5. =?iso-8859-1?q?Jean-Fran=E7ois_Michaud?=

    Help with XSL/XSL:FO for producing revision indicator bar in document.

    =?iso-8859-1?q?Jean-Fran=E7ois_Michaud?=, Apr 28, 2006, in forum: XML
    Replies:
    6
    Views:
    781
    =?iso-8859-1?q?Jean-Fran=E7ois_Michaud?=
    May 3, 2006
  6. Replies:
    0
    Views:
    1,586
  7. Replies:
    1
    Views:
    2,668
    Pavel Lepin
    Mar 14, 2008
  8. Michael Tan
    Replies:
    32
    Views:
    1,585
    Ara.T.Howard
    Jul 21, 2005
Loading...