[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Time stamp with emacs

Subject: Re: Time stamp with emacs
From: Anton Triest <anton@xxxxxxxx>
Date: Tue, 28 Sep 2004 11:03:09 +0200
emacs timestamp
Hi Jan,

First: your file is not really a html file, but xslt, so it should have a .xsl suffix (test.xsl).

Also, the stylesheet needs a processing instruction pointing to itself:
<?xml-stylesheet href="test.xsl" type="text/xsl"?>

On the xsl-list homepage there's a good example of a standalone stylesheet:
http://www.mulberrytech.com/xsl/xsl-list/processor-version.xsl

Try it this way (test.xsl):

<?xml version="1.0"?>
<?xml-stylesheet href="test.xsl" type="text/xsl"?>
<!-- Time-stamp: "2004-09-25 16:37:55 janmatti" -->
<html xsl:version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     xmlns="http://www.w3.org/TR/xhtml1/strict">
 <head></head>
 <body>
   <p>
   <xsl:value-of select="document('')/comment()[1]"/>
   </p>
 </body>
</html>

HTH,
Anton


Jan Mattila wrote:


Hello.


I tried Dave Pawson's trick for getting a time stamp by using Emacs, and everything worked up to the part, when you see the timestamp on the web-page. I don't see it.

I an utter noob, so I might be making some silly mistake somewhere,
but I cannot spot it.

Here's my test.html file:

<?xml version="1.0"?>
<!-- Time-stamp: "2004-09-25 16:37:55 janmatti" -->
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 version="1.0"




<xsl:template match="/"> <html><head></head> <body> <p> This should be the timestamp <xsl:value-of select="document('')/comment()[1]"/> </p> </body> </html> </xsl:template> </xsl:transform>


As you can see it's an almost exact copy of the one in Dave's post "emacs time stamp" on "Thu, 9 Nov 2000 13:39:49 -0000"


I thought that maybe the name of the file (.html) is the problem,
but when I tried test.xml I only got the document tree with my
firefox-0.8:

"This XML file does not appear to have any style information
associated with it. The document tree is shown below."

So should the file name be .xml and then have something else
to fix the style part? Or is there some other obvious mistake?


PaX.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.