unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* Emacs - Time-stanp:
@ 2006-10-04 18:15 Rick Stanley
  2006-10-06  0:21 ` Kevin Rodgers
  0 siblings, 1 reply; 2+ messages in thread
From: Rick Stanley @ 2006-10-04 18:15 UTC (permalink / raw)


Hello!

In trying to use the emacs Time-stamp: in writing some XHTML/CSS code, I
used the following:

<meta name="revised" content="Time-stamp: <2006-10-04 13:55:39 rick>" />

This will not pass the W3C XHTML or CSS validators, for a '<' or '>'
being embedded within an XML attribute .

The only way I could get Time-stamp: to work was to comment out the
whole line:

<!--  <meta name="revised" content="Time-stamp: &lt;2006-10-04 13:55:39
rick&gt;" /> -->

The Time-stamp: works, but I loose the 'revised' Meta Data.

I would like to see '&lt;' and '&gt;' be recognized along with the
current '<>' and '""' deliminators for Time-stamp:, or some other
deliminator that conforms to valid characters as data inside of an XML
attribute.

Thank you!

Rick Stanley


-- 
 RSI (Rick Stanley, Inc.)
 (917) 822-7771
 www.rsi-ny.com / www.rsiny.com
 Computer Systems Consulting
 Linux & Open Source Specialists

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Emacs - Time-stanp:
  2006-10-04 18:15 Emacs - Time-stanp: Rick Stanley
@ 2006-10-06  0:21 ` Kevin Rodgers
  0 siblings, 0 replies; 2+ messages in thread
From: Kevin Rodgers @ 2006-10-06  0:21 UTC (permalink / raw)


Rick Stanley wrote:
> Hello!
> 
> In trying to use the emacs Time-stamp: in writing some XHTML/CSS code, I
> used the following:
> 
> <meta name="revised" content="Time-stamp: <2006-10-04 13:55:39 rick>" />
> 
> This will not pass the W3C XHTML or CSS validators, for a '<' or '>'
> being embedded within an XML attribute .
> 
> The only way I could get Time-stamp: to work was to comment out the
> whole line:
> 
> <!--  <meta name="revised" content="Time-stamp: &lt;2006-10-04 13:55:39
> rick&gt;" /> -->
> 
> The Time-stamp: works, but I loose the 'revised' Meta Data.
> 
> I would like to see '&lt;' and '&gt;' be recognized along with the
> current '<>' and '""' deliminators for Time-stamp:, or some other
> deliminator that conforms to valid characters as data inside of an XML
> attribute.

Assuming your XHTML files (which are not code, by the way) are in XML
mode (aka SGML mode in Emacs), try this:

(add-hook 'sgml-mode-hook
	  (lambda ()
	    (set (make-local-variable 'time-stamp-start)
		 (replace-regexp-in-string (regexp-quote "[\"<]")
					   "\\(\"\\|&lt;\\)"
					   time-stamp-start
					   t t))
	    (set (make-local-variable 'time-stamp-end)
		 (replace-regexp-in-string (regexp-quote "[\">]")
					   "\\(\"\\|&gt;\\)"
					   time-stamp-end
					   t t))))


-- 
Kevin

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-10-06  0:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-04 18:15 Emacs - Time-stanp: Rick Stanley
2006-10-06  0:21 ` Kevin Rodgers

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).