Usage of current-dateTime () function in an XSLT doc transfo
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 1
- Joined: Wed Jul 30, 2014 4:39 pm
Usage of current-dateTime () function in an XSLT doc transfo
Post by JamesWebster »
All,
I apologize for this obviously silly question but here goes...How does one call and display the current date and time in an XSLT transformation document? It is not existing in the XML document and I cannot find any XSLT samples where it is used online anywhere. Any namespace requirement(s) and samples would be wonderful.
Thank you in Advance!
James
I apologize for this obviously silly question but here goes...How does one call and display the current date and time in an XSLT transformation document? It is not existing in the XML document and I cannot find any XSLT samples where it is used online anywhere. Any namespace requirement(s) and samples would be wonderful.
Thank you in Advance!
James
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Usage of current-dateTime () function in an XSLT doc tra
Hi,
You can simply evaluate it with xsl:value-of.
Note that this is an XPath 2.0 function, so it only works in XSLT 2.0 and later.
Regards,
Adrian
You can simply evaluate it with xsl:value-of.
Code: Select all
<xsl:value-of select="current-dateTime()"/>
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Return to “General XML Questions”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service