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

Java Development

Reply
New Contributor
Posts: 3
Registered: ‎02-19-2013
My Device: 8520
My Carrier: vodafone

BrowserField with XSLT

I am working on a application in which i need to show .xsl file in BrowserField. I tried with .html file and is working fine but when i try to load local .xsl file BrowserField shows complete code of xsl file. 

 

  I will be thankful if some guide me on this.

 

Thanks & Regards

    

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: BrowserField with XSLT

This document:

http://docs.blackberry.com/en/developers/deliverables/18168/BlackBerry_Browser-Feature_and_Technical...

Suggests xslt is supported in OS 6.0 Browser however this

http://docs.blackberry.com/en/developers/deliverables/11844/BB_Browser_content_support_by_version_43...

 for OS 5.0 and earlier suggests it is not supported. 

 

What OS are you testing with?

New Contributor
Posts: 3
Registered: ‎02-19-2013
My Device: 8520
My Carrier: vodafone

Re: BrowserField with XSLT

Hi, Peter

 

    Thanks for Reply

 

    The links you provided suggest that Blackberry Browser supports xsl file but i wanted to know about BB BrowserFiled. Do you think all feature that Browser(BB) supports will be supported by BrowserField as well?

 

I tried with .html its rendering fine but while using .xsl file complete code is rendered instead...

 

Thanks again..

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: BrowserField with XSLT

I believe in OS 6.0, the BrowserField was rendered using the OS 5.0 Browser, so I doubt it is supported in OS 6.0.  But OS 7.0 should be OK,

 

Try it in the BrowserField and in the Browser and report what you find. 

 

You should be able to do this testing in the Simulator. 

New Contributor
Posts: 3
Registered: ‎02-19-2013
My Device: 8520
My Carrier: vodafone

Re: BrowserField with XSLT

Hi peter 

 

  I am testing on OS 7.1 simulator but things are same,still BrowserField shows complete code.

I didnt found a way to load local .xsl file on BB simulator browser directlly...

 

   Please let me know if you have any suggestion on same...

 

Thanks

Highlighted
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: BrowserField with XSLT

Since you are testing using 7.1, then I think it should work.  But not something I have ever looked seriously at.

 

Re passing it to a browserField, I suspect you will have to set the MIME type.  So you need to use the

displayContent(byte[] data, String contentType, String baseUrl)

method, and you will need to use the "application/xslt+xml" MIME Type, though "text/xml" or "application/xml" might work also and are worth a try if the official MIME Type doesn't work.

 

Re testing on BrowserField, start the MDS Simulator, and point the Browser at a page that you know to be XSLT.  Make sure the page loads correctly in a Browser first of course.