- From: Pablo Nieto Caride <pablo.nieto@linguaserve.com>
- Date: Fri, 23 Nov 2012 10:39:13 +0100
- To: "'Karl Fritsche'" <karl.fritsche@cocomore.com>, <public-multilingualweb-lt@w3.org>
Thanks Karl, I think I'll go for http://about.validator.nu/htmlparser/ or option 2, since Jirka also said that Tidy is dangerous. Cheers, Pablo. -----Mensaje original----- De: Karl Fritsche [mailto:karl.fritsche@cocomore.com] Enviado el: viernes, 23 de noviembre de 2012 9:53 Para: public-multilingualweb-lt@w3.org Asunto: Re: XHTML Namespace problems with PHP Hi Pablo, all, I tried Tidy on my side, but got into the Problem, that Tidy removes the <its:rules>-Tag completely. Even if I registered the its Namespace, so be careful with the Tidy package. On the other side as you have the a valid HTML there are no <its:rules> inside it, so you could use it. I only wanted to make sure that I have a valid XHTML before sending it, thats why I tried to use Tidy. Cheers, Karl On 22.11.2012 20:15, Jirka Kosek wrote: > On 22.11.2012 19:39, Pablo Nieto Caride wrote: > >> I don’t know if somebody has encountered the same problem, in that >> case, is there a solution? I can’t find any apart from removing the >> namespaces when doing the xpath query. I read also that a solution >> might be turn the HTML into XHTML with the PHP Tidy extension, but I’m not sure. > I see two possibilities: > > 1. Convert HTML to XHTML prior loading into DOM. PHP Tidy extension > could be used for this, but it's not as robust as HTML parser > (http://about.validator.nu/htmlparser/) -- which can be invoked even > fro PHP using Java bridge > > 2. Modify DOM after loading HTML -- you can walk over complete DOM > tree and create new copy with namespace of elements set XHTML. This > can be done in PHP or you can implement it in XSLT. > > Jirka >
Received on Friday, 23 November 2012 09:39:42 UTC