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/04/20 14:44:28 UTC

Re: MoinMoin -> XML


----- 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