summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Lohmaier <lohmaier+libreoffice@googlemail.com>2012-10-23 23:41:52 +0200
committerChristian Lohmaier <lohmaier+libreoffice@googlemail.com>2012-10-23 23:41:52 +0200
commit696a3bc25fb4cd69fc59923f022ba4f2d0117217 (patch)
tree09f6f04ca38680c79b49ead3d8c97cecbfaa2885
parentc247d268474d62fdbab76cb671203c4385d9a5ea (diff)
Fixing the BSA with the new wiki
-rw-r--r--bug/Makefile5
-rw-r--r--bug/stripnamespace.xsl13
2 files changed, 16 insertions, 2 deletions
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>