[Libreoffice-commits] .: bug/Makefile bug/stripnamespace.xsl

Rob Snelders rsnelders at kemper.freedesktop.org
Tue Oct 23 14:42:50 PDT 2012


 bug/Makefile           |    5 +++--
 bug/stripnamespace.xsl |   13 +++++++++++++
 2 files changed, 16 insertions(+), 2 deletions(-)

New commits:
commit 696a3bc25fb4cd69fc59923f022ba4f2d0117217
Author: Christian Lohmaier <lohmaier+libreoffice at googlemail.com>
Date:   Tue Oct 23 23:41:52 2012 +0200

    Fixing the BSA with the new wiki

diff --git a/bug/Makefile b/bug/Makefile
index 0cc49a7..358d33c 100644
--- a/bug/Makefile
+++ b/bug/Makefile
@@ -18,7 +18,8 @@ all: extract compose
 
 extract:
 	mkdir -p build
-	curl --silent http://wiki.documentfoundation.org/BugReport_Details | tidy --numeric-entities yes -asxhtml 2>/dev/null | perl -pe 's|xmlns="http://www.w3.org/1999/xhtml"||' > build/BugReport_Details.xhtml
+	curl --silent http://wiki.documentfoundation.org/BugReport_Details | tidy --numeric-entities yes -asxhtml 2>/dev/null > build/tidyout.xhtml || echo "ignoring tidy error"
+	xsltproc --encoding UTF-8 --novalid stripnamespace.xsl build/tidyout.xhtml > build/BugReport_Details.xhtml
 	xsltproc --encoding UTF-8 --novalid component_comments.xsl build/BugReport_Details.xhtml > build/component_comments.xhtml
 	xsltproc --encoding UTF-8 --novalid subcomponents.xsl build/BugReport_Details.xhtml > build/subcomponents.xhtml
 	xsltproc --encoding UTF-8 --novalid components.xsl build/BugReport_Details.xhtml > build/components.xhtml
@@ -33,5 +34,5 @@ check:
 	perl sanity.pl TEST
 
 clean:
-	rm -f build/BugReport_Details.xhtml build/component_comments.xhtml build/subcomponents.xhtml build/components.xhtml build/query.xhtml build/versions.xhtml bug/bug.html
+	rm -f build/BugReport_Details.xhtml build/tidyout.xhtml build/component_comments.xhtml build/subcomponents.xhtml build/components.xhtml build/query.xhtml build/versions.xhtml bug/bug.html
 	rmdir build
diff --git a/bug/stripnamespace.xsl b/bug/stripnamespace.xsl
new file mode 100644
index 0000000..73ee6fc
--- /dev/null
+++ b/bug/stripnamespace.xsl
@@ -0,0 +1,13 @@
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+    <xsl:output indent="yes"  encoding="UTF-8" method="xml" omit-xml-declaration="yes"/>
+
+    <xsl:template match="*">
+        <xsl:element name="{name()}">
+            <xsl:apply-templates select="node()|@*"/>
+        </xsl:element>
+    </xsl:template>
+
+    <xsl:template match="@*">
+        <xsl:copy/>
+    </xsl:template>
+</xsl:stylesheet>


More information about the Libreoffice-commits mailing list