[TYPO3-mvc] RFC: New comments in FLUID

Michael Knoll mimi at kaktusteam.de
Wed Feb 29 23:16:39 CET 2012


Hi,

I'm not really sure about that - but I always thought, that FLUID 
templates ARE NOT WELL FORMED. At least namespace definitions in FLUID like

{namespace extlist=Tx_PtExtlist_ViewHelpers}

are not well-formed - or am I wrong?

Besides, <!--- ---> could easily be changed in something like #
<!--. .--> if that should really be the problem.

I guess most IDEs check for <!--.+?--> as being a comment, so it does 
not matter what browsers etc. take as well-formed, as there won't be any 
usage of this in browsers.

So where do you think this could be a problem? FLUID templates are not 
well formed and are not HTML5 compliant - as far as I see.

Greez

Mimi




Am 29.02.12 21:21, schrieb Jigal van Hemert:
> Hi,
>
> On 28-2-2012 15:16, Michael Knoll wrote:
>> just wanted to ask, what you think about the following idea on how to
>> add comments like <!--- ... ---> in Fluid template engine:
>
> That would make the Fluid template not well-formed in XML [1]:
>
> Comment ::= '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->'
>
> It will also be incorrect in other SGML documents [2] such as (X)HTML:
>
> A comment declaration consists of `<!' followed by zero or more comments
> followed by `>'. Each comment starts with `--' and includes all text up
> to and including the next occurrence of `--'.
>
> So, this special comment will be formed of:
> <! : tag open
> -- : comment begin
> .... : comment contents
> -- : comment end
> - : extra dash
>  > : tag close
>
> Also HTML5 doesn't allow it [3]:
>
> Comments must start with the four character sequence U+003C LESS-THAN
> SIGN, U+0021 EXCLAMATION MARK, U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS
> (<!--). Following this sequence, the comment may have text, with the
> additional restriction that the text must not start with a single U+003E
> GREATER-THAN SIGN character (>), nor start with a U+002D HYPHEN-MINUS
> character (-) followed by a U+003E GREATER-THAN SIGN (>) character, nor
> contain two consecutive U+002D HYPHEN-MINUS characters (--), nor end
> with a U+002D HYPHEN-MINUS character (-). Finally, the comment must be
> ended by the three character sequence U+002D HYPHEN-MINUS, U+002D
> HYPHEN-MINUS, U+003E GREATER-THAN SIGN (-->).
>
> The special comment has text which ends with a hyphen-minus followed by
> closing '-->'.
>
> [1] http://www.w3.org/TR/REC-xml/#sec-comments
> [2] http://www.w3.org/MarkUp/html-spec/html-spec_3.html#SEC3.2.5
> [3] http://www.w3.org/TR/html5/syntax.html#comments
>



More information about the TYPO3-project-typo3v4mvc mailing list