Browse Source

Proper use of atom namespacing

Thank you @karlcow!
master
David Larlet 3 years ago
parent
commit
b10e6911c5
2 changed files with 13 additions and 13 deletions
  1. 11
    11
      david/log/feed.xsl
  2. 2
    2
      david/templates/feed.xml

+ 11
- 11
david/log/feed.xsl View File

@@ -59,14 +59,14 @@ Pour discuter :
the content of the encoded entries displays the HTML without rendering it.

-->
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">
<xsl:stylesheet version="3.0"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><xsl:value-of select="/feed/title"/> (flux RSS)</title>
<title><xsl:value-of select="/atom:feed/atom:title"/> (flux RSS)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<link rel="stylesheet" type="text/css" href="/static/david/css/style_2021-01-20.css"/>
@@ -100,7 +100,7 @@ Pour discuter :
<p class="center">
<a>
<xsl:attribute name="href">
<xsl:value-of select="/feed/link/@href"/>
<xsl:value-of select="/atom:feed/atom:link/@href"/>
</xsl:attribute>
Vous êtes perdu·e ? Retourner à l’accueil &#x2192;
</a>
@@ -131,19 +131,19 @@ Pour discuter :

<h2>Dernières publications</h2>

<xsl:for-each select="/feed/entry">
<xsl:for-each select="/atom:feed/atom:entry">
<div>
<details>
<summary>
<xsl:value-of select="title" disable-output-escaping="yes"/>
<xsl:value-of select="atom:title" disable-output-escaping="yes"/>
</summary>
<xsl:value-of select="summary" disable-output-escaping="yes"/>
<xsl:value-of select="atom:summary" disable-output-escaping="yes"/>
</details>
<small>
Publié le : <xsl:value-of select="substring(updated,1,10)" /> —
Publié le : <xsl:value-of select="substring(atom:updated,1,10)" /> —
<a target="_blank">
<xsl:attribute name="href">
<xsl:value-of select="link/@href"/>
<xsl:value-of select="atom:link/@href"/>
</xsl:attribute>
Lien permanent
</a>
@@ -153,7 +153,7 @@ Pour discuter :

<hr />
<p class="center">
<xsl:value-of select="/feed/rights"/>
<xsl:value-of select="/atom:feed/atom:rights"/>
</p>
</article>
</body>

+ 2
- 2
david/templates/feed.xml View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet href="/david/log/feed.xsl" type="text/xsl"?>
<feed xmlns:atom="http://www.w3.org/2005/Atom">
<feed xmlns="http://www.w3.org/2005/Atom">
<title>David Larlet</title>
<subtitle>Dernières mises à jour du site</subtitle>
<link href="{{ BASE_URL }}" rel="alternate" type="text/html" />
@@ -14,7 +14,7 @@
<rights>Copyright (c) 2004-2021, David Larlet</rights>
{% for page in page_list %}
<entry xml:lang="{{ page.lang }}">
<title>{{ page.escaped_title }}</title>
<title type="html">{{ page.escaped_title }}</title>
<link href="{{ page.full_url }}" rel="alternate" type="text/html" />
<updated>{{ page.normalized_date }}</updated>
<id>{{ page.full_url }}</id>

Loading…
Cancel
Save