[TYPO3-dev] Just an idea: Markup Wrapper
Sebastian Gebhard
sebastian.gebhard at googlemail.com
Tue Oct 13 11:07:52 CEST 2009
Inspired by the discussion about "RFC: #11503: HTML5 doctype implementation"
and the lack of support of TYPO3 for valid HTML i came to this idea.
The markup of a TYPO3 page comes from different places like the page template,
TS settings, frontend-plugins, css_styled_content etc and is written down in
different formats like HTML Templates, TS-Wraps, hardcoded snippets in the core
and soon also Fluid Templates.
This shows that the overall markup is not very flexible, it's just impossible to
switch from a XHTML Website to a HTML Website.
My idea is to build an abstraction layer that allows to mark-up content independently
from the FE doctype.
Example1:
- Write [br] in the page template
- The Markup Wrapper will recognise all tags in [squared brackets]
- The Markup Wrapper will read config.doctype and generate the according markup
- It will return <br /> for XHTML doctypes and <br> for HTML doctypes
Example2:
- typoLink and all other core rendering features will create an [a] tag instead of <a>
- typoLink produces [a href="index.php?id=12&cHash=6786hsv4"]Linktext[/a]
- If doctype is xhtml_strict the Markup Wrapper will return <a href="index.php?id=12&cHash=6786hsv4">Linktext</a> else <a href="index.php?id=12&cHash=6786hsv4">Linktext</a>
Drawbacks:
- Invent a new markup language
- A lot of work to change all the markup in the typo3 world to that new markup language
Advantage:
- Full flexible doctype. You could change your Website's doctype with a single click
- New doctypes will be easy to implement. As the revival of HTML shows us: This can be a bug issue.
- A doctype other that xhtml_trans is difficult to accomplish by now, e.g. because extensions often generate XHTML Transitional Markup. With the wrapper the sites are indepentend from the extension markup doctype.
What do you think´?
More information about the TYPO3-dev
mailing list