[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: apply templates on a variable
On Mon, 2003-06-30 at 15:28, Michael Kay wrote: > > Is is possible to apply templates to the contents of a > > variable? I know this is kind of going backwards, > > It is possible to apply-templates to a node-set held in a variable. But > what makes you think this is "going backwards"? It just means that the > template rules will take their input from the nodes in that variable. > The output of the templates will go to the result tree in the normal > way. > > Unfortunately you describe what you are trying to do in terms of code > which you seem unsure of. This makes it impossible for me to guess what > you are really trying to achieve. I am not unsure of the code - it is a test to see if I can get a proposed process to work in a larger system. I feel it is going backwards because normally the main xml (for lack of a better term) is the input xml - not a variable. Variable have often, at least in my vastly limited use of xslt, been used for lookup purposes. In my case the variable is the main file (document, node-set, etc). I see now that this is actually a much more powerful way to use xslt - but never had a need to try till now. > Unfortunately you describe what you are trying to do in terms of code > which you seem unsure of. This makes it impossible for me to guess what > you are really trying to achieve. What I am trying to achieve is the following: I am writing a web server that uses xslt as its scripting language (somewhat like cocoon, coldfusion, jsp, etc). In this system the url, form, and server variables are first made into xml so every xslt on the system will use that as it's base - it's main xml file if you will. However, each file needs to still have access to xml documents in their entirety and be able to use preexisting xslt. Not sure if that sheds any light - but I am using Saxon as the base so thanks. Cheers, Rob -- Rob Rohan <me@xxxxxxxxxxxx> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|