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

Re: top level params and xsl:attribute magic?

Subject: Re: top level params and xsl:attribute magic?
From: S Woodside <sbwoodside@xxxxxxxxx>
Date: Tue, 21 Jan 2003 23:32:56 -0500
Re:  top level params and xsl:attribute magic?

On Sunday, January 19, 2003, at 02:13 AM, Dimitre Novatchev wrote:


"S Woodside" <sbwoodside@xxxxxxxxx> wrote in message
news:5946E590-2B28-11D7-8385-000393414368@xxxxxxxxxxxx
On Saturday, January 18, 2003, at 02:08 AM, Dimitre Novatchev wrote:

First, I would stroongly recommend *not* to use any xx:evaluate
function.

I have to, the param arrives as a string, not a node set, and XSLT has
no built-in way to convert the first to the second. Per the thread a
few days ago.

simon


Please, read well. Obviously, you didn't understand my message.

I don't think I did.


What I think is the best solution of your problem is to set the value
of the "select" attribute of a global xsl:param to the *string* XPath
expression. You can do this using the selectSingleNode() and then
setAttribute() methods. Then perform the transformation.

I can't do that, I'm not using MSXML.....! I'm using LibXSLT with AxKit on Mac OS X.


Where did I say you had to pass a node-set? Just set the "select"
attribute to the *string* that is the specific XPath expression.

I would love to, but as I said, in a previous thread (the one where you provided me the code to generate the xpath - thanks) I was told that I cannot just select on a string like that (and of course it's the first thing I tried!)


http://www.biglist.com/lists/xsl-list/archives/200301/msg00665.html

This is the general approach where one uses a *skeleton* stylesheet and
"fills-in-the-blanks" just before the stylesheet has to be applied.

Hmm... I'm not sure if that's what I'm doing. I have an RNG grammar that is fully expanded so there are no refs and defines. My XSLT applies templates to the RNG file until it hits a <zeroOrMore> node. At that point it spits out the XPath to that node, as the value of an HTML forms button. The button posts the XPath back to the same XSLT. At that point, I want to start at the node, given by the xpath, and apply my templates again to the descendants of the Xpath.


This is why in most cases there is no real need for a xx:evaluate()
function.

simon

---
www.simonwoodside.com


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



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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