JeremyYao opened a new issue, #1289:
URL: https://github.com/apache/daffodil-vscode/issues/1289

   ### Versions
   
   - 1.4.0 (VS Code marketplace install)
   - 1.4.1 rc1
   
   ### Description 
   
   If a launch.json configuration has file paths for the schema and/or data 
that are absolute paths. The generatedTDML.tdml file in the user's temp folder 
contains invalid paths. This affects TDML functionality like Copy TDML and 
Append TDML as it relies on the paths in generatedTDML.tdml being correct. 
   
   ### How I replicated the issue
   
   In your launch.json, have a configuration with absolute paths for data and 
the schema. My configuration item that I used looks like 
   ```JSON
   {
               "request": "launch",
               "type": "dfdl",
               "name": "Absolute_Path",
               "schema": {
                   "path": 
"c:\\Users\\jeremy.yao\\repos\\sampleWorkspace\\2_pass\\read_number.dfdl.xsd",
                   "rootName": null,
                   "rootNamespace": null
               },
               "data": 
"c:\\Users\\jeremy.yao\\repos\\sampleWorkspace\\2_pass\\6ints.txt",
               "debugServer": 4711,
               "infosetFormat": "xml",
               "infosetOutput": {
                   "type": "file",
                   "path": "${workspaceFolder}/target/infoset.xml"
               },
               "tdmlConfig": {
                   "action": "generate",
                   "name": "undefined",
                   "description": "undefined",
                   "path": "undefined"
               },
               "trace": true,
               "stopOnEntry": true,
               "useExistingServer": false,
               "openDataEditor": false,
               "openInfosetView": false,
               "openInfosetDiffView": false,
               "daffodilDebugClasspath": [],
               "dataEditor": {
                   "port": 7777,
                   "logging": {
                       "file": 
"${workspaceFolder}/dataEditor-${omegaEditPort}.log",
                       "level": "info"
                   }
               },
               "dfdlDebugger": {
                   "logging": {
                       "file": "${workspaceFolder}/daffodil-debugger.log",
                       "level": "INFO"
                   }
               }
           },
   ```
   
   The contents of my generatedTDML.tdml is 
   ```XML
   <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
   <ns1:testSuite xmlns:ns1="http://www.ibm.com/xmlns/dfdl/testData"; 
suiteName="Default Test Case" defaultRoundTrip="onePass">
       <ns1:parserTestCase name="Default Test Case" root="file" 
model="..\..\..\/c:/Users/jeremy.yao/repos/sampleWorkspace/2_pass/read_number.dfdl.xsd"
 roundTrip="onePass" description="Generated by DFDL VSCode Extension">
           <ns1:document>
               <ns1:documentPart 
type="file">..\..\..\/c:/Users/jeremy.yao/repos/sampleWorkspace/2_pass/6ints.txt</ns1:documentPart>
           </ns1:document>
           <ns1:infoset>
               <ns1:dfdlInfoset 
type="file">..\..\..\repos/sampleWorkspace/target/infoset.xml</ns1:dfdlInfoset>
           </ns1:infoset>
       </ns1:parserTestCase>
   </ns1:testSuite>
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@daffodil.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to