Jump to content

javascript and xslt

Guest burnettryan

Recommended Posts

Guest burnettryan

I am having a problem with using xslt/xsl/xml and javascript. I am trying to dynamically display some data from an XML file using javascript. This following is the function call:function displayText_HTML(display){anch = document.createElement("a");newText = document.createTextNode('<xsl:value-of select="Procedures/Procedure/Question/Name"/>');anch.appendChild(document.createElement("br"));anch.appendChild(newText);document.getElementById("body").appendChild(anch);}The problem is that when i call this function when it is declared inside of the *.xsl document (e.g. <script />) I get the correct output; get_mouse, but when the funciton is declared inside of a javascript file (*.js) I get the following output:<xsl:value-of select="Procedures/Procedure/Question/Name"/>Does anyone have any idea of how to get the 2 functions to return the same value? How to execute an xsl statement inside of a *.js file?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...