validator/htdocs validator-news.xsl,NONE,1.1 header.html,1.38,1.39 index.html,1.75,1.76 whatsnew.html,1.53,1.54

Update of /sources/public/validator/htdocs
In directory hutz:/tmp/cvs-serv13205/htdocs

Modified Files:
	header.html index.html whatsnew.html 
Added Files:
	validator-news.xsl 
Log Message:
- Publishing XSLT used for the creation of the atom news feed 
(courtesy of Antonio Cavedoni)
- sample server config to serve atom feed through W3C xslt service
- adding link rel="alternate" for the newsfeed in both whatsnew and index.html



Index: index.html
===================================================================
RCS file: /sources/public/validator/htdocs/index.html,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -d -r1.75 -r1.76
--- index.html	20 Oct 2005 06:46:50 -0000	1.75
+++ index.html	15 Nov 2005 05:17:25 -0000	1.76
@@ -2,6 +2,7 @@
 --><!--#set var="date" value="\$Date$"
 --><!--#set var="title" value="The W3C Markup Validation Service"
 --><!--#set var="relroot" value="./"
+--><!--#set var="feeds" value="1"
 --><!--#include virtual="header.html" -->
 
      <div id="head">

Index: whatsnew.html
===================================================================
RCS file: /sources/public/validator/htdocs/whatsnew.html,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- whatsnew.html	20 Oct 2005 06:46:50 -0000	1.53
+++ whatsnew.html	15 Nov 2005 05:17:25 -0000	1.54
@@ -2,6 +2,7 @@
 --><!--#set var="date" value="\$Date$"
 --><!--#set var="title" value="What's New at The W3C Markup Validation Service"
 --><!--#set var="relroot" value="./"
+--><!--#set var="feeds" value="1"
 --><!--#include virtual="header.html" -->
   <div class="doc"><a name="skip" id="skip"></a>
     <h2>News for the W3C Markup Validator</h2>

--- NEW FILE: validator-news.xsl ---
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:h="http://www.w3.org/1999/xhtml"
  xmlns="http://www.w3.org/2005/Atom"
  exclude-result-prefixes="h">

<xsl:output method="xml" encoding="UTF-8" indent="yes"
  media-type="application/atom+xml"/>

<xsl:param name="host" select="'validator.w3.org'"/>
<xsl:param name="self" select="concat('http://', $host, '/whatsnew.atom')"/>
<xsl:param name="validator" 
    select="concat('http://', $host, '/whatsnew.html')"/>
<!-- number of entries to be displayed in the feed -->
<xsl:param name="limit" select="10"/>
<xsl:param name="author" select="'The W3C Validator Team'"/>
<!-- 
  feedvalidator.org complains about dates like YYYY-MM-DD not 
  being valid ISO datetimes, so we hack around it by setting 
  each item's publish time to 00:00:00 UTC
-->
<xsl:param name="faketime" select="'T00:00:00Z'"/>

<xsl:template match="/">
<feed xml:lang="en">
  <title><xsl:value-of select="/h:html/h:head/h:title"/></title>
  <updated>
    <xsl:value-of
	select="concat(substring-after(/h:html/h:body/*//h:dt[position()=1]/@id,
		't'), $faketime)"/>
  </updated>
  <author>
    <name><xsl:value-of select="$author"/></name>
  </author>
  <id><xsl:value-of select="$self"/></id>
  <link href="{$validator}"/>
  <link rel="self" href="{$self}"/>

  <!-- entries -->
  <xsl:apply-templates select="//h:dt[position() &lt; $limit]"/>
</feed>
</xsl:template>

<xsl:template match="h:dt">
<xsl:variable name="updated" select="substring-after(@id, 't')"/>
  <entry>
    <id><xsl:value-of 
      select="concat('tag:', $host, ',', $updated, ':', @id)"/></id>
    <updated><xsl:value-of select="concat($updated, $faketime)"/></updated>
    <link href="{concat($validator, '#', @id)}"/>
    <title><xsl:value-of select="substring-before(., ':')"/></title>
    <content xml:base="{$validator}" type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
	<xsl:copy-of select="following::h:dd[position()=1]/node()"/>
      </div>
    </content>
  </entry>
</xsl:template>

<xsl:template match="text()">
</xsl:template>

</xsl:stylesheet>

Index: header.html
===================================================================
RCS file: /sources/public/validator/htdocs/header.html,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- header.html	18 Aug 2005 04:56:47 -0000	1.38
+++ header.html	15 Nov 2005 05:17:25 -0000	1.39
@@ -12,6 +12,9 @@
     <meta name="description" content="W3C's easy-to-use
       HTML validation service, based on an SGML parser." />
     <meta name="revision" content="<!--#echo var="revision" -->" />
+    <!--#if expr="$feeds = 1" -->
+    <link rel="alternate" type="application/atom+xml" href="whatsnew.atom" />
+    <!--#endif -->
     <!-- SSI Template Version: $Id$ -->
   </head>
 

Received on Tuesday, 15 November 2005 05:17:30 UTC