Computers, Programming, Technology, Web Programming, XML

Using XHTML, XSLT and XForms for Xemplorary performance

Alliteration and bad pun. Good start πŸ™‚

One of the features the language app will need is some sort of module editor. Although the XML format of the scripts is straightforward to anyone used to hand editing HTML, a lot of other people will not have a clue. Therefore a WYSIWIG would be a cool addition. And lots of X’s may be the way to go.

Although XForm support in browsers isn’t exactly stellar, the fact that only script editors will require means that needing a plug-in or extension isn’t such a big thing. And I get brownie points for being Web 2.0 as well.

I’m going to assume you know what XForms and XSLT are. If you don’t, then go find out. I’ll probably explain in a future post, but for now just accept them as “cool” πŸ˜›

Basically a module is included directly into the XHTML source of the page. The only change is the addition of a namespace declaration (which are normally absent from the modules). XSLT is then used to add some nice formatting to the conversation along with XForm stuff for editing (including adding/removing elements). This makes the server side code really easy since the whole XML of the module gets posted back to the server.

In theory the XSLT shouldn’t be needed since XForms can do repeating and stuff. The only problem is I don’t think it can handle recursion which is a bit of a limitation.

There is one bit of the XSL that I’m stuck on there. I have the XML fragment in the head of the XHTML document. I need to be able to transform a copy of it and place it in the document body, but keep the original intact in the head. Does anyone have an XSL snippet to do that?

XForms, XSL, XSLT, Web2, Web 2.0, AJAX, HTML, XHTML, CSS

Advertisements

One thought on “Using XHTML, XSLT and XForms for Xemplorary performance

  1. Oliver,

    You are right, xforms:repeat does not support recursion, although it does support nesting, so you could use XSLT to produce XForms including xforms:repeat.

    Also note that you don’t need plugins to run XForms if you use something like Orbeon PresentationServer (OPS) which implements XForms on top of Ajax (OPS is open source, see http://www.orbeon.com/).

    Cheers,

    -Erik

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s