[TYPO3-mvc] RFC: New comments in FLUID
Jigal van Hemert
jigal at xs4all.nl
Wed Feb 29 21:21:56 CET 2012
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
--
Kind regards / met vriendelijke groet,
Jigal van Hemert.
More information about the TYPO3-project-typo3v4mvc
mailing list