[ 
https://issues.apache.org/jira/browse/TUSCANY-800?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Amita Vadhavkar updated TUSCANY-800:
------------------------------------

    Attachment: JIRA-800-Mar23-Amita.jar

Hi Luciano,
Please see the note included in attachment for brief status.
I tried shifting the xslt code from java to js, but does not work. Using 
loadXML(var)
gives -  object doesn't support this property or method - error in js. I am 
pasting below the last tries I had on ajax.js - relevant portion. The 
attachment in JIRA - is a working code where xslt work is done by servlet. 
Could see some issues mentioned around loadXML() on the internet, but could not 
get to any solution till now... 
_________________________________________________________________
function resultHandler() {
if (req.readystate == 4) {
  if (req.status == 200) {
  //var message = req.responseText; //WORKS WHEN java does xslt
  //msg.innerHTML = message; //WORKS WHEN java does xslt

  //BELOW, does not work - take it from req or hardcode a str
  //ONLY works when xml file load() is called
  //some problem with loadXML()???
  //var message = req.responseText;
  var message = "<?xml version='1.0' >"+
  message = message + "<root   
xmlns:das='http://org.apache.tuscany.das.rdb/config.xsd'xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>";
  message = message + "<das:DataGraphRoot>";
  message = message + "<COMPANY ID='0' NAME='Mega Corp'>";
  message = message + "<EOTMID xsi:nil='true'/>";
  message = message + "</COMPANY>";
  message = message + "</das:DataGraphRoot>";
  message = message + "</root>";
                        
  alert(message);
                        
  // Load XML 
  var xml = new ActiveXObject("Microsoft.XMLDOM")
  //xml.async = false
  //xml.load("company.xml") //this WORKS
  xml.loadXML(message);
                
 // Load XSL
  var xsl = new ActiveXObject("Microsoft.XMLDOM")
  xsl.async = false
  xsl.load("company.xsl")
        
 // Transform
 document.getElementById("msg").innerHTML = xml.transformNode(xsl)
 alert(xml.transformNode(xsl));                 
                        
  }
} 

> Introduce new DAS Sample APP to demonstrate DAS advanced features
> -----------------------------------------------------------------
>
>                 Key: TUSCANY-800
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-800
>             Project: Tuscany
>          Issue Type: New Feature
>          Components: Java DAS Samples
>    Affects Versions: Java-SCA-Future
>            Reporter: Luciano Resende
>         Assigned To: Luciano Resende
>             Fix For: Java-DAS-Mx
>
>         Attachments: ajaxDAS.lresende.20061005.zip, JIRA-800-Mar23-Amita.jar
>
>
> Introduce a new DAS sample app to demonstrate DAS advanced features.
> This sample app uses AJAX to perform all the DAS interactions with the 
> persistence store (e.g case derby in tomcat) and an SDO graph is returned 
> back to UI and XSLT transformation is performed to present the data to user.
> Possible improvements to this would be to integrate OCC, and other advanced 
> DAS features into the sample.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to