1. Richard Carrier
  2. PowerBuilder
  3. Thursday, 2 May 2024 16:08 PM UTC

Hello everyone and thanks in advance for any help .

 

We developed appeon application that generates xml for filing tax forms. Thay displays nicely using the new and latest webrowser2. 

We discoverd a sytly sheet that can be used with our xml but I'm not sure how to open the or view the xml and apply the sytle sheet (xsl) using the browser or some other method. Is this possible and if so can I get any clues on how to do it.

 

Thank You,

Richard Carrier

René Ullrich Accepted Answer Pending Moderation
  1. Friday, 3 May 2024 04:31 AM UTC
  2. PowerBuilder
  3. # 1

Hi Richard,

Usually you can use the xml-stylesheet processing instruction for this.

https://www.w3.org/Style/styling-XML.en.html

But I have not tested this with the webbrowser control.

HTN,

René

Comment
  1. Rafał Blecharz
  2. Wednesday, 11 September 2024 05:34 AM UTC
Hi

Good question. Such simple functionality and no built-in class in PowerBuilder?

I used C# in SnapDevelop and included the DLL solution in the application.



public class ABCUtility

{

public static int CreateHTMLFile(string as_pathtoXMLFile, string as_pathtoXSLTFile, string as_pathtoHTMLFile)

{

//TO DO use try

int li_ret = 0;



// Load the style sheet.

XslCompiledTransform xslt = new XslCompiledTransform();

xslt.Load(as_pathtoXSLTFile);



// Execute the transform and output the results to a file.

xslt.Transform(as_pathtoXMLFile, as_pathtoHTMLFile);



return li_ret;



}

}

  1. Helpful
There are no comments made yet.
Claudio Burns Accepted Answer Pending Moderation
  1. Friday, 3 May 2024 09:56 AM UTC
  2. PowerBuilder
  3. # 2

Hi, i use msxsl.exe to merge the xml file with the style sheet to generate an html file which can then be dispayed in the browser

 

like this : msxsl.exe xml_file style_shet  -o html_file

 

Hope this help

 

Claudio

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.