2012/6/13 Andrew Crites <ajcri...@gmail.com>:
> It's known that when you have an element like:
>     <g:plusone size="medium" href="http://aysites.com/";></g:plusone>
> PHPTAL will throw an error ("There is no namespace declared...")
> You can solve this error simply by adding an `xmlns:g` attribute to the
> element or one of its ancestores.
> However, if you do that, PHPTAL will emit:
>     <plusone>...
> and drop the `g`.
> This is a problem the script for the Google plus one button will not be able
> to find the element since it's looking specifically for `<g:plusone>`
> (apparently).  This problem is probably not specific to the plus one button.
> My solution is to have something like:
>     <tal:block tal:content="structure plusonebutton"/>
> And `plusonebutton` in PHP code is the invalid XML `g:plusone` element, but
> this is ugly.
> Is there any way to have the element directly in the DOM and keep the `g:`
> prefix in PHPTAL and still have valid input XML?
> Barring that, is there any way to have invalid XML in the input and have
> PHPTAL skip parsing it and emit it raw (CDATA is escaped)?
> --
> Andrew Crites
> Chief of http://AySites.com/

In another branch I started to let PHPTAL allow using with illegal
namespace. See:

Under older implementation

<html xmlns="http://www.w3.org/1999/xhtml";>
  <x:head  xmlns:x="http://www.w3.org/1999/xhtml"/></html>

was changed to


... instead I think that it should be saved as is if in HTML5 mode.

Today HTML5 is used with XHTML's namespace syntax mixed. PHPTAL should
follow this trend rather than being strict, I think. How about?

Hisateru Tanaka

PHPTAL mailing list

Reply via email to