Forum Moderators: phranque

Message Too Old, No Replies

XHTML generating CMS

do you have to sacrifice good clean code for features?

         

bill

8:14 am on Dec 5, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I've been digging around the CMS market for a bit now and at some stage I'm actually going to have to commit to something ;). I've recently been looking at some of the CMS systems designed for larger corporate sites (both open source and $¥€) and notice that not a lot of them are pushing the envelope in terms of W3C compliant XHTML/CSS code. It seems to me that the bigger and more feature packed you get the less possible it is to output the cleaner code that a number of the freebie-open source-blog types now do.

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?

bakedjake

3:31 pm on Dec 5, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



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.

choster

3:48 pm on Dec 5, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't know anything about the specific package you referenced, but I think it is certainly true that code compliance is not a priority for most enterprise CMS developers-- two of the three top vendors in the high-end WCMS space don't even provide a DOCTYPE on their home pages.

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.

bedlam

6:35 pm on Dec 5, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hey Bill,

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.

bill

7:14 am on Dec 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Thanks bakedjake. I'm going to have to take a deeper look at synkron.

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 finished
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?

bedlam

7:27 pm on Dec 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



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

choster

8:17 pm on Dec 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



To clarify my first post, I would have loved if the system outputted <p>text</p><p>more text</p>. Instead, we got <p></p>text<p></p>text<p></p>.