[Home] [By Thread] [By Date] [Recent Entries]
Abel Braaksma schrieb:
Michael Ludwig wrote:That would probably not work. I tested this the other day, just out of curiosity, calling a script that incremented a number, and found that the result was cached when using LibXSLT, Saxon and Xalan.
<xsl:transform version="1.0"
xmlns:exsl="http://exslt.org/common"
extension-element-prefixes="exsl"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:variable name="url" select="'http://localhost/mlu/xml.php'"/>
<xsl:template match="/">
<xsl:text>Prozessor: </xsl:text>
<xsl:value-of select="system-property('xsl:vendor')"/>
<xsl:text> </xsl:text>
<!-- Is the result of the call to document() cached? -->
<xsl:for-each select="( document('')//node() )[ position() < 4 ]">
<xsl:variable name="new-node"><xsl:comment/></xsl:variable>
<xsl:variable name="new-url"
select="concat($url, '?', generate-id(exsl:node-set($new-node)))"/>
<xsl:value-of
select="concat($new-url, ' ', document($new-url), ' ')"/>
</xsl:for-each>
</xsl:template>
</xsl:transform>Prozessor: SAXON 6.5.5 from Michael Kay http://localhost/mlu/xml.php?d2 91 http://localhost/mlu/xml.php?d4 92 http://localhost/mlu/xml.php?d6 93 Prozessor: SAXON 9.0.0.4 from Saxonica http://localhost/mlu/xml.php?d3 94 http://localhost/mlu/xml.php?d5 95 http://localhost/mlu/xml.php?d7 96 Prozessor: libxslt [1.1.22] http://localhost/mlu/xml.php?id2242687 97 http://localhost/mlu/xml.php?id2242687 97 http://localhost/mlu/xml.php?id2242687 97 Prozessor: Apache Software Foundation [Xalan-C 1.10.0] http://localhost/mlu/xml.php?N0x8081df0N0x8076d80 98 http://localhost/mlu/xml.php?N0x8081df0N0x8076d80 98 http://localhost/mlu/xml.php?N0x8081df0N0x8076d80 98 Prozessor: Apache Software Foundation [Xalan-J 2.7.1] http://localhost/mlu/xml.php?N30000 99 http://localhost/mlu/xml.php?N30002 100 http://localhost/mlu/xml.php?N30004 101 Michael
|

Cart



