Refreshing part of an XML/XSL page and JS

A

Anthony

My goal is to have an interactive web form where users can view
hierarchial data with the ability to add items to the system and have
just the part of the webpage that needs to be updated be refreshed.
However I've been working on it for a few days and still cant figure
out how to put it together.

task.xml - containing the XML data from a database
task.xsl - containing the transformation to turn the above XML data
into XHTML
task.js - JS code
partial.xml - containing XML data for a particular node in the XML
document above (task.xml) that I want to have updated (for demo
purposes, this is a static document)

I have explored the following methods (in order from easiest to most
difficult):
1. Try to use JS to update the XML document and have the browser
re-render it using XSL. I've come to the conclusion I cant do it this
way (at least with the knowledge and google-fu I have now).
2. Use a client side transformation using the transform tag inside the
partial XML and insert the appropriate XHTML node into the new page in
place of the old one. This resulted in nothing being rendered where the
updated information was supposed to be.
3. Use a server side transformation on the partial XML and insert the
root XHTML node into the new page in place of the old one. This
resulted in just the text elements within the XHTML to be rendered,
none of the other tags (DIVs, BRs, etc) were rendered.
4. Use responseText instead of responseXML, but I really really really
want to stay away from innerHTML. Plus, the text is just text and I
cant perform any node/element methods using it (which would be nice
down the road).

To see what code I have now:
http://24.234.139.244/stt/task.xml
http://24.234.139.244/stt/task.xsl
http://24.234.139.244/stt/task.js
http://24.234.139.244/stt/partial.xml

I'm looking for suggestions on how to implement the functionality I am
trying to write, I dont necessarily need line-for-line code (though if
you want to write it or point me to a place where its written already,
I wouldnt mind).

Thanks.

-Anthony
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top