Forum Moderators: phranque
For example, I was looking at TYPO3 for the umpteenth time the other day, and although their feature set has a lot that I want I don't see anywhere on their site where any way I could output clean XHTML. If I want to control multiple sites, in multiple languages, with multiple users and a variety of permission levels do I have to give up on my pretty code? Without making my own, is there any off-the-shelf solution that has this?
Without making my own, is there any off-the-shelf solution that has this?
:-/ It's a tough topic, bill. To do this, you'd almost have to make validation the last step in the process before the content was generated. Then, what would you do if it wasn't? Throw it out?
There's been a couple of posts about this on cms-list, each time resulting in no good solutions using off the shelf systems. I remember back in 2000 or 2001 a couple of products were mentioned that were SGML based, so you might have some luck if you searched the archives and went that route with a document parser or something similar.
That being said, synkron (at synkron.dk) makes a lot of effort to comply with accessibility standards, and I know it is farily flexible with regards to its templates. You might want to give it a look; while I can't speak from personal experience with it, I have had a couple of people comment to me that it was very good at generating clean code. It's a package I've been meaning to take a look at but haven't gotten around to yet.
Why don't they? Because it's not a priority for most of their customers, either. A CMS is a content management system, an friendly mechanism for extracting content and data and reassembling them. Even if its code produced perfect markup, it would not be able to rewrite bad markup in underlying content-- and have you ever taken a look at the average newsfeed? What about your hundred-thousand-item legacy database with all those <font> tags to format text, or the corporate division which doesn't see why it needs to change its system for producing XYZ content to suit your development priorities?
Since the content itself can't be worried about, considerations like authentication and personalization management regimes, XML languages, database vs. file system storage philosophies, and price take priority. What's more, the programmers developing the presentation layer often don't have a grasp of standards, either. One package we looked at inserted <p></p> for every carriage return entered into the editing applet.
What we ended up doing in a couple of cases is essentially bypassing most of the built-in presentation layer, using the CMS' XSLT engine or reconfiguring it to avoid nested tables and such. Depending on the license and the complexity of the package, you'll probably end up doing the same.
I've been using Typo3 for over a year, and you're right about the current version; it's no picnic to generate xhtml compliant code. However, it is possible to come very close. Between Tidy (which can be integrated with the rendering engine) and "config.xhtml_cleaning = all" in your base template you can make most of the markup xhtml-ok (i.e. it will place "/" in unclosed tags, insert missing 'alt' attributes, lower-case tags, etc).
By thoughtful re-design of the templates used to generate the content-items, you can eliminate a most of the remaining problems. This doesn't mean hacking the source: there is administrator-level access to virtually all rendering. It would mean quite a bit of work though ;-) Note that in the current version (3.5) the doctype is hardcoded.
But the next version is due (according to a post on the mailing list this morning) 'in the next few weeks'. It is supposed to have better xhtml support, and the "CSS-Styled-Content" plugin will supposedly be finished (perhaps a rumour?). This is the plugin (a proof of concept already exists, it just does not render every content-type) that renders content only with css.
There is also an optional extension to the TypoScript system in the works that will supposedly require all output to be xhtml compliant. Search the typo3.org mail list archive for "object oriented typoscript" (without the quotes).
One package we looked at inserted <p></p> for every carriage return entered into the editing applet.
Choster- if you mean it inserted a paragraph each time the enter/return key was pressed, that's normal. Every word processing application does that: Word, Open Office, Dreamweaver etc. A line break is usually shift-return.
-B
PS - Bill, sticky me if you still can't find the 'config' option for xhtml compliant rendering, or if you want a clue about where to look in the massive [!] typo3 collection of documentation.
Why don't they? Because it's not a priority for most of their customers, either.That's very true. I've been talking with a number of non-web people about this and the general consensus is 'if standards were that important wouldn't the big popular CMS packages support standards?'
At this point I'm willing to look at a package that at least has future plans to introduce standards compliant code in the hopes that someday I'll be able to get this. It still surprises me that a lot of the small open source projects can offer smaller scale CMS packages and get away with compliant or nearly-compliant code, while the big guys seem to be pumping out old FrontPage code.
TYPO3...But the next version is due (according to a post on the mailing list this morning) 'in the next few weeks'. It is supposed to have better xhtml support, and the "CSS-Styled-Content" plugin will supposedly be finishedThat might be worth waiting for as their package has a lot going for it in terms of features. Is their development team fairly reliable in terms of following up on such rumors?
That might be worth waiting for as their package has a lot going for it in terms of features. Is their development team fairly reliable in terms of following up on such rumors?
I dunno if I'd put off work that I had today to wait for the new release, but my experience with that project is that they deliver on their promises. Incidentally, in the current 3.6 dev release (which is not a final release), it's already possible to configure the header properly for xhtml output. Using that plus xhtml 'cleaning' and Tidy, I have pages that are 2 or 3 (minor) errors from xhtml 1.0 transitional validation.
By the way, I don't know if it suits your purposes, but the Xaraya project is also working towards xhtml compliance (though I'm not real familiar with the setup).
-B