Asynchonous content

XML format

WebApp.Net uses a simple XML definition for its asynchronous content and provides the following features:

Document Type Definition

The current version use the following DTD. The compatibility with previous version is, for now, guaranteed.

<!-- Document root -->

[!ELEMENT root (title?, go?, script? (part+|(destination, data)))]
[!ELEMENT part (destination, data)]

<!-- Set the title of the "set" layer -->

[!ELEMENT title (#PCDATA)]
[!ATTLIST title set ID #REQUIRED]

<!-- Tell the framework to go to the "to" layer (parameters allowed) -->

[!ELEMENT go EMPTY]
[!ATTLIST go to CDATA #REQUIRED]

<!-- What to do with the data -->

[!ENTITY % Mode "(append|replace|before|after|self)"]
[!ELEMENT destination EMPTY]
[!ATTLIST destination
	mode	%Mode;	#REQUIRED
	zone	ID	#REQUIRED
	create	(true)	#IMPLIED]

<!-- The content to "mode" to the "zone" -->

[!ELEMENT data (#PCDATA)]

<!-- Script to execute after loading the layers -->

[!ELEMENT script (#PCDATA)]
TODO: sample code

Older versions

You can check if your asynchronous responses are valid with the current version of the micro-framework using the Compatibility DTD. But you may update them to the lastest version as soon as possible to limit the amount of required changes from a version to another. Older DTDs are still available to let you understand what have changed between versions.


Changes History
20081003v0.3.9CAScript execution
20080609v0.3.0CA Added XML <title> tag to change title from within asynchronous response
Added XML <go> tag to tell the framework where to go after an asynchronous request
Adjusted asynchronous response format so that we can render multiple parts of the page at a time
Added ability to create layers dynamically
Added "self|before|after" destination mode (to ease incremental lists, ...)
Saturday, 20-Jun-2009 14:40:41 CEST