XSL page update URL changer?

Discussion in 'XML' started by RigasMinho, Mar 27, 2007.

  1. RigasMinho

    RigasMinho Guest

    Hello,
    I have an issue where i have a link in a web page using XSL - for
    example says its
    <a href="http://www.test.com/&testme=03/27/2007"
    target="_blank">Test</
    a>

    notice the date is engrained into the url -


    now say i have the web page load up tomorrow i want the web page url
    to be
    <a href="http://www.test.com/&testme=03/28/2007"
    target="_blank">Test</
    a>


    and change the url in the xsl format / html format to change
    dynamically as the web page loads up.


    Is this even possible in XSL?
    RigasMinho, Mar 27, 2007
    #1
    1. Advertising

  2. RigasMinho wrote:
    > and change the url in the xsl format / html format to change
    > dynamically as the web page loads up.


    There's nothing built into XSLT 1.0 which will return today's date.
    You'd need to use the EXSLT date function, *IF* your processor supports
    that set of "standardized nonstandard extensions". Or pass the date in
    from outside as a stylesheet parameter.

    (Date functions have been added to XSLT 2.0, but I presume you don't
    want to rely on a 2.0 processor being available.)

    Personal question: The server should know today's date. Why are you
    trying to pass the date to the server?
    Joseph Kesselman, Mar 27, 2007
    #2
    1. Advertising

  3. RigasMinho

    RigasMinho Guest

    On Mar 27, 4:01 pm, Joseph Kesselman <>
    wrote:
    > RigasMinho wrote:
    > > and change the url in the xsl format / html format to change
    > > dynamically as the web page loads up.

    >
    > There's nothing built into XSLT 1.0 which will return today's date.
    > You'd need to use the EXSLT date function, *IF* your processor supports
    > that set of "standardized nonstandard extensions". Or pass the date in
    > from outside as a stylesheet parameter.
    >
    > (Date functions have been added to XSLT 2.0, but I presume you don't
    > want to rely on a 2.0 processor being available.)
    >
    > Personal question: The server should know today's date. Why are you
    > trying to pass the date to the server?


    Cause the company i work for is asking for something ridiculously
    stupid
    They want it to make it easier on the user to just click on a link
    where the date is engraiined automatically into the link

    So basically if i want to do anything i would rely on XSLT 2.0 -
    interesting

    I mean all they want technically is the user to click on a link that
    is changed as the web page loads up. I've never even heard about this
    on any web page before -
    RigasMinho, Mar 28, 2007
    #3
  4. RigasMinho wrote:
    > I mean all they want technically is the user to click on a link that
    > is changed as the web page loads up. I've never even heard about this
    > on any web page before -


    Make the change in the server before you send the page out. Or have the
    server consult its own time and date information when it gets the
    response back. XSLT is good for many things, but this is not one where
    it's the best answer.

    --
    Joe Kesselman / Beware the fury of a patient man. -- John Dryden
    Joseph Kesselman, Mar 28, 2007
    #4
  5. RigasMinho

    Simon Brooke Guest

    in message <>,
    RigasMinho ('') wrote:

    > On Mar 27, 4:01 pm, Joseph Kesselman <>
    > wrote:
    >> RigasMinho wrote:
    >> > and change the url in the xsl format / html format to change
    >> > dynamically as the web page loads up.

    >>
    >> There's nothing built into XSLT 1.0 which will return today's date.
    >> You'd need to use the EXSLT date function, *IF* your processor supports
    >> that set of "standardized nonstandard extensions". Or pass the date in
    >> from outside as a stylesheet parameter.
    >>
    >> (Date functions have been added to XSLT 2.0, but I presume you don't
    >> want to rely on a 2.0 processor being available.)
    >>
    >> Personal question: The server should know today's date. Why are you
    >> trying to pass the date to the server?

    >
    > Cause the company i work for is asking for something ridiculously
    > stupid
    > They want it to make it easier on the user to just click on a link
    > where the date is engraiined automatically into the link
    >
    > So basically if i want to do anything i would rely on XSLT 2.0 -
    > interesting
    >
    > I mean all they want technically is the user to click on a link that
    > is changed as the web page loads up. I've never even heard about this
    > on any web page before -


    Have the URL point to a directory on the server. In that directory, have
    files which are named by date (e.g., '20070328.html'). Have a cron job
    which, early each morning, deletes the old index.html symbolic link if
    present and creates a new 'index.html' symbolic link to today's file. Then
    clicking on the link will always get you today's file.

    Or, of course, have some more sophisticated dynamic content engine, but
    what I've suggested above can be implemented in half a dozen lines of
    shell script.

    --
    (Simon Brooke) http://www.jasmine.org.uk/~simon/
    Das Internet is nicht fuer gefingerclicken und giffengrabben... Ist
    nicht fuer gewerken bei das dumpkopfen. Das mausklicken sichtseeren
    keepen das bandwit-spewin hans in das pockets muss; relaxen und
    watchen das cursorblinken. -- quoted from the jargon file
    Simon Brooke, Mar 28, 2007
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andrew Tegala

    File Extension Changer program

    Andrew Tegala, Aug 13, 2003, in forum: Java
    Replies:
    1
    Views:
    534
    Neomorph
    Aug 14, 2003
  2. Terrance N. Phillip

    System Independent Wallpaper Changer

    Terrance N. Phillip, Jul 6, 2005, in forum: Python
    Replies:
    4
    Views:
    475
    Terrance N. Phillip
    Jul 6, 2005
  3. Joe Redshaw

    Innovator/Game Changer Wanted...

    Joe Redshaw, Dec 7, 2007, in forum: Java
    Replies:
    1
    Views:
    318
    Andrew Thompson
    Dec 8, 2007
  4. Oli Watts

    Date-based Events Calendar Changer

    Oli Watts, Jul 14, 2003, in forum: Javascript
    Replies:
    0
    Views:
    207
    Oli Watts
    Jul 14, 2003
  5. Alan Clark

    Simple document changer in a frame.

    Alan Clark, Aug 9, 2003, in forum: Javascript
    Replies:
    2
    Views:
    84
    Alan Clark
    Aug 12, 2003
Loading...

Share This Page