Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. XML / XSL
  4. XSL GetDate function ?

XSL GetDate function ?

Scheduled Pinned Locked Moved XML / XSL
xmlquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kitntodd
    wrote on last edited by
    #1

    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

    P 1 Reply Last reply
    0
    • K kitntodd

      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

      P Offline
      P Offline
      Phil Hobgen
      wrote on last edited by
      #2

      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 a XsltArgumentList class. Cheers Phil Hobgen barbari.co.uk Southampton, UK

      K 1 Reply Last reply
      0
      • P Phil Hobgen

        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 a XsltArgumentList class. Cheers Phil Hobgen barbari.co.uk Southampton, UK

        K Offline
        K Offline
        kitntodd
        wrote on last edited by
        #3

        Thanks 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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups