leehaut opened a new pull request, #8954:
URL: https://github.com/apache/hop/pull/8954

   ## What changed
   `DtdValidator.check()` (workflow Verify, F7):
   - Pass the bean property names `"xmlFilename"` and `"dtdFilename"` to 
`ActionValidatorUtils.validate`. The previous calls passed the filename values 
stored in those fields.
   - Resolve those filenames with the workflow variable space passed into 
`check()`, so `${Internal.Entry.Current.Folder}` is available during Verify.
   - Skip the external DTD file when `dtdIntern` is `Y`. `execute()` already 
treats that DTD as internal to the XML file.
   ## What this fixes
   Verify never read `xmlFilename` or `dtdFilename`. It looked up a bean 
property named after the path, so a configured file still failed Check. The 
remark was `Unable to validate. Reason: .../dummy.xml` or `<path> cannot be 
null or blank`, and the same happened for the DTD path.
   An internal DTD (`dtdIntern=Y`) does not use an external DTD file at 
runtime, but Check always validated `dtdFilename`. A blank external DTD failed 
Verify, and a null value aborted the whole workflow check.
   ## Unit tests
   
`plugins/actions/xml/src/test/java/org/apache/hop/workflow/actions/xml/dtdvalidator/DtdValidatorCheckTest.java`:
   - `variablePathIsNotUsedAsPropertyName` — XML and DTD paths that contain 
`${Internal.Entry.Current.Directory}` and point at existing files produce no 
Check error. The path string is not used as a property name.
   - `internalDtdDoesNotRequireExternalDtdFile` — `dtdIntern=Y` and a null 
external DTD produce no Check error when the XML file exists.
   - `externalDtdBlankReportsTheBeanProperty` — `dtdIntern=N` and a null 
external DTD report `dtdFilename`, not the XML path.
   These tests were not run in this environment. Maven could not resolve 
`gitflow-incremental-builder` because the TLS certificate for Maven Central 
failed validation (`certificate_expired`).
   
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to