You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@httpd.apache.org by Igor Galić <i....@brainsware.org> on 2012/03/23 22:20:59 UTC

MoinMoin -> XML

Hey folks,

I know, I know what you're thinking, there he goes again?
Hasn't he still done that?!
Yeah, in February I asked if someone has a method or tool
to transform our MoinMoin wiki text into XML.
As it turns out, MoinMoin already provides XML!

It isn't perfect:

   igalic@tynix ~/src/asf/httpd/docs/manual (svn)-[manual:1300803] % curl  http://wiki.apache.org/httpd/PerformanceScalingUp?mimetype=text/xml > performance-scaling.xml
     % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                    Dload  Upload   Total   Spent    Left  Speed
   100 53989    0 53989    0     0  18681      0 --:--:--  0:00:02 --:--:-- 23473
   igalic@tynix ~/src/asf/httpd/docs/manual (svn)-[manual:1300803] % xmllint performance-scaling.xml
   performance-scaling.xml:97: parser error : Opening and ending tag mismatch: p line 9 and s2
   </s2>
        ^
   performance-scaling.xml:443: parser error : Opening and ending tag mismatch: s2 line 3 and s1
   </s2></s1>
             ^
   performance-scaling.xml:443: parser error : Premature end of data in tag s1 line 2
   </s2></s1>
             ^

But it's a start.

So, again, I ask, no, implore: Does someone here with skills in XSLT
(or whatever might be necessary) have the time to write a tool to
transform our Wiki pages to httpd-docs compatible XML?

Thank you in advance,

i

-- 
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.org/
GPG: 6880 4155 74BD FD7C B515  2EA5 4B1D 9E08 A097 C9AE


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Re: MoinMoin -> XML

Posted by Igor Galić <i....@brainsware.org>.

----- Original Message -----
> 
> 
> ----- Original Message -----
> > On 3/23/2012 4:20 PM, Igor Galić wrote:
> > > So, again, I ask, no, implore: Does someone here with skills in
> > > XSLT
> > > (or whatever might be necessary) have the time to write a tool to
> > > transform our Wiki pages to httpd-docs compatible XML?
> >
> > FWIW It looks like the moinmoin export of the TOC is borked...
> >
> > <s1 title="PerformanceScalingUp"><p></p>
> > <s2 id="Performance Optimization: Scaling Up" title="Performance
> > Optimization: Scaling Up">
> > ...
> > <p><p>Contents</p>     <!-- open p, no close -->
> > ...
> > <p> </p>
> > <p></p>
> > </s2>
> >
> > Once I remove the table of contents, the file can be parsed fine
> > and
> > all
> > sorts of voodoo can be done to the contents. My capabilities with
> > XSLT
> > are embarrassing, though, so I'll leave that to someone more
> > skilled.
> 
> *nod*
> we're generating a TOC in our own XML anyway, so we don't need it.

so I did it semi-manually from 

 http://wiki.apache.org/httpd/PerformanceScalingUp?mimetype=text/xml > performance-scaling.xml


perl -p -i -e 's|([</])(s[0-9]+)|${1}section|g' perf-scaling.xml
perl -p -i -e 's|([</])(source)|${1}example|g' perf-scaling.xml
perl -p -i -e 's|<p>\s*</p>|\n|g' perf-scaling.xml
perl -p -i -e 's|([</])(jump)|${1}a|g' perf-scaling.xml
perl -p -i -e 's|(<section id="[^"]+")\s+title="([^"]+)">|${1}>\n<title>${2}</title>|g' perf-scaling.xml

What's missing here is converting the CDATA section,
I did that really manually.

> > --
> > Daniel Ruggeri

i

-- 
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.org/
GPG: 6880 4155 74BD FD7C B515  2EA5 4B1D 9E08 A097 C9AE

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Re: MoinMoin -> XML

Posted by Igor Galić <i....@brainsware.org>.

----- Original Message -----
> On 3/23/2012 4:20 PM, Igor Galić wrote:
> > So, again, I ask, no, implore: Does someone here with skills in
> > XSLT
> > (or whatever might be necessary) have the time to write a tool to
> > transform our Wiki pages to httpd-docs compatible XML?
> 
> FWIW It looks like the moinmoin export of the TOC is borked...
> 
> <s1 title="PerformanceScalingUp"><p></p>
> <s2 id="Performance Optimization: Scaling Up" title="Performance
> Optimization: Scaling Up">
> ...
> <p><p>Contents</p>     <!-- open p, no close -->
> ...
> <p> </p>
> <p></p>
> </s2>
> 
> Once I remove the table of contents, the file can be parsed fine and
> all
> sorts of voodoo can be done to the contents. My capabilities with
> XSLT
> are embarrassing, though, so I'll leave that to someone more skilled.

*nod*
we're generating a TOC in our own XML anyway, so we don't need it.

> --
> Daniel Ruggeri

i

-- 
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.org/
GPG: 6880 4155 74BD FD7C B515  2EA5 4B1D 9E08 A097 C9AE


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Re: MoinMoin -> XML

Posted by Daniel Ruggeri <DR...@primary.net>.
On 3/23/2012 4:20 PM, Igor Galić wrote:
> So, again, I ask, no, implore: Does someone here with skills in XSLT
> (or whatever might be necessary) have the time to write a tool to
> transform our Wiki pages to httpd-docs compatible XML?

FWIW It looks like the moinmoin export of the TOC is borked...

<s1 title="PerformanceScalingUp"><p></p>
<s2 id="Performance Optimization: Scaling Up" title="Performance
Optimization: Scaling Up">
...
<p><p>Contents</p>     <!-- open p, no close -->
...
<p> </p>
<p></p>
</s2>

Once I remove the table of contents, the file can be parsed fine and all
sorts of voodoo can be done to the contents. My capabilities with XSLT
are embarrassing, though, so I'll leave that to someone more skilled.

-- 
Daniel Ruggeri


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Re: MoinMoin -> XML

Posted by Rich Bowen <rb...@rcbowen.com>.
On Mar 23, 2012, at 5:20 PM, Igor Galić wrote:

> So, again, I ask, no, implore: Does someone here with skills in XSLT
> (or whatever might be necessary) have the time to write a tool to
> transform our Wiki pages to httpd-docs compatible XML?


Probably not, but I can perhaps give it a whack writing a perl post-processer to munge it into shape.

--
Rich Bowen
rbowen@rcbowen.com :: @rbowen
rbowen@apache.org







Re: MoinMoin -> XML

Posted by Igor Galić <i....@brainsware.org>.

----- Original Message -----
> 
> 
> On Friday 23 March 2012 22:20:59 Igor Galić wrote:
> 
> 
> 
> > 
> 
> > So, again, I ask, no, implore: Does someone here with skills in
> > XSLT
> 
> > (or whatever might be necessary) have the time to write a tool to
> 
> > transform our Wiki pages to httpd-docs compatible XML?
> 
> > 
> 
> > Thank you in advance,
> 
> > 
> 
> 
> 
> Time is a problem. How fast do you need it?

Given how long I've already slacked on this, I
don't really think time is an issue ;)

> Kess

i

-- 
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.org/
GPG: 6880 4155 74BD FD7C B515  2EA5 4B1D 9E08 A097 C9AE


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Re: MoinMoin -> XML

Posted by Astrid 'Kess' Malo <ke...@kess-net.de>.
On Friday 23 March 2012 22:20:59 Igor Galić wrote:

> 
> So, again, I ask, no, implore: Does someone here with skills in XSLT
> (or whatever might be necessary) have the time to write a tool to
> transform our Wiki pages to httpd-docs compatible XML?
> 
> Thank you in advance,
> 

Time is a problem. How fast do you need it?
 Kess