Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > XSL page update URL changer?

Reply
Thread Tools

XSL page update URL changer?

 
 
RigasMinho
Guest
Posts: n/a
 
      03-27-2007
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?

 
Reply With Quote
 
 
 
 
Joseph Kesselman
Guest
Posts: n/a
 
      03-27-2007
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?
 
Reply With Quote
 
 
 
 
RigasMinho
Guest
Posts: n/a
 
      03-28-2007
On Mar 27, 4:01 pm, Joseph Kesselman <(E-Mail Removed)>
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 -


 
Reply With Quote
 
Joseph Kesselman
Guest
Posts: n/a
 
      03-28-2007
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
 
Reply With Quote
 
Simon Brooke
Guest
Posts: n/a
 
      03-28-2007
in message <(E-Mail Removed) .com>,
RigasMinho ('(E-Mail Removed)') wrote:

> On Mar 27, 4:01 pm, Joseph Kesselman <(E-Mail Removed)>
> 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.

--
http://www.velocityreviews.com/forums/(E-Mail Removed) (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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
reading variables from a URL in an XSL page. McGowan XML 2 04-30-2007 03:07 PM
dynamically update the page content with XSL and javascript? Kourosh XML 2 05-13-2006 07:18 PM
XSL Question tp xsl:for-each and xsl:variable schaf@2wire.ch XML 1 05-27-2005 09:25 PM
URL - substitution of a correct URL by a GUID like URL in favorites. Just D. ASP .Net Mobile 0 08-11-2004 04:26 PM
redirect URL's, return URL's, and URL Parameters Jon paugh ASP .Net 1 07-10-2004 05:29 AM



Advertisments