[pmwiki-users] How do I control $HTMLVSpace?

V.Krishn mistyfire at autograf.pl
Wed Aug 24 23:43:09 CDT 2005


Hello,
> This is what we currently do:
> - we forget about trying to process HTML into print -- that way lies
>   madness
I might not me able to provide a complete solution here, but come to think of 
it, I guess there are some valid reasons that this project has choosen this 
path. But I feel having ?action=print as the starting point would have made 
things easier. Then writing an independant layer that sits between pmwiki and 
the print-oriented dtd would do pre XSLT transformation work.

Some of the intemediate tools that I can think be helpful in this kind of 
approach would be:
http://appro.mit.jyu.fi/tools/csstoxml/
http://www.mythcode.org/
http://yeslogic.com -->this seems as a project quite close to yours.

Pmwiki already produces XHTML and from the output using a XSLT to transform 
into another XML file probably should not be very difficult.

Is this project opensouced?, Is it possible to see the source code in 
progress?

This was just a thought, for a project like this, I think it would be useful 
to have take an independant approach.
Regards.
V.Krishn
>
> - we define a replacement stdmarkup.php that asks pmwiki to translate
>   the wiki markup into a print-oriented dtd
>
> - all such translations include an xml namespace qualifier, so
>   output contains things like
>
>     <tbook:item>some text</tbook:item>
>
> - then we do a pmwiki magic $MarkupFrameBase['posteval']['detag']
>   to remove any tags without the namespace qualifier, such as
>   <p class='vspace'></p>
>
> - then we remove all the namespace qualifiers, so pmwiki puts
>   out xml that complies with the print dtd -- and all the vspace
>   stuff is gone
>
> So the only answer I have been able to think of is an 'after
> block' rule that looks for
>
>   <p class='vspace'></p>(<\/tbook:.*?>)?<tbook:(.*?)>
>
> and turns it into (for example; actual output depends on $2)
>
>   $1<tbook:$2 skip='big'>
>
> This relies on pmwiki not changing the rules, so is not
> great, but will probably work.
>
> But it seems to me that a better way would be to create
> correct xml markup in the first place.
>
> Basically, I'm stuck!
> --
> JR
> --
> John Rankin




More information about the pmwiki-users mailing list