info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

XML namespace for CVS keywords


From: Nik Clayton
Subject: XML namespace for CVS keywords
Date: Tue, 18 Sep 2001 20:32:31 +0100
User-agent: Mutt/1.2.5i

Folks,

Derek Price, the cvshome.org webmaster, suggested I mail these lists
with this suggestion.  I'm not on the lists, so I'd appreciate cc's of
replies.  Thanks.

Anyway;

Working on the FreeBSD documentation and website we currently embed
various CVS keywords around the text to show things such as when the page
was last modified.

Looking around for a better way to do this, I decided that using XML
namespaces might be more appropriate.  So somewhere in my XML document I
might have:

    ...

    <cvs:keywords xmlns="http://www.FreeBSD.org/XML/CVS/Keywords";>
      <cvs:keyword name="author">$Author$</cvs:keyword>
      <cvs:keyword name="date">$Date$</cvs:keyword>

      <!-- More cvs:keyword elements as necessary -->
    </cvs:keywords>

    <!-- Rest of document -->

    ...

and then in my XSL stylesheet I might have:


    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                    xmlns:cvs="http://www.FreeBSD.org/XML/CVS/Keywords";
                    version="1.0">

      ...

        <!-- Include the last modified date -->
        <p>Last modified:
          <xsl:value-of select="//cvs:address@hidden'date']"/>
        </p>

      ...
    </xsl:stylesheet>

The advantage of using namespaces in this way is that I can embed CVS
keywords in to any XML document, whether it's marked up in XHTML,
DocBook, or some other DTD, knowing that I can correctly extract the
value of those keywords using an XSL stylesheet, without needing to use
any hacks to do so.

So, on to the purpose of this e-mail.

  1.  Would you folks at be interested in trying to propogate this scheme 
      as a standard way to embed CVS meta data into XML?  This would 
      probably require an announcement of some sort from
      yourselves, and a web page showing how document and stylesheet
      authors can use this (which I'd be happy to put together).

  2.  Propogate the URI

          http://www.cvshome.org/XML/CVS/Keywords/

      or similar.  There doesn't need to be any documents at that URI,
      it just needs to be something that everyone who wants to use this
      scheme can agree on.
 
Thoughts?

N
-- 
FreeBSD: The Power to Serve             http://www.freebsd.org/
FreeBSD Documentation Project           http://www.freebsd.org/docproj/

          --- 15B8 3FFC DDB4 34B0 AA5F  94B7 93A8 0764 2C37 E375 ---

Attachment: pgpc3RX5yT0ya.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]