dScribe and XML

Frans Bouma send a very valid comment on the dScribe Template Editor:

Why didn't you go for XSL? The data it has to view can the be in XML, you simply convert the XML via the XSL to HTML and you view that. Works great and can be implemented easily, plus it's very flexible, you don't have to implement a custom parser.

Yes, why not XML ? A lot of reasons, the main one is the lack of time.

Creating XML and XSL files for many pages, with different templates for each section of each page is really time consuming.

Indeed I have already some XML projects I built and debug with XMLSpy, but it's a slow process. In Scoilnet every page is quite different from another, so I couldn't use XML in such short timeframe.

As I said before dScribe is really used now for Scoilnet, and when I start this project, I was already working on 5 or 6 others (don't remember exactly now ;-)).

I know it's a bit ridiculous to have one single guy like me doing everything, but it's quite challenging and I am not complaining.

I have indeed all the carrots you can give t a donkey, in my case the PCs and gizmos I reallly like to play with.

Most of the time, I feel like a kid in a candystore.

Anyway coming back to the point, XML is in my mind already for the next version of Scoilnet and obviously dScribe, in few months surely.

What I like actually is that I can experiment different things quickly, reinforce the definitions and the functions, and later I will certainly optimize and tune the performances.

 

4 Comments

  • You can add the XML at any time :) Build the XML for a page fragment when you want to view it, apply the XSL then and cache the result.



    You can for example build page fragments using elements (nested for example) which are the building blocks for the editor too. Say, you build the template for a simple news item. You add 3 elements to that item: header (text string), summary textblock and extended text (textblock). In XML this looks simple, and in the database you just store it in tables. When you want to create an editor for this, you can create an editor XSL, which is applied to the XML which is created on the fly and you have your editor. When you want to view it on page X, you apply the XSL for that item on page X, and another XSL for example on anotehr page, for example the front page where you only view the header and the summary element :)



    You can even do a lot of pre-calculation when you save the content of the item in teh editor: you can there apply all XSL's to the XML for all pages it is on and store that in the database too. Then, when viewing a page, you just have to retrieve the already generated HTML from the database and dump it in the page.

  • Hmmm Frans I have too some knowledge on XML, and I agree with you on a page level. But there for the moment I am going to have on a same page different sections with unstructured and structured data. Not sure I can handle this so easily with XML.

    A good example is this blog. If you look at the page, it's always the same structure. If you have a minute look at www.scoilnet.ie and you will surely understand what I mean. Some sections or blocks are also programming bricks, like the Resource Finder. They are built as user controls. The Interactive Poll is another one. I want tobe able for example to move all the sections around the place. How to achieve that easily and more important quickly (when you are alone to do everything)? I don't think it's realistic for the moment. But of course I have an open mind and if you have a bright idea let me know ;-)

  • In that case, programmed elements, than you have a point indeed. The XML / XSL stuff is how I build it in my ASP/COM based CMS CESys. I can imagine you'll keep xml out the door for now in favor of programmable objects. :)

  • It's quite difficult indeed to have portions of XML on the fly for any block in a page.

    It's possible but take time.

    Is CEsys is visble somwhere ?

Comments have been disabled for this content.