| Summary: | ETFw feedback view plug-in does not handle a remote DTD file in the XML file | ||
|---|---|---|---|
| Product: | [Tools] PTP | Reporter: | Rui Liu <ruiliu> |
| Component: | ETFw | Assignee: | Beth Tibbitts <beth> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | beth |
| Version: | 5.0 | ||
| Target Milestone: | 5.0.1 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Rui Liu
Can you append a small test case e.g. a dtd i can put on a remote system e.g. that works with the 'sample' plugin?
As a test case, you can use the following "sample.xml" (obtained from the sample plug-in and inserted one DOCTYPE line) and "sample.dtd" files by putting them in the same directory:
sample.xml:
<?xml version="1.0"?>
<!DOCTYPE SampleXMLRoot SYSTEM "sample.dtd">
<SampleXMLRoot>
<MyItem name="main is here" parent="mysample" file="sample.c" function="main" lineNo="14" isFunction="true" id="0"/>
<MyItem name="loop is here" parent="mysample" file="sample.c" function="main" lineNo="16" isFunction="true" id="1"/>
<MyItem name="this is return" parent="mysample" file="sample.c" function="turkey" lineNo="19" isFunction="true" id="2"/>
<MyItem name="open brace" parent="braces" file="sample.c" function="turkey" lineNo="14" isFunction="true" id="3"/>
<MyItem name="close brace" parent="braces" file="sample.c" function="turkey" lineNo="18" isFunction="true" id="4"/>
</SampleXMLRoot>
sample.dtd:
<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT SampleXMLRoot (MyItem*)>
<!ELEMENT MyItem EMPTY >
<!ATTLIST MyItem
name CDATA #REQUIRED
parent CDATA #REQUIRED
file CDATA #REQUIRED
function CDATA #REQUIRED
lineNo CDATA #REQUIRED
isFunction ( true | false ) #REQUIRED
id CDATA #REQUIRED
>
Or you may put them into a different directory, and change the path of the DTD in the XML file. For example, put the "sample.dtd" file in "/usr/local/share/sample/", and change the DOCTYPE line in "sample.xml" to:
<!DOCTYPE SampleXMLRoot SYSTEM "/usr/local/share/sample/sample.dtd">
Thanks,
Rui
i have checked in this fix to the ptp_5_0 branch Tested the fix in the ptp_5_0 branch. In a remote C project, when a lively-generated PerfSuite XML file that has the DOCTYPE line containing the remote DTD file was selected, the fixed ETFw feedback plug-in correctly parsed the XML, found the first element, and dispatched to the PerfSuite plug-in. So the testing verified that this bug was fixed in the ptp_5_0 branch. fixed in ptp_5_0 branch. Will copy to HEAD soon too. this fix will be in ETFw 5.0.1 which will be in PTP SR1 5.0.2 (target milestone changed) Also fixed in HEAD. |