|
|
 |
| XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the XSLT section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

November 3rd, 2006, 12:49 PM
|
|
Registered User
|
|
Join Date: Oct 2006
Location: Bangalore, Karnataka, India.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Can 1 xslt transform an xml doc into 2 text files
I would like to know if it is possible to transform an xml document into 2 text file using only one xslt.
|

November 3rd, 2006, 01:04 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 2,922
Thanks: 0
Thanked 13 Times in 12 Posts
|
|
In XSLT 2.0 you can have as many output documents as you like. In version 1.0 you'll need to use scripting or an extension. What processor are you using?
--
Joe ( Microsoft MVP - XML)
|

November 3rd, 2006, 01:14 PM
|
|
Registered User
|
|
Join Date: Oct 2006
Location: Bangalore, Karnataka, India.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I am using MSXML v3.0 and the xslt ver 1.0
|

November 3rd, 2006, 01:23 PM
|
 |
Wrox Author
Points: 12,735, Level: 48 |
|
|
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 3,923
Thanks: 0
Thanked 82 Times in 80 Posts
|
|
In XSLT 2.0 there is an instruction xsl:result-document that allows you to produce multiple output files. Some XSLT 1.0 processors have similar capabilities as vendor extensions. If yours doesn't, you can always invoke the processor twice, with different parameters, once to produce each output file.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
|

November 3rd, 2006, 01:49 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 2,922
Thanks: 0
Thanked 13 Times in 12 Posts
|
|
Then do as Michael suggests, with two transforms, or look at the msxsl:script element in the SDK combined with the FileSystemObject: http://msdn.microsoft.com/library/de...asp?frame=true
I have seen some examples on Google of this so try searching for some of those terms.
--
Joe ( Microsoft MVP - XML)
|

November 3rd, 2006, 03:13 PM
|
|
Registered User
|
|
Join Date: Oct 2006
Location: Bangalore, Karnataka, India.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Mr Michael Kay,
"you can always invoke the processor twice, with different parameters, once to produce each output file."
can u give few lines of code on the above or refer me on the material for it.
thanks
Raju
|

November 3rd, 2006, 03:53 PM
|
 |
Wrox Author
Points: 12,735, Level: 48 |
|
|
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 3,923
Thanks: 0
Thanked 82 Times in 80 Posts
|
|
Which part don't you understand?
- How to invoke the processor?
- How to supply parameters?
- How to produce an output file?
They're all pretty basic, they're all well covered in documentation, and they all depend on which XSLT processor you are using.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
|

November 3rd, 2006, 04:10 PM
|
|
Registered User
|
|
Join Date: Oct 2006
Location: Bangalore, Karnataka, India.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
How to invoke the processor?
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |