This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: date and time


> is there a way to obtain recent system time and system date to
> put it in the result tree?

You could use a time resolver and XVRL (eXtensible Value Resolution
Language).

After running an XVRL processor, this excerpt

<hour>
  <xvrl:value>
    <xvrl:resolver-name>timeResolver</xvrl:resolver-name>
    <xvrl:method>getHour</xvrl:method>
  </xvrl:value>
</hour>
<minute>
  <xvrl:value>
    <xvrl:resolver-name>timeResolver</xvrl:resolver-name>
    <xvrl:method>getMinute</xvrl:method>
  </xvrl:value>
</minute>

would be converted to

<hour>10</hour>
<minute>35</minute>

The nice thing about XVRL is that you can extend it to resolve other kinds
of values.  http://www.xvrl.org offers two Java-based XVRL parsers, JAVR and
JResolver.  They include built-in resolvers for dynamically inserting the
current time, extracting data from relational databases, and "scraping" data
from web pages.  They both require a JAXP-compliant XML parser (such as
Xerces/Xalan).

---

Roger L. Cauvin
roger@cauvin.org



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]