[TYPO3-dev] Just an idea: Markup Wrapper

JoH asenau info at cybercraft.de
Tue Oct 13 13:03:36 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.

Exactly this is what XML/ XSS has been made for.
Just make sure TYPO3 produces clean XHTML (which is just a subtype of XML
anyway) and make sure there are proper XSS setups to translate this XML to
anything you like.

You can even use this to map tags or get rid of certain attributes as well.
Anything which is not defined in XSS will just be ignored/removed.

We did something like that 2 years ago while "translating" a table based to
a more flexible div based layout, because the code of this non TYPO3-project
was written in completely procedural and nested spaghetti-style.
We didn't touch anything of the original code except validating the X(HT)ML
structure and just mapped the tags and attributes to match the new design.

Advantages:
+ You don't need any additional or proprietary markup - just valid X(HT)ML
will do the job.
+ XML and XSS are accepted worldwide standards because they have been
introduced by the W3C long time ago
+ There are working XML and XSS parsing functions available in PHP
+ You can introduce other XSS setups to create completely different markup
i.e. to export calendar data to iCal or the like
+ The XML/XSS interpreter can be run on completely different servers acting
as a real frontend, while the backend server will be delivering the same
X(HT)ML to each of them. Caching will be childs play with such a setup.

Just my other 5 cents

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
Xing: http://contact.cybercraft.de
Twitter: http://twitter.com/bunnyfield
TYPO3 cookbook (2nd edition): http://www.typo3experts.com






More information about the TYPO3-dev mailing list