[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: xsl:script and Xalan ?
Hi Phillipe. It appears I completely misinterpreted your first post, and your problem is indeed quite complex. If you're absolutely determined to use Javascript, there is some documentation and examples available in the online docs in the Extensions section: http://xml.apache.org/xalan/extensions.html However, don't give up on pure XSLT, because almost anything is possible - you just have to change your way of doing things. A few notes: You can use named templates to perform certain simple functions. You can probably use a named template for your text filtering - the following one replaces all spaces with . <xsl:template name="Filter"> <xsl:param name="input_text" /> <xsl:value-of select="translate($input_text, ' ', ' ')" /> </xsl:template> Parameters created with <xsl:variable> are not actually variable - you can't change their value. However you can often rewrite your scripts to use a recursive template where the parameter is changed each time you call the template. eg: <xsl:template name="recursive"> <xsl:param name="var" /> <!-- do some stuff --> <xsl:call-template name="recursive"> <xsl:with-param name="var" select="$var + 1" /> </xsl:call-template> </xsl:template> You can almost always get away without having to generate start and close tags using plain text output - you just have to use some creativity in working out where the tags and templates belong in your XSL. This kind of thing is a no-no. document.write(ltchar + "/TR" + gtchar); == <xsl:text disable-output-escaping="yes"></TR></xsl:text> Hope this helps. -- Warren Hedley 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
|