Subject: [xsl] Calling XML using Javascript From: "Nistala, Anu" <anistala@xxxxxxxxx> Date: Mon, 26 Nov 2007 16:13:33 -0600 |
Hi all, I have 5 different XML files with the similar structure as below, first I wanted to merge them and then perform my display actions, tried various ways, but it wasn't working out as intended and instead complicating the whole thing. So, now I have created radio buttons, on one of the 5 xml sheets and by default the first is selected, and if any other radio button is selected I have a javascript function for the onclick event of the radio group that is expected to call the xml file. Now the question is, is it even possible to do so and if so then how do I do it? The node names all match in all the xml files. Below is an example of one XML I have. Does anyone know how to call an xml from javascript to one xml or directly get data from the xmls to display in one web page? Thank you all for your help in advance.. <?xml-stylesheet type="text/xsl" href="todropdown.xsl"?> <functiontitle> <funcdef> <FunctionType>Navigation</FunctionType> <funcname >flNVGLogin</funcname> <funcdesc >This function logs into CMM app</funcdesc> <CreationDate>2:12 PM 11/14/2007</CreationDate> <Author>Anu Nistala</Author> </funcdef> - - - - - - </functiontitle> Part of the XSL Code is - - - - <tr> <input type="radio" name="ProjType" value="CMM" onclick="javascript:selectProject(this)" > CMM</input> <input type="radio" name="ProjType" value="CRR" onclick="javascript:selectProject(this)" > CRR </input> <input type="radio" name="ProjType" value="MIS" onclick="javascript:selectProject(this)" > MIS </input> <input type="radio" name="ProjType" value="MMS" onclick="javascript:selectProject(this)" > MMS </input> <input type="radio" name="ProjType" value="MPIM" onclick="javascript:selectProject(this)" > MPIM </input> <input id="ProjTypeButton" style="font-family:times" name="ProjTypeButton" type ="button" value="Select Project!"/> <hr align="center" width="100%"></hr> </tr> - - - - I need help with writing the function! function selectProject(proj) { alert ("Selected Project is " + proj.value); //<xsl:template match="/"> //<xsl:apply-templates select="//funcdef | document("path/funcdefs2.xml")//funcdef | //document("path/funcdefs3.xml")//funcdef | document("path/funcdefs4.xml")//funcdef | //document("path/funcdefs5.xml")//funcdef"/> //</xsl:template> } Thanks! Anu Nistala anistala@xxxxxxxxx 512 248 4535 (office) Nodal Integration Test Automation Electric Reliability Council of Texas, Inc.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Multiple XMLs and One XSL, Scott Trenda | Thread | RE: [xsl] Calling XML using Javascr, Nistala, Anu |
RE: [xsl] Grouping repeating elemen, Cynthia Arangua | Date | Re: [xsl] Converting a string to Up, Dimitre Novatchev |
Month |