It's all about the answers!

Ask a question

How can I access data from a ?stylesheet=true field? in RPE

Harrison Vince (35115) | asked Mar 28 '18, 9:27 p.m.
edited Mar 28 '18, 9:29 p.m.

 I need to report on the section names of a test plan in RPE. I can access these names using the URI:

this gives output that looks like this:
  <?xml version="1.0" encoding="UTF-8" ?> 
- <ns21:stylesheet xmlns:ns21="" ttp://" xmlns:ns6="" ..............>
- <ns2:sections>
<ns2:section id="" name="H1 INTRODUCTION" /> 
<ns2:section id="" name="H2 Overview" /> 
<ns2:section id="" name="H3 Purpose" /> 
<ns2:section id="" name="H4 Scope" /> 
<ns2:section id="" name="H5 Interrelationships" /> 
<ns2:section id="" name="H6 Referenced Documents" /> 
<ns2:section id="" name="H7 Abbreviations" /> 
<ns2:section id="" name="H8 Definitions" /> 
<ns2:section id="" name="H9 Document Preparation" /> 
<ns2:section id="" name="ANNEX A. Data Item Description Traceability" /> 
I cannot access this data because there is no stylesheet>sections>section value in any data source. I cannot use a URI without ?stylesheet=true because it does not give me the updated names (which have been modified throught DNG)

Accepted answer

permanent link
Subramanya Prasad Pilar (4.6k14) | answered Mar 29 '18, 2:53 a.m.

You need to edit qm.xsd schema so as to honor the dynamic sections. In RPE, you can open the schema in Editor and make the necessary changes. You should get the ID of your section (ex. "") and add the custom section definition inside these tags:<xs:element name="testplan">/<xs:complexType>/<xs:complexContent>/<xs:extension base="reportableArtifact">/<xs:sequence>

Insert the following:

<xs:element name="testplan">
            <xs:extension base="reportableArtifact">        
                    <xs:element maxOccurs="1" minOccurs="0" name="" type="xs:string">
                                <label>H1 INTRODUCTION</label>

Make sure that you insert the xml in the correct resource tag (<xs:element name="testplan">)
After saving the schema, testplan/dynamicSection_1519188863945 will return the data you are looking for.

Note that this data will be in JSON format and need to be parsed using JavaScript so.

Harrison Vince selected this answer as the correct answer

Your answer

Register or to post your answer.