Load GNOME rdf file directly into xsltproc, without saving it to the
temporary file and pre-processing with sed(1) first.
This commit is contained in:
parent
5c77caad4e
commit
80885f0df1
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/www/; revision=13182
2 changed files with 17 additions and 19 deletions
|
@ -1,4 +1,4 @@
|
|||
# $FreeBSD: www/en/gnome/Makefile,v 1.8 2002/01/28 17:05:24 sobomax Exp $
|
||||
# $FreeBSD: www/en/gnome/Makefile,v 1.9 2002/02/11 16:54:52 sobomax Exp $
|
||||
|
||||
.if exists(../Makefile.conf)
|
||||
.include "../Makefile.conf"
|
||||
|
@ -18,12 +18,9 @@ DATA= index.html newsflash.html
|
|||
|
||||
CLEANFILES= index.html
|
||||
CLEANFILES+= newsflash.html
|
||||
CLEANFILES+= gnotices.rdf
|
||||
|
||||
GNOTICES_RDF_URL= http://news.gnome.org/gnome-news/rdf
|
||||
|
||||
index.html: index.xsl news.xml includes.xsl ../includes.xsl gnotices.rdf
|
||||
${XSLTPROC} ${XSLTPROCOPTS} -o index.html \
|
||||
index.html! index.xsl news.xml includes.xsl ../includes.xsl
|
||||
${XSLTPROC} ${XSLTPROCOPTS:N-nonet} -o index.html \
|
||||
${.CURDIR}/index.xsl ${.CURDIR}/news.xml
|
||||
.if !defined(NO_TIDY)
|
||||
-${TIDY} ${TIDYOPTS} index.html
|
||||
|
@ -36,8 +33,4 @@ newsflash.html: newsflash.xsl news.xml includes.xsl ../includes.xsl
|
|||
-${TIDY} ${TIDYOPTS} ${.TARGET}
|
||||
.endif
|
||||
|
||||
gnotices.rdf::
|
||||
/usr/bin/fetch -qo - ${GNOTICES_RDF_URL} | ${SED} 's|rdf:RDF|rdf| ; \
|
||||
s|xmlns.*[^>]||' > ${.TARGET}
|
||||
|
||||
.include "${WEB_PREFIX}/share/mk/web.site.mk"
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
<!-- $FreeBSD$ -->
|
||||
<!-- $FreeBSD: www/en/gnome/index.xsl,v 1.23 2002/02/08 20:37:57 sobomax Exp $ -->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:rdf1="http://my.netscape.com/rdf/simple/0.9/"
|
||||
version="1.0">
|
||||
|
||||
<xsl:import href="../includes.xsl"/>
|
||||
<xsl:import href="includes.xsl"/>
|
||||
|
||||
<xsl:variable name="base" select="'..'"/>
|
||||
<xsl:variable name="date" select="'$FreeBSD$'"/>
|
||||
<xsl:variable name="date" select="'$FreeBSD: www/en/gnome/index.xsl,v 1.23 2002/02/08 20:37:57 sobomax Exp $'"/>
|
||||
<xsl:variable name="title" select="'FreeBSD GNOME Project'"/>
|
||||
|
||||
<xsl:output type="html" encoding="iso-8859-1"
|
||||
|
@ -174,18 +177,20 @@
|
|||
|
||||
<p><font size="+1" color="#990000"><b>GNOME Project News</b></font><br/>
|
||||
<font size="-1">
|
||||
<xsl:for-each select="document('gnotices.rdf')/descendant::item[position() < 10]">
|
||||
<xsl:for-each select="document('http://news.gnome.org/gnome-news/rdf')/rdf:RDF/*[name() = 'item'][position() < 10]">
|
||||
· <a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="link"/>
|
||||
<xsl:value-of select="rdf1:link"/>
|
||||
</xsl:attribute>
|
||||
<xsl:value-of select="title"/><br/>
|
||||
<xsl:value-of select="rdf1:title"/><br/>
|
||||
</a>
|
||||
</xsl:for-each>
|
||||
<a>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="document('gnotices.rdf')/descendant::channel/link"/>
|
||||
</xsl:attribute>More...
|
||||
<xsl:for-each select="document('http://news.gnome.org/gnome-news/rdf')/rdf:RDF/*[name() = 'channel'][position() = 1]">
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="rdf1:link"/>
|
||||
</xsl:attribute>More...
|
||||
</xsl:for-each>
|
||||
</a>
|
||||
</font></p>
|
||||
|
||||
|
|
Loading…
Reference in a new issue