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

Re: Creating multiple xmls using xslt1.0

Subject: Re: Creating multiple xmls using xslt1.0
From: Vasu Chakkera <vasucv@xxxxxxxxx>
Date: Sun, 27 May 2012 22:40:25 +0100
Re:  Creating multiple xmls using xslt1.0
> In XSLT 1.0, each transformation can only produce one result document. So
> you will have to organize some kind of script that invokes the same
> transformation repeatedly, supplying parameters to indicate which range of
> rows you want to select on each run.

Mike,
I remember, in those good old days, you had a saxon extention
equivalent to the current day's  xsl:result-document ...
something like :
 <saxon:output href="{$file}">
  </saxon:output>

Also, With the XSLT1, you can do the following :

1. Write a java function that will use FileIO classes to serialize.
2. Use that as an extention function in your XSLT . To know how to do this..
Read this article
http://www.javaworld.com/javaworld/jw-12-2001/jw-1221-xslt.html?page=2
on how to plugin java code into XSLT.
You will be warned by many here that the approach of  using java
-extentions may not be all that great ( not portable )

But the choice of using xslt1, is also not great and reflects the fact
that unfortunately you are restricted to XSLT1

So those were the options anyway..
Vasu


On 17 May 2012 12:50, Michael Kay <mike@xxxxxxxxxxxx> wrote:
> In XSLT 1.0, each transformation can only produce one result document. So
> you will have to organize some kind of script that invokes the same
> transformation repeatedly, supplying parameters to indicate which range of
> rows you want to select on each run.
>
> Michael Kay
> Saxonica
>
>
> On 17/05/2012 12:21, Siddhi Thakkar wrote:
>>
>> Hi experts,
>>
>> I have an xml file like this:
>>
>> <Data>
>>        <Row>
>>                <Cell1>text 1</Cell1>
>>        <Cell2>text 2</Cell2>
>>        </Row>
>>        <Row>
>>                <Cell1>text 3</Cell1>
>>        <Cell2>text 4</Cell2>
>>        </Row>
>>       <Row>.....<Row>
>>      <Row>.....<Row>
>> .....
>> </Data>
>>
>>
>>
>> And I have thousands of<Row>  elements like this. For the first 50 rows, I
>> should be able to create an output xml with name Data1.xml, for next 50
rows
>> output xml should be data2.xml, for next 50 rows output should be
data3.xml
>> and so on until all the rows are complete. And I have to achieve this with
>> XSLT 1.0. Can anybody please help?
>>
>> Thanks,
>> Siddhi
>



--
Vasu Chakkera
NodeLogic Limited
Oxford
www.node-logic.com
==============

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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

Buy Stylus Studio Now

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-2013 All Rights Reserved.