NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Testand XML report namespace prefix

Hi,

I have generated XML reports (using the 'tr5_horizontal.xsl) from two different sequences. The report generation options are set using the 'ReportOptions' sequence file callback and as far as I can see, exactly same options are set for both sequences. However the actual XML reports generated are different. As you can see from the screenshot below, one of them (report on left hand side - LHS) has  prefixes for all the elements (Eg trc: TestResults , tr: Personnel etc.) whereas the other (report on right hand side - RHS) just has the namespace Universal Resource Identifier (URI) for the prefixes (trc, tr etc) defined in the top level element but the prefix is not used in the child elements.

My questions are:

1. Is there some setting in the teststand Report Generation options that could potentially enable/ disable these namespace prefixes in the XML report file.

2. According to the W3Schools XML namespace tutorial (https://www.w3schools.com/xml/xml_namespaces.asp ) the prefix need not be be added for every child element if a default namespace is to be used (default namespace URI is defined as xmlns:"URI")  and conversely if a prefix namespace  is defined, the prefix should be explicitly mentioned in all child elements (atleast this is what all the examples show). 

So, does this mean that the XML report generated by teststand (RHS) is not as per the XML standard?

 

Version of teststand: 2014

 

Testand_XML_Report.PNG

 

Thanks and Regards,

Supreeth

Thanks and Regards,
Supreeth.K

0 Kudos
Message 1 of 3
(2,164 Views)

Can you provide any more detail on what settings you used to generate the two cases you've shown?

 

Thanks,

Trent

https://www.linkedin.com/in/trentweaver
0 Kudos
Message 2 of 3
(2,120 Views)

Hi WireWeaver,

Thanks for your reply. Sorry, I have forgotten this post for some time.

On looking deeper into our setup, I figured out that the file on the left is how TestStand generates the report (with the namespaces).

We invoke the sequence through an automation script. This script also had lines of code which looked through the report file and removed the namespaces. This is how I was ending up with the file on the right. Because I was not expecting the invoke script to mess with the report generated, i didnt look carefully (lesson learnt for next time: Whenever you inherit code, go through it with a fine-tooth comb!)

 

Thanks and Regards,

Supreeth

 

Thanks and Regards,
Supreeth.K

Message 3 of 3
(1,991 Views)