XSL GetDate function ?
-
Is there a way to get the current system date using XSL? I don't merely want to format an existing date, I want to dynamically create a line of output that reads "created on: {current date}" without having to go into my XML file and enter the current date manually. Todd
-
Is there a way to get the current system date using XSL? I don't merely want to format an existing date, I want to dynamically create a line of output that reads "created on: {current date}" without having to go into my XML file and enter the current date manually. Todd
Hi, I think the only way to do this is to pass in the date and pick it up in your stylesheet as a global parameter using
xsl:param
. The way you pass parameters in to the stylesheet is processor specific, so for instance in .Net there is aXsltArgumentList
class. Cheers Phil Hobgen barbari.co.uk Southampton, UK -
Hi, I think the only way to do this is to pass in the date and pick it up in your stylesheet as a global parameter using
xsl:param
. The way you pass parameters in to the stylesheet is processor specific, so for instance in .Net there is aXsltArgumentList
class. Cheers Phil Hobgen barbari.co.uk Southampton, UKThanks Phil! You hit the nail right on the head. I was working on a stylesheet transformation for C#'s XML documentation feature as a way to teach myself XSL. Todd Piltingsrud kitntodd@charter.net Farmington, MN USA