NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Report in xml

Hi,

 

I'd need quick advice on what woud be the best approach in my case.

 

The case is simple: I have to produce xml report and  I was given the xsd file.

 

What would be best approach to tackle this? To impose on TS to produce the report, according to xsd file, for me? 

0 Kudos
Message 1 of 4
(4,631 Views)

TestStand has no official support for XSD files. You can, however, try to use your XSD by replacing the XSL file for your XML report  with the XSD file. To do this, re-configure the report options. You can browse for XSL or any files as style sheet. So it should be possible to select the XSD there.

Essentially, the TS reporting mechanism simply adds the path to the file into the report file. This can look like:

<?xml-style sheet type="text/xsl" href="C:\Program Files\National Instruments\TestStand 2014\Components\Models\TestStandModels\StyleSheets\horizontal.xsl"?>

 

As i have no XSD available, i am not sure if that entry is created correctly for the browser to reference to the XSD correctly. It is possible that you have to modify the entry manually for it to work. If so, you might want to add this modification to your custom report plugin.

 

Norbert

 

EDIT: For more information look here. Reading the article, i would expect the XSD to be able to be converted to XSL if above mentioned method does not work.

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 4
(4,629 Views)

If it is not possible to directly use the .XSD file using the methods Norbert mentioned, there are two possible ways you could accomplish this:

 

A) Write a stylesheet to convert the XML from TestStand's format to the XML format you need


B) Write a custom report plugin in TestStand to generate the XML in the format you need

 

If the desired report format is mostly similar to one of the TestStand reports, I would try to start with the first approach, since it will likely require less development effort than creating a custom plugin. The advantage to a custom plugin is that you gain more flexibility in the report generation.

 

Hope it helps!

0 Kudos
Message 3 of 4
(4,595 Views)

Daniel,

 

Thanks for your reply.

 

Could you please indicate examples how to do this from both starting points?

 

Sorry for this basic request but I've never touch this matter, and google returns a lot of convert engines but only between different types of data, not xml to xml directly.

 

And how to write plugin for TestStand?

0 Kudos
Message 4 of 4
(4,457 Views)