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

S

sqad

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
 
S

sqad

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top