On Tue, 17 Apr 2001, Sean M. Burke wrote:

> At 10:08 AM 2001-04-17 +0100, Matt Sergeant wrote:
> >On Tue, 17 Apr 2001, Sean M. Burke wrote:
> >> I've been working like a madman for the past few days, coming up with
> >> a pod2xml and matching xml2pod.  (Why?  Because it's not there.)
> >>[...]
> >> module.)
> >
> >Umm, why? As the module authoring instructions on cpan say, why not help
> >with the existing module?

Before I reply specifically, I guess the biggest problem becomes you can't
install both POD::XML and POD::PXML, because the two pod2xml scripts will
conflict. That's obviously bad.

> Well, I considered just fiddling with your module so that it could to
> xml2pod, and so that there'd be a DTD rigorously adhered to.
> 
> But first off: your module uses Pod::Parser, which I have little experience
> with; I'm /much/ more used to Pod::Tree.  (I've dealt with both, and /I/
> find Pod::Tree more pleasant to deal with, but that probably just reflects
> my bias towards parse trees, a` la HTML::Tree.   Namely, dealing with
> Pod::Parser gives me a migraine.)

Well you're not alone there - it gave me a migraine too :-)

There's a few things that I really hate about POD::Parser, the most
significant thing is that it's impossible (or at least very difficult) to
output the results to anything other than a file. And even if you could
use a tied filehandle, it's still "print" getting called - and I want to
be able to output SAX events.

> And second off: I didn't want the whole thing your module does with <sect1>
> elements, etc.  There's nothing wrong with it, but I wanted to try a more
> minimalist approach to the DTD, where there'd be nothing in the XML that
> isn't in the POD, and vice versa: so POD has =head1, so my DTD has
> <head1>...</head1>; POD has text paragraphs, so my DTD has <p>...</p>.
> But POD has no directive or command for surrounding a head1 and all the
> paragraphs after that until the next head1, so I didn't want any such thing
> in my DTD.  Analogously, POD has no directive or command for surrounding a
> list-item-label (=item foo) PLUS the text in that list until the next
> list-item-label.  I thought of having <item>
> <label>*</label><stuff><p>foo</p></stuff> </item> to represent "=item
> *\n\nfoo", but that involved positing elements that are just not in the
> POD, which is a slippery slope that I really felt like trying to avoid.
> (And by saying that I wanted to try to be minimalist or whatever, I don't
> mean that I presumed that that was where The Correct Solution would be -- I
> mean that I was experimenting, giving it a whirl, and seeing how far I
> could go with it and what the end product might look like.)
> 
> So I decided it'd be just simpler to start afresh with Pod::Tree and my new
> idea of that the XML should look like.

Fair enough, that's kinda what I thought might be the case - my model
doesn't reflect POD terribly closely, because frankly POD is broken (I
guess I should don my flame proof suit right now considering the CC list).

But having said that, I'm sure it could be possible to make it
switchable between DTDs.

> You are, of course, welcome to adapt the xml2pod code from Pod::PXML (once
> I release it-- I'm still fiddling with Latin-1/UTF8 things in it), and
> construe it as useful for your xml2pod.

Actually I want to do xml2pod using stylesheets.

> Incidentally, I don't suppose that my minimalist doctype is optimal for
> every knowledge-extraction or rendering task -- not by a long shot!  I
> wanted a /mere/ notational variant of POD, thus (merely) making POD
> tractable (bidirectionally) to XML tools.

Can you expand on the exact purpose of it though? I mean, XML editors
suck, and pretty much the only decent thing you can do right now is render
the stuff or process it somehow. Don't get me wrong, round-tripping is
valiant in itself, and important - it's just something I haven't gotten
around to yet :-)

-- 
<Matt/>

    /||    ** Founder and CTO  **  **   http://axkit.com/     **
   //||    **  AxKit.com Ltd   **  ** XML Application Serving **
  // ||    ** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** mod_perl news and resources: http://take23.org  **
     \\//
     //\\
    //  \\

Reply via email to