xsl-list
[Top] [All Lists]

RE: dynamic variable name/implementation question

2005-08-25 13:56:13
Hi, Mike,

Not that I know of . Perhaps some processor somewhere has an extension 
function for that kind of thing, or you could write your own, of course. 
Personally, I'd just use a script of some sort.

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




"Mike Schinkel" <mikes(_at_)xtras(_dot_)com> 
08/25/2005 03:31 PM
Please respond to
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com


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

Subject
RE: [xsl] dynamic variable name/implementation question






It is possible to do that without having to manually trigger the process
of both, or to have to write a program in another language to do that?

IOW, can an XSLT processor generate and XSLT file and then launch
another transform recursively?

-Mike 

-----Original Message-----
From: JBryant(_at_)s-s-t(_dot_)com [mailto:JBryant(_at_)s-s-t(_dot_)com] 
Sent: Thursday, August 25, 2005 2:35 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] dynamic variable name/implementation question

Hi, Ed,

One way to do that is to write a stylesheet that writes a stylesheet.
The first stylesheet reads the XML file and determines the names of the
parameters. Then it writes a second stylesheet that has the necessary
parameter declarations. Then you run the second stylesheet to get your
output.

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






Ed S <lists(_at_)highpeakssoftware(_dot_)com>
08/25/2005 01:17 PM
Please respond to
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com


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

Subject
[xsl] dynamic variable name/implementation question






Hi-
I'm trying to find a workaround or alternate implementation for a
particular problem I'm tring to solve.  I have various parameters that
are passed into the processor, and I would like to use their values in
the stylesheet.  However, I've found that XSLT 1.0 does not support
dynamic variables.
I would like to do the following:

XML:
...
<text-block>
   this is some text. Folowing is dynamic- <external-value
parameter="someParam"/> -preceding was dynamic
</text-block>
...

XSL:
...
<xsl:template match="external-vaue">
    <xsl:value-of select="$(_at_)parameter"/> <!-- this won't work -->
</xsl:template>
...

where there is a parameter "someParam" passed into the stylesheet - say
someParam="foo".  My output would be:
...
 this is some text. Folowing is dynamic- foo -preceding was dynamic
...

Has anybody else ever needed this fuctionality?



--~------------------------------------------------------------------
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>
--~--


--~------------------------------------------------------------------
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>
--~--