Hey Andrew:

You could probably setup a postfilter to remove the gplusone element and
add a g:plusone element in  it place. (I believe I had a postfilter doing
something very similar for FAR/AIM, it's probably still around.)

For the pages in question, are you generating HTML pages or XHTML pages? As
far as I know, namespaces aren't valid in documents that aren't XHTML. Can
you see if switching the output fixes it?

-- 
#Terin Stock


On Tue, Jun 12, 2012 at 11:19 AM, Andrew Crites <ajcri...@gmail.com> wrote:

> 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/
>
>
> _______________________________________________
> PHPTAL mailing list
> PHPTAL@lists.motion-twin.com
> http://lists.motion-twin.com/mailman/listinfo/phptal
>
>
_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to