BSA + New Wiki = No Good

Christian Lohmaier lohmaier+libreoffice at
Fri Oct 19 06:22:38 PDT 2012

Hi *,

On Fri, Oct 19, 2012 at 12:25 PM, Christian Lohmaier
<lohmaier+libreoffice at> wrote:
> [...]
> The additional html tags in the wiki-output on the <html> tag makes
> the removal of the xmlns tag that is added by tidy fail.
> i.e.  perl -pe 's|xmlns=""||'  does
> nothing, since it is not
> <html .. xmlns="" ..> but
> <html ... xmlns=<newline/>
> "">
> so remove the xmlns declaration and just run the xslt commands
> manually or fix the regular expression or something like that.

Or better - instead of trying to search and replace, also use xslt to
process the xml:


<xsl:stylesheet version="1.0" xmlns:xsl="">
        <xsl:output indent="yes"  encoding="UTF-8" method="xml"

        <xsl:template match="*">
                <xsl:element name="{name()}">
                        <xsl:apply-templates select="node()|@*"/>

        <xsl:template match="@*">

--- a/bug/Makefile
+++ b/bug/Makefile
@@ -18,7 +18,8 @@ all: extract compose

        mkdir -p build
-       curl --silent | tidy
--numeric-entities yes -asxhtml 2>/dev/null | perl -pe
's|xmlns=""||' >
+       curl --silent | 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


More information about the LibreOffice mailing list