PDA

View Full Version : A solution to mimic JS/Inline CSS/HTML using XML/etc.


dan.lugg
08-20-2009, 07:30 PM
What would be the most effective way to duplicate the effects achievable through Javascript, Inline CSS, and HTML, but using XML?

More specifically, I have already created a page written in HTML, that using several javascript functions and inline styles, acts like a windows-based desktop. The 'windows' are <div> tags, and are dynamically appended to the page based on user request. The <div> tags then, can be moved around the browser window, simulating the effect of a desktop environment. This is achieved through setting style attributes on the fly, triggered by events tied to the 'window' <div> and child components (child <div>s) of the 'window' <div>.

It works great in HTML, but how could I go about doing this in XML? I can't exactly use inline styles in the same manner, can I? I'm sort of new to the restrictions and advances through using XML so any advice would be appreciated.

ps: If it's the wrong forum, I apologize.

Arbitrator
08-21-2009, 01:28 AM
It works great in HTML, but how could I go about doing this in XML? I can't exactly use inline styles in the same manner, can I? I'm sort of new to the restrictions and advances through using XML so any advice would be appreciated.If you speak of using generic XML languages, I believe that you would embed the script using XLink and indirectly apply inline styles via XSL Formatting Objects (XSL-FO). Unfortunately, Web browser support for the former is poor and support for the latter is nonexistent.

You could, of course, create a document referencing elements from the XHTML namespace or other namespaces that support these things though.