frankframework / frank-doc

Frank!Doc
https://frankdoc.frankframework.org
Apache License 2.0
4 stars 5 forks source link

The XSDs do not flag unsupported forwards #70

Open mhdirkse opened 2 years ago

mhdirkse commented 2 years ago

Each pipe prescribes what forward names are allowed. For example, the XsltPipe supports forward names "SUCCESS" and "EXCEPTION". No error is produced however if an XsltPipe has a forward with another name. This is true for every pipe: forwards with unsupported names do not produce errors.

I am sure that we can implement this in XML Schema 1.0. We can define the <Forward> element within a pipe using an <xs:element> within the complex type of the pipe. If we define the forward differently within different pipes, we can have different constraints for the name attributes of the forwards. Or we can define different types for the <Forward> element that we reference in the definitions of the different pipe elements. In any case, we also have to take care of the generic element option. A <Pipe> element with a className attribute cannot have forwards that have their name checked.

I expect that a more intelligent solution is possible with XML Schema 1.1. I think so after reading https://www.altova.com/blog/what-s-new-in-xml-schema-11/#:~:text=XML%20Schema%201.1%20allows%20you,complex%20type%20in%20the%20schema.&text=Above%20are%20some%20of%20the,%3Aerror%20datatype%2C%20and%20others., but did not investigate any further.

mhdirkse commented 2 years ago

I made up this issue when editing an example configuration in the Frank!Manual. I had difficulty sorting out when to have forward name FAILURE, when ERROR and when EXCEPTION. Support from the XML Schema would be helpful.