|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: partial load of xml documents
Supposing you have an id for each node, when it is clicked all you have
to do is check whether its child nodes have been loaded and if not, load
them (one level at a time). You can easily pass the node ID to your
server app (with an XMLHttpRequest object or using an XML documents
.load method) which should return the first level children of the node.
Now, if your structure is something like <div> <ul> <li id="n1" onclick="loadChildren(this)">bla</li> </div> then, with Sarissa[1], that would be as easy as function loadChildren(oElem){ if(oElem.getElementsByTagName("*").length = 0){ Sarissa.updateContentFromURI("/childNodes/load.do?id="+oElem.id, oElem, transformer); }; }; Where transformer is an XSLTProcessor object. You can easily tell your server app to transform for you if a client side XSLT does not apply. [1] http://sarissa.sourceforge.net hth, Manos crvelin@xxxxxx wrote: I'm working on examples of expandable/collapsible tree's. At some examples
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








