Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
New Developer
Posts: 2
Registered: ‎09-23-2012
My Device: 9300
My Carrier: 66854160888

How can I use XSL on OS5?

it's working on OS 6+  But on OS5 it's just white screen.

 

this my code.   anybody can help me?  thank you.

 

 

function getUrlVars() {
var vars = {};
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
vars[key] = value;
});
return vars;
}


function loadGroup()
{

var cid = getUrlVars()["cid"];


xhttp = new XMLHttpRequest();
xhttp.open("GET","xml/progroup.xml",false);
xhttp.send("");
var xmlDoc = xhttp.responseXML;

xhttp.open("GET","xml/progroup.xsl",false);
xhttp.send("");
var xsl = xhttp.responseXML;

var x = xmlDoc.getElementsByTagName("RECORD");


xsltProcessor=new XSLTProcessor();

xsltProcessor.importStylesheet(xsl);
xsltProcessor.setParameter(null,"cid",cid);

resultDocument = xsltProcessor.transformToFragment(xmlDoc,document);


document.getElementById("list-progroup").appendChild(resultDocument);

 

}

Highlighted
Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: How can I use XSL on OS5?

I haven't been able to find specific documentation on XSLTProcessor; is this a part of the W3C spec or can you provide a link to documentation on it?

There is a rather large difference between the proprietary browser on OS5 and the WebKit implementation on OS6+. My gut says that this is going to be a matter of browser support, and that the OS5 browser may not have this functionality.

But if you can provide a little more information on the XSLTPRocesser, that should help shed some light on this.

Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.