Altova Mailing List Archives
Re: [xsl] Shorthand.
To:
Date: 7/26/2007 8:53:00 AM
Steve wrote: Oh believe me nobody is more aware of the limitations of XSL 1.0 than I am. However, I'm not going to move my web application from Classic ASP to .NET to use Saxon (much as I despise 1.0). If you despise it, why are you using it? In the code you showed, there is no reason to use XSLT as all you are doing is using it as a procedural language and you can better do that with ASP (which already is procedural, whereas xslt is declarative). Good time to upgrade, though: ASP (before .net) is age-old and not particularly suited for building web pages anymore, and definitely not RIAs (which you seem to build) and MS is planning (or already did?) to stop support for it. (but this matter may bring us far off-topic, for many it is all a matter of taste anyway). Yeah, my template works perfectly fine but I was just hoping for something more akin a 1.0 version of Angela's 2.0 solution, for pure style and type-ability reasons. If I could just magically go: <xsl:ajaxLink link='Click Me' href='process.asp' /> I'd be thrilled! That's good. Lookup a couple of templates from FXSL, it demonstrates many techniques, among one the sell-referencing method, where you use your own namespace for your own extensions, something along the lines of: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ajax="http://ajax" extension-element-prefixes="ajax" > <ajax:link link='Click Me' href='process.asp' /> <xsl:template match="/"> <xsl:copy-of select="document("")/*/ajax:link" /> </xsl:template> </xsl:stylesheet> will output your ajax link. But if all you care about is having an LRE, you don't need this complexity, nor a call-template, nor apply-templates. Just write it as an LRE, period (but here we are, back to the original question I asked you: we need to understand your situation better to really help you). I can't really use apply-templates (a la Grand Mr. Welch) because I'm not transforming links with XSL, I'm generating them. Still hoping for a context explanation from you, I haven't seen any reason in your code why you need xsl:call-templates. "Generating them" says as much to me as it would when you explain what exactly you are doing with ASP and you tell me "generating web pages". I am under the impression that you are taking the wrong approach and I would like to help you with it, but you're not making it easy. Whether you use apply-templates or call-template, has nothing to do with 'transforming links' either, I wouldn't have a clue of what that could mean (xslt for one cannot transform links, it can only transform an input tree of nodes). Cheers, -- Abel Braaksma
Disclaimer
These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

