update xsd/atom.rng, fix xsl/common.xsl for atom validation

This commit is contained in:
Astro 2012-06-27 03:39:58 +02:00
parent ae3990fda0
commit 860961e377
2 changed files with 13 additions and 6 deletions

View File

@ -2,10 +2,9 @@
<!--
-*- rnc -*-
RELAX NG Compact Syntax Grammar for the
Atom Format Specification
draft-ietf-atompub-format-10
Atom Format Specification Version 11
-->
<grammar xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:s="http://www.ascc.net/xml/schematron" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<grammar ns="http://www.w3.org/1999/xhtml" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:s="http://www.ascc.net/xml/schematron" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<start>
<choice>
<ref name="atomFeed"/>
@ -354,9 +353,9 @@
<element name="atom:source">
<ref name="atomCommonAttributes"/>
<interleave>
<optional>
<zeroOrMore>
<ref name="atomAuthor"/>
</optional>
</zeroOrMore>
<zeroOrMore>
<ref name="atomCategory"/>
</zeroOrMore>
@ -570,7 +569,7 @@
<!-- XHTML -->
<define name="anyXHTML">
<element>
<nsName ns="http://www.w3.org/1999/xhtml"/>
<nsName/>
<zeroOrMore>
<choice>
<attribute>

View File

@ -384,6 +384,14 @@
</xsl:call-template>, <xsl:call-template name="format-filesize">
<xsl:with-param name="value" select="@size"/>
</xsl:call-template>)
<xsl:if test="$baseurl = '' or $baseurl = '../'">
<!-- Include chapters only in XHTML for JS player. ATOM feeds
copy chapters outside <content type="xhtml"/>
-->
<xsl:copy-of select="sc:chapters"
xmlns:sc="http://podlove.de/simple-chapters"/>
</xsl:if>
</li>
</xsl:template>