Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Docs

MoinMoin -> XML

 

 

Apache docs RSS feed   Index | Next | Previous | View Threaded


i.galic at brainsware

Mar 23, 2012, 2:20 PM

Post #1 of 7 (199 views)
Permalink
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 [at] tyni ~/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 [at] tyni ~/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 [at] brainsware
URL: http://brainsware.org/
GPG: 6880 4155 74BD FD7C B515 2EA5 4B1D 9E08 A097 C9AE


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe [at] httpd
For additional commands, e-mail: docs-help [at] httpd


rbowen at rcbowen

Mar 24, 2012, 5:45 AM

Post #2 of 7 (193 views)
Permalink
Re: MoinMoin -> XML [In reply to]

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 [at] rcbowen :: @rbowen
rbowen [at] apache


kess at kess-net

Mar 24, 2012, 7:06 AM

Post #3 of 7 (195 views)
Permalink
Re: MoinMoin -> XML [In reply to]

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


DRuggeri at primary

Mar 24, 2012, 7:41 AM

Post #4 of 7 (191 views)
Permalink
Re: MoinMoin -> XML [In reply to]

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 [at] httpd
For additional commands, e-mail: docs-help [at] httpd


i.galic at brainsware

Mar 26, 2012, 3:41 PM

Post #5 of 7 (187 views)
Permalink
Re: MoinMoin -> XML [In reply to]

----- 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 [at] brainsware
URL: http://brainsware.org/
GPG: 6880 4155 74BD FD7C B515 2EA5 4B1D 9E08 A097 C9AE


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe [at] httpd
For additional commands, e-mail: docs-help [at] httpd


i.galic at brainsware

Mar 26, 2012, 3:42 PM

Post #6 of 7 (192 views)
Permalink
Re: MoinMoin -> XML [In reply to]

----- 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 [at] brainsware
URL: http://brainsware.org/
GPG: 6880 4155 74BD FD7C B515 2EA5 4B1D 9E08 A097 C9AE


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe [at] httpd
For additional commands, e-mail: docs-help [at] httpd


i.galic at brainsware

Apr 20, 2012, 5:44 AM

Post #7 of 7 (164 views)
Permalink
Re: MoinMoin -> XML [In reply to]

----- 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 [at] brainsware
URL: http://brainsware.org/
GPG: 6880 4155 74BD FD7C B515 2EA5 4B1D 9E08 A097 C9AE

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe [at] httpd
For additional commands, e-mail: docs-help [at] httpd

Apache docs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.