[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Break output into files based on values

Subject: Break output into files based on values
From: "Thangavelu Srinivasan" <vasantry@xxxxxxxxx>
Date: Wed, 27 Sep 2006 11:04:13 +0530
 Break output into files based on values
Hi All,
I need help in resolving the problem for the below. I am using XSLT 1.0.
Any suggestions are welcome.

My XML:
<root>
<DataComponent id="one">
      <DatasComponent>
        <p>This is a sample text</p>
      </DatasComponent>
</DataComponent>
<DataComponent id="two">
      <DatasComponent>
        <p>This is a sample text</p>
      </DatasComponent>
</DataComponent>
<DataComponent id="three">
      <DatasComponent>
        <p>This is a sample text</p>
      </DatasComponent>
</DataComponent>
</root>

Result I am Expecting:

Based on the id, it has save in the folder as a individual xml file
with their content.

Filename: one.xml

<DataComponent id="one">
      <DatasComponent>
        <p>This is a sample text</p>
      </DatasComponent>
</DataComponent>

Filename: two.xml
<DataComponent id="two">
      <DatasComponent>
        <p>This is a sample text</p>
      </DatasComponent>
</DataComponent>

My XSL:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="doc" />
<xsl:template match="DataComponent">
<xsl:apply-templates>
</xsl:template>
</xsl:stylesheet>



Thanks,
Srinivas

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Cast Your Vote

We need your help – Vote for DataDirect XML Products!

  • Best SOA or XML site

Winners and finalists announced at SOA World Conference in November.

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.