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

Re: Pass key from one XSL to another

Subject: Re: Pass key from one XSL to another
From: Xiaocun Xu <xiaocunxu@xxxxxxxxx>
Date: Wed, 8 May 2002 17:25:34 -0700 (PDT)
pass key
Man, thanks for the wake up call, I really needed it,
must've been sleepwalking through that.  I was so
concentrated on trying to pass the parameter so that
the template can use only one parameter for all the
different keys I will be passing in, I forgot the fact
that key is a global itself.

So, instead of passing the key, I will find out the
parent element of the current node and use xsl:when to
determine the correct key to use.

Much thanks,

--- Joerg Heinicke <joerg.heinicke@xxxxxx> wrote:
> Hello Xiaocun,
> I don't know if I understand you correctly, but my
> answer is: There is 
> no problem. A key can't be passed from XSL to
> another, it's only a 
> global variable, which provides easy access to the
> stored nodes.
> If your key is declared in Organization.xsl and this
> file includes 
> _base.xsl, the key() can be used there too. Why
> don't you easily try it? 
> Or do you have another problem? Maybe snippets from
> the stylesheets will 
> make it more clear.
> Regards,
> Joerg
> Xiaocun Xu schrieb:
> > Hi,
> > 
> >   I recently had a need to pass key from one XSL
> to
> > another.  The way my XSLs are organized is that
> all
> > common templates are kept in _base.xsl, while XSL
> such
> > as Organization.xsl import the _base.xsl.
> >   The functionality I need to implement now is to
> > apply transformation from Excel date to all
> Extended
> > Attributes (XA) that has data type of "date".
> >   Within Organization.xsl, I keep XAs of date type
> in
> > a key, and would like to pass this key to the
> template
> > that processes XAs which is located in _base.xsl
> so
> > that I can use key() to find if a XA is of date
> type
> > or not.
> >   Can this be done?  If not, I suppose my fallback
> is
> > to set all XAs of date type as a node-set in a
> > variable, which pass onto XA template, then use
> > xsl:for-each within the template.
> >   Any comments and suggestions welcomed.
> > 
> > Much appreciated,
> > Xiaocun
>  XSL-List info and archive: 
> http://www.mulberrytech.com/xsl/xsl-list

Do You Yahoo!?
Yahoo! Shopping - Mother's Day is May 12th!

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread


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.
First Name
Last Name
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.