xsl-list
[Top] [All Lists]

Re: Dynamic import / include?

2005-07-26 08:57:45
Hi, Dan,

Not directly. However, I can think of at least one roundabout way.

You can have a first stylesheet read the name of that value and write a 
second stylesheet that specifies the necessary file to include/import. 
Then the second stylesheet does the transformations you need.

While I was thinking about the first answer, another came to me: You could 
use a very simple stylesheet to write a command that passes the name of 
the file to your main stylesheet as a parameter. Then run the command 
(which you could store in a file).

Either way, you end up with a kind of daisy chain effect to get it to 
work.

Jay Bryant
Bryant Communication Services
(presently consulting at Synergistic Solution Technologies)




"Dan Powderhill" <dan(_dot_)powderhill(_at_)brainjuicer(_dot_)com> 
07/26/2005 10:32 AM
Please respond to
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com


To
<xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
cc

Subject
Spam:[xsl] Dynamic import / include?






Is it possible using XSLT 1 to dynamically import / include another
stylesheet based on the value of a node in the XML?

I have a node (which only appears once per XML doc) within my XML which
contains the filename name of a stylesheet to include - I'd like the XSL
to include or import this using xsl:import or xsl:include.

Is there an easy way of doing this at all?

Dan

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>