Reputation: 1941
I have a use case of generating a correct xml so this can be published to my users as a sample payload. I want to automate this process. Unfortunately the only input I have is a schematron file. This schematron is something we do not own. It is a third party file. But somehow is there a way to infer the xml from the schematron file? One option I was thinking is to have one base template xml, tun through the schematron and depending upon the errors, add/update/remove new elements from the xml. But the challenge there is inferring the meaning form the schematron is not reliable. I don't know if there are any other approaches here. Also I don't know if this problem is solvable.
Upvotes: 0
Views: 115
Reputation: 163262
I've deleted the saxon
tag from your question as it seems completely irrelevant.
Schematron is designed to enable you to define arbitrary predicates over your data, for example "every store in Portugal must be closed on Sundays".
I don't think there is any algorithmic way to generate data that conforms to such rules.
Upvotes: 0