Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
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 Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 30th, 2011, 04:26 AM
Authorized User
 
Join Date: Apr 2011
Posts: 22
Thanks: 4
Thanked 0 Times in 0 Posts
Default Modifying Input from another XSL before calling

Hi, Is it possible for me to modify the input file to a XSL?

To be elaborate, I have written XSLs file to convert a XML file to another. Now, the source doc has been changed cos of which I need to rewrite all my XSL. Instead, is it possible me to call another XSL, which modifies the input and carry on with the usual processing? All this can be done in one processor call?
 
Old April 30th, 2011, 08:39 AM
Friend of Wrox
 
Join Date: Nov 2007
Posts: 1,243
Thanks: 0
Thanked 245 Times in 244 Posts
Default

Saxon has http://www.saxonica.com/documentatio...t-in-chain.xml to chain transformations. So that might meet your requirement of "be done in one processor call".
Alternatives are to add code to your existing stylesheet but to use a mode for the new templates, then first apply them to store the result in a variable, then to apply the original templates to the contents of the variable. With XSLT 1.0 however that needs the use of an extension function like exsl:node-set($variable).
__________________
Martin Honnen
Microsoft MVP (XML, Data Platform Development) 2005/04 - 2013/03
My blog
 
Old April 30th, 2011, 06:23 PM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

Writing a pipeline of transformations is a good design approach, but in general my advice would be to chain together multiple simple transformations rather than trying to do everything in one call. There are many ways you can run a sequence of transformations written as separate stylesheets, the best way depends on the environment you are in.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
 
Old May 1st, 2011, 10:33 AM
Authorized User
 
Join Date: Apr 2011
Posts: 22
Thanks: 4
Thanked 0 Times in 0 Posts
Default

Is there any option to do this with Saxon - HE?





Similar Threads
Thread Thread Starter Forum Replies Last Post
xsl:key - only for input xml? bonekrusher XSLT 2 March 25th, 2010 03:38 PM
Calling Java function from XSL jilly J2EE 0 July 6th, 2007 12:52 AM
calling java function from xsl pandian XSLT 1 December 21st, 2005 12:59 PM
using xsl:value-of as a value of an input-text aldwinenriquez XSLT 3 June 23rd, 2005 03:02 AM
Calling a javascript while loading the xsl suresh_satyam Javascript How-To 0 January 22nd, 2005 03:01 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.