XML + XSLT for views, performance considerations?

I’m in the process of building an application and are looking in to using XML + XSLT for the presentation of the views in the database.

I’m fairly new to XML but I’m reading up on the subject. As I understand it always(?) downloads the entire XML document before processing it with XSLT. All though you don’t have to go back to the server again for sorting/search etc for a large view the download time could be quite large?

In my case I will write the XML tags myself, not using ReadViewEntries, to minimize the size of the file. But still, the view could contain several thousands of documents.

Also wouldn’t this put a heavy strain on the server as, from what I’ve gathered, you have to use an agent to present the information to the browser? Witch means, get the XML file from the view in to the agent, process it with the XSLT and spit out the corresponding HTML. Seems lika an awful lot of work compared to using normal HTML based Domino views.

Also the idea that each time a user requests a view they’re triggering an agent doesn’t appeal to me. I would like to have it as with HTML + CSS, present the XML and style it with XSLT (wich is cached) on the client. But this is’nt possible is it? You have to use an agent to do this?

Brings me to my next queestion: Witch is faster? Java or LotusScript? I won’t be doing anything else then styling the XML with the XSLT. I know Java is more powerful but my knowledge in that field is a bit limited.

Sorry about rambling on. Any input and pointer would be highly appreciated.

Thanks!

/Joacim Boive

Subject: XML + XSLT for views, performance considerations?

I have never tested this performancewise, so there I suggest you just try and see. But it is possible to use the transformNode in the XMLDOM in Javascript, something like this:

function ImportXML(XMLPath)

{

	if (document.implementation && document.implementation.createDocument)

	{

 		//Mozilla

 			xmlDOC = document.implementation.createDocument("", "doc", null);

 			xmlDOC.async = false;

 			xmlDOC.load(XMLPath);

	}

	else if (window.ActiveXObject)

	{

 		//IE

			 xmlDOC = new ActiveXObject("Microsoft.XMLDOM");

 			xmlDOC.async = false;

 			xmlDOC.load(XMLPath);

	}

	else

	{

		alert('Your browser does not support XML scripting. Please upgrade to IE5.0');

 			return;

	}

	return xmlDOC;

}

function loadD(DocId){

	xmlDoc = ImportXML('response?readviewentries&RestrictToCategory='+DocId);

	xslDoc = ImportXML('Response.xsl');

	document.getElementById('d'+DocId).innerHTML =xmlDoc.transformNode(xslDoc);

}

Hope this helps:)

Bjorn Cintra

Subject: XML + XSLT for views, performance considerations?

I have an OpenNTF project that will do this for you. Take a look here > OpenNTF.org - Project snapshot: Domino Web Tools

It does everything client side and is supported in IE and Mozilla based browsers. Even works on the Mac if you’re using a Mozilla based browser. Safari will be supported soon as well. Does not, however, work in IE for the Mac. But then again, Microsoft is no longer supporting IE for the Mac.

Again, since this is done all client-side in the browser, there aren’t any agent involved and thus no impact on the server. Additionally, you don’t need to write your own xml views. Just use Domino designer to design the views and this code will give you better html views than what Domino gives.

Try it out and let me know what you think.

Jack

http://jackratcliff.com