Two questions, one specific about XSLT and one general about Xalan.
First, I have an engine that runs like so:
<xsl:for-each select="$journal_entry"> <xsl:sort select="@jid" data-type="number" order="descending"/> <xsl:if test="position()<=2"> ... </xsl:if> </xsl:for-each>
I would like to optimise it in a way similar to:
<xsl:for-each select="$journal_entry[position()<=2]"> <xsl:sort select="@jid" data-type="number" order="descending"/> ... </xsl:for-each>
But as I mostly expected, this gave incorrect results. The spec never touches on doing such a thing. Is there any feasible way of doing this? One option I've thought of would be to include the sort parameters in with the position portion, but this seems unweildy and error-prone, duplicating parameters each time. More importantly, though, does it matter at all, or is the internal optimization more than capable of handling such cases without adding extra load?
Next, I'd like to integrate Xalan into my website, running Apache. I'm not much of a Java programmer now, never having put much into it, though I doubt it would take much to learn. Instead my thought was to use PHP to call Xalan (or XSLTC, though it doesn't have a lot of the EXSLT that Xalan does) whenever a page is requested. In order to reduce unbearable load-times, my thought was to somehow keep the java runtime and xalan loaded in memory, ready to fire off another thread as soon as they're called. Or some sort of plugin, so the PHP just calls a waiting plugin. The site is very low-traffic, so I'm not really worried about overloading my weak processor yet, except that initial load and shutdown overhead.
Feel free to tell me I'm being an quixotic Taskmaster. :) I'll probably just have to figure out what all this servlet business is about. Any advice would be grand!
Swiftpaw Foxyshadis, wildlife artist [EMAIL PROTECTED] | http://foxyshadis.dyndns.org/
_________________________________________________________________
