I don't think we need either of:

* A new input mode
* Invalid output for compliance with Google's proprietary element.

There is a way to display a plusone button without using that element and
using valid HTML instead.

PHPTAL's HTML5 output is not as strict as I think it should be in that it
allows invalid elements and invalid nesting, but that would be a separate
discussion.  It may be good to be lenient on that too.

PHPTAL allows invalid input XML as well, but never mind.

What I think would be useful would be to have some directive that prevents
PHPTAL from doing any preprocessing on the input and outputs it raw.  I
think this makes sense since that can keep the DOM together and a hack
using variables like in my first email is not necessary.

Inside CDATA, html is escaped (unless the CDATA is inside script tags).  I
think it should be left alone.

I also like the idea of <tal:block tal:content="structure"> -- currently
that looks for a `structure` variable.  <tal:block tal:content="structure
default"> would do as well in my opinion, but the parser needs to know to
overlook the content.

On Tue, Jun 12, 2012 at 7:05 PM, Kornel Lesiński <kor...@geekhood.net>wrote:

> On Tue, 12 Jun 2012 21:50:15 +0100, Hisateru Tanaka <
> tanakahisat...@gmail.com> wrote:
>  In another branch I started to let PHPTAL allow using with illegal
>> namespace. See:
>> https://github.com/pornel/**PHPTAL/compare/html5_with_ns#**L4R97<https://github.com/pornel/PHPTAL/compare/html5_with_ns#L4R97>
> Thanks for fixing empty elements and HTML5 attributes!
> I think the namespace fix needs to handle some more cases:
> <xhtml:p xhtml="http://www.w3.org/1999/**xhtml<http://www.w3.org/1999/xhtml>
> "></xhtml:p>
> must be output in HTML5 mode as:
> <p></p>
> since that's a proper XHTML input from XML/DOM perspective. That's why the
> code was ignoring prefixes.
> I wouldn't mind if:
> <foo:p xhtml="http://example.com/**foons <http://example.com/foons>
> "></foo:p>
> was output as:
> <foo:p></foo:p>
> although it saddens me that's needed only for Google's invalid markup and
> now-deprecated FBML.
> I'm not so sure about xmlns attributes. The "http://www.w3.org/1999/xhtml";
> declaration is certainly not needed in HTML5. I think it may be better to
> omit other xmlns attributes too to avoid giving false impression that HTML5
> has namespaces. It only has tags with invalid ":" character in them and
> ignores xmlns attributes for compatibility with "polyglot" XHTML documents
> (but HTML5 mode is inappropriate for polyglot documents).
> Even in HTML5 output mode PHPTAL still is supposed to parse input as XML.
> As long as TAL claims to be XML-based language I think it should follow XML
> rule and require namespace declarations.
> Ignoring of namespace declarations would be appropriate if PHPTAL had
> HTML5 *input* mode (parse HTML5 and output it as either HTML5 or XHTML).
> --
> regards, Kornel Lesiński
> ______________________________**_________________
> PHPTAL mailing list
> PHPTAL@lists.motion-twin.com
> http://lists.motion-twin.com/**mailman/listinfo/phptal<http://lists.motion-twin.com/mailman/listinfo/phptal>

Andrew Crites
Chief of http://AySites.com/
PHPTAL mailing list

Reply via email to