Author: michiel
Date: 2010-05-15 19:09:26 +0200 (Sat, 15 May 2010)
New Revision: 42161
Added:
speeltuin/mihxil/simple/wget/welcomefiles.xslt
Modified:
speeltuin/mihxil/simple/wget/Makefile
Log:
parsing away index.html
Modified: speeltuin/mihxil/simple/wget/Makefile
===================================================================
--- speeltuin/mihxil/simple/wget/Makefile 2010-05-15 17:04:20 UTC (rev
42160)
+++ speeltuin/mihxil/simple/wget/Makefile 2010-05-15 17:09:26 UTC (rev
42161)
@@ -3,7 +3,7 @@
simple-webapp/index.html:
wget -r -k -nH --adjust-extension http://localhost:8080/simple-webapp/
- bash -c 'for i in `find simple-webapp -name "*.html"`; do xmllint
--nsclean --format $$i > $$i.new ; mv $$i.new $$i ; done'
+ bash -c 'for i in `find simple-webapp -name "*.html"`; do xmllint $$i |
xsltproc welcomefiles.xslt - | xmllint --nsclean --format - > $$i.new ; mv
$$i.new $$i ; done'
upload: simple-webapp/index.html
(cd simple-webapp ; tar zcf es.tgz *)
Added: speeltuin/mihxil/simple/wget/welcomefiles.xslt
===================================================================
--- speeltuin/mihxil/simple/wget/welcomefiles.xslt
(rev 0)
+++ speeltuin/mihxil/simple/wget/welcomefiles.xslt 2010-05-15 17:09:26 UTC
(rev 42161)
@@ -0,0 +1,32 @@
+<xsl:stylesheet
+ xmlns:h="http://www.w3.org/1999/xhtml"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version = "1.0"
+ exclude-result-prefixes="xml"
+ >
+
+
+ <xsl:output method="xml"
+ version="1.0"
+ encoding="utf-8"
+ indent="no"
+ />
+
+ <xsl:template match="h:*">
+ <xsl:copy>
+ <xsl:copy-of select="@*" />
+ <xsl:apply-templates />
+ </xsl:copy>
+ </xsl:template>
+
+ <xsl:template match="h:a">
+ <xsl:copy>
+ <xsl:copy-of select="@*" />
+ <xsl:if test="@href = 'index.html'">
+ <xsl:attribute name="href">.</xsl:attribute>
+ </xsl:if>
+ <xsl:apply-templates />
+ </xsl:copy>
+ </xsl:template>
+
+
+</xsl:stylesheet>
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs