- XSLTify the multimedia pages with a slightly different approach than the

earlier one.  It does not any more has per-tag and per-source pages
  but one page for tags and one for sources with anchors.  With the current
  number of entries it will probably be fine for a long time but if once
  we need to divide it into smaller chunks, it will be easier with XSLT.
- Now the documents are also rebuilt if stylesheets or the source XML
  database changes and the build time is drastically decreased.

Reviewed by:	www@
This commit is contained in:
Gabor Kovesdan 2012-09-21 10:02:57 +00:00
parent 124917ccbd
commit 2e69c9e705
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=39589
15 changed files with 5085 additions and 1997 deletions

View file

@ -0,0 +1,55 @@
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE xsl:stylesheet PUBLIC "-//FreeBSD//DTD FreeBSD XSLT 1.0 DTD//EN"
"http://www.FreeBSD.org/XML/www/share/sgml/xslt10-freebsd.dtd" [
<!ENTITY title "FreeBSD Multimedia">
]>
<!-- $FreeBSD$ -->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml">
<xsl:import href="http://www.FreeBSD.org/XML/www/share/sgml/xhtml.xsl"/>
<xsl:import href="include.xsl"/>
<xsl:variable name="title">&title;</xsl:variable>
<xsl:template name="process.sidewrap">&nav.about;</xsl:template>
<xsl:template name="process.contentwrap">
<xsl:call-template name="multimedia.pre"/>
<h1>Source List</h1>
<ul>
<xsl:for-each select="//source">
<xsl:sort select="name"/>
<li>
<a>
<xsl:attribute name="href">
<xsl:value-of select="concat('#', @id)"/>
</xsl:attribute>
<xsl:value-of select="name"/>
</a>
</li>
</xsl:for-each>
</ul>
<h1>Multimedia Resources</h1>
<xsl:for-each select="//source">
<xsl:sort select="name"/>
<xsl:variable name="sourceId" select="@id"/>
<h2 id="{@id}"><xsl:value-of select="name"/></h2>
<ul>
<xsl:apply-templates select="/multimedia/items/item[@source = $sourceId]"/>
</ul>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>