diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2003-03-16 22:44:34 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2003-03-16 22:44:34 +0000 |
commit | a34c45ac28f8b9deb2c6d463d9109dfb6abe2438 (patch) | |
tree | 2a524f320d72663ce3685c1d2a4359b8adebb0b0 /doc | |
parent | 0d0f0f23fb081cfaf70f3dfabeccf690503ef847 (diff) | |
download | libxslt-a34c45ac28f8b9deb2c6d463d9109dfb6abe2438.tar.gz libxslt-a34c45ac28f8b9deb2c6d463d9109dfb6abe2438.tar.bz2 libxslt-a34c45ac28f8b9deb2c6d463d9109dfb6abe2438.zip |
Automated the NEWS generation and generated the XSA, like for libxml2, Daniel
Diffstat (limited to 'doc')
-rw-r--r-- | doc/Makefile.am | 18 | ||||
-rw-r--r-- | doc/news.xsl | 41 | ||||
-rw-r--r-- | doc/xsa.xsl | 53 |
3 files changed, 108 insertions, 4 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am index f9aa36d0..3bb8623c 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,10 +1,12 @@ ## Process this file with automake to produce Makefile.in EXTRA_DIST = \ libxslt-api.xml \ - libexslt-api.xml \ + libexslt-api.xml \ libxslt-decl.txt \ xsltproc.xml \ - apibuild.py + apibuild.py \ + libxslt.xsa \ + news.xsl # The name of the module. DOC_MODULE=libxslt-$(VERSION) @@ -25,7 +27,7 @@ APIPAGES=APIconstructors.html APIfiles.html APIfunctions.html \ man_MANS = xsltproc.1 -all : $(PAGES) +all : $(PAGES) $(top_srcdir)/NEWS libxslt.xsa tests: @@ -35,6 +37,14 @@ $(PAGES): $(srcdir)/xslt.html $(srcdir)/site.xsl -@(if [ -x $(bindir)/xsltproc ] ; then \ $(bindir)/xsltproc --html $(srcdir)/site.xsl $(srcdir)/xslt.html > index.html ; fi ) +$(top_srcdir)/NEWS: $(top_srcdir)/doc/news.xsl $(top_srcdir)/doc/news.html + -@(if [ -x $(bindir)/xsltproc ] ; then \ + $(bindir)/xsltproc --html $(top_srcdir)/doc/news.xsl $(top_srcdir)/doc/news.html > $(top_srcdir)/NEWS ; fi ); + +libxslt.xsa: $(top_srcdir)/doc/xsa.xsl $(top_srcdir)/doc/news.html + -@(if [ -x $(bindir)/xsltproc ] ; then \ + $(bindir)/xsltproc --html $(top_srcdir)/doc/xsa.xsl $(top_srcdir)/doc/news.html > libxslt.xsa ; fi ); + $(APIPAGES): libxslt-refs.xml site.xsl api.xsl -@(if [ -x $(bindir)/xsltproc ] ; then \ $(bindir)/xsltproc --html $(srcdir)/api.xsl $(srcdir)/xslt.html ; fi ); @@ -89,6 +99,6 @@ install-data-local: -(cd $(DESTDIR); gtkdoc-fixxref --module=libxslt --html-dir=$(HTML_DIR)) dist-hook: - (cd $(srcdir) ; tar cvf - *.1 *.html site.xsl *.gif html/*.html html/*.sgml tutorial/libxslt*) | (cd $(distdir); tar xf -) + (cd $(srcdir) ; tar cvf - *.1 *.html site.xsl news.xsl xsa.xsl *.gif html/*.html html/*.sgml tutorial/libxslt*) | (cd $(distdir); tar xf -) .PHONY : html sgml templates scan diff --git a/doc/news.xsl b/doc/news.xsl new file mode 100644 index 00000000..c2391779 --- /dev/null +++ b/doc/news.xsl @@ -0,0 +1,41 @@ +<?xml version="1.0"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + <xsl:output method="text" encoding="ISO-8859-1"/> + + <xsl:template match="/"> + <xsl:text> + NEWS file for libxslt + + Note that this is automatically generated from the news webpage at: + http://xmlsoft.org/XSLT/news.html + +</xsl:text> + <xsl:apply-templates select="//h3[1]/.."/> + </xsl:template> + <xsl:template match="h3"> + <xsl:text> +</xsl:text> + <xsl:apply-templates/> + <xsl:text>:</xsl:text> + </xsl:template> + <xsl:template match="ul"> + <xsl:apply-templates select=".//li"/> + <xsl:text> +</xsl:text> + </xsl:template> + <xsl:template match="li"> + <xsl:text> - </xsl:text> + <xsl:value-of select="."/> + <xsl:text> +</xsl:text> + </xsl:template> + <xsl:template match="a"> + <xsl:value-of select="."/> + <xsl:text> at +</xsl:text> + <xsl:value-of select="@href"/> + <xsl:text> +</xsl:text> + </xsl:template> +</xsl:stylesheet> + diff --git a/doc/xsa.xsl b/doc/xsa.xsl new file mode 100644 index 00000000..45a47601 --- /dev/null +++ b/doc/xsa.xsl @@ -0,0 +1,53 @@ +<?xml version="1.0"?> +<!-- + Stylesheet generating the XSA entry for libxslt based on the + latest News entry. + See http://www.garshol.priv.no/download/xsa/ for a description of XSA + --> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + <xsl:output method="xml" + doctype-public="-//LM Garshol//DTD XML Software Autoupdate 1.0//EN//XML" + doctype-system="http://www.garshol.priv.no/download/xsa/xsa.dtd" + indent="yes"/> + + <xsl:template match="/"> +<xsa> + <vendor> + <name>Daniel Veillard</name> + <email>daniel@veillard.com</email> + <url>http://veillard.com/</url> + </vendor> + <product id="libxslt"> + <name>libxslt</name> + <version><xsl:value-of select="substring-before(//h3[2], ':')"/></version> + <last-release><xsl:value-of select="substring-after(//h3[2], ':')"/></last-release> + <info-url>http://xmlsoft.org/XSLT/</info-url> + <changes> + <xsl:apply-templates select="//h3[2]/following-sibling::*[1]"/> + </changes> + </product> +</xsa> + </xsl:template> + <xsl:template match="h3"> + </xsl:template> + <xsl:template match="ul"> + <xsl:apply-templates select=".//li"/> + <xsl:text> +</xsl:text> + </xsl:template> + <xsl:template match="li"> + <xsl:text> - </xsl:text> + <xsl:value-of select="."/> + <xsl:text> +</xsl:text> + </xsl:template> + <xsl:template match="a"> + <xsl:value-of select="."/> + <xsl:text> at +</xsl:text> + <xsl:value-of select="@href"/> + <xsl:text> +</xsl:text> + </xsl:template> +</xsl:stylesheet> + |