Re: convert XHTML to wiki markup with XML_Transformer

From: Date: Fri, 05 May 2006 11:51:38 +0000
Subject: Re: convert XHTML to wiki markup with XML_Transformer
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-23957@lists.php.net to get a copy of this message
Bonjour, Armen wrote:
Hi, I want to convert XHTML to Wiki markup language. I found that I can convert XML with XML_Transformer. yes it's very simple to do but I don't know I can convert XHTML to Wiki with XML_Transformer too? if you know any other PEAR package that can helps me to convert XHTML to Wiki let me know about that or if you have experiences with XML_Transformer please help me! Regards, Armen Transforming XHTML into Wiki markup is something lot of people would like to have.
Big value but very hard task. I would say the complexity is very high and unfortunately still overcomes the added value. It should be clear from the beginning it's impossible to do it for: * 100% of the contents , depending on the wiki , not all XHTML features are translatable , far from it. * 100% of the ways to write XHTML , for example , you can specify a link in very different ways , but that different ways should be converted in a single wiki markup. That means , you can never hope to get a full converter but only some partial automatization which would still need some human intervention , or would at least produce some "garbage"... Only very simple XHTML could be fully converted. Now, for the ways , it's an evidence that can only be achieved through some xml parsing , I mean no text parsing. What first needs to have your XHTML as conformant XML , but tidy can do it. For the parser , I would not rely on some unmaintained package ... then better use XSLT. No joke , I would use basic XML_Parser ... I guess some easier means exist , but I feear you need to to go down so raw in the interpretation. Naturally , for such back rendering , I would use some way of tokenized intermediate form , as does Text_Wiki , so the machine is re-usable. High value , heavy investment :) à+ -- toggg

« previous php.pear.general (#23957) next »