[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: current-dateTime()

Subject: Re: current-dateTime()
From: Michael Ludwig <mlu@xxxxxxxxxxxxx>
Date: Fri, 18 Apr 2008 16:46:32 +0200
Re:  current-dateTime()
Robert Koberg schrieb:
You could make a call with the document function (in a non-functional
way :) ) to a back end that uses a custom uri resolver that, when
receives a certain href, logs/writes the /real/ current-dateTime and
returns <nothing/>.

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.

mludwig@forelle:~/Werkstatt/xsl > expand -t2 ~/www/xml.php
$fnam = 'xml.php.dat';
if (file_exists($fnam)) {
  $i = file_get_contents($fnam);
  file_put_contents($fnam, $i + 1);
else {
  $i = 0;
  file_put_contents($fnam, $i);
echo "<Int>$i</Int>\n";

mludwig@forelle:~/Werkstatt/xsl > expand -t2 document-function-en.xsl
<?xml version="1.0" encoding="UTF-8"?>
<xsl:transform version="1.0"
<xsl:output indent="yes"/>
<xsl:variable name="url" select="'http://localhost/mlu/xml.php'"/>
<xsl:template match="/">
<xsl:value-of select="system-property('xsl:vendor')"/>
<Frage> Is the result of the call to document() cached? </Frage>
<xsl:copy-of select="document($url)"/>
<xsl:copy-of select="document($url)"/>
<xsl:copy-of select="document($url)"/>
<Antwort> Yes, it is. LibXSLT, Xalan and Saxon cache the result.</Antwort>

mludwig@forelle:~/Werkstatt/xsl > xsltproc document-function-en.xsl urmel.xml
<?xml version="1.0"?>
<Frage> Is the result of the call to document() cached? </Frage>
<Antwort> Yes, it is. LibXSLT, Xalan and Saxon cache the result.</Antwort>


Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.