Dynamic XSLT generation based on changes in XSD

Initially, I had a different XSD definition for each XSD . I had a set of XML files.

After some length of time there are some changes in the definition of XSD , so my saved XML no longer validates the new XSD .

For support, I need to write XSLT and make changes to my saved XML to validate the new XSD again.

Now in this scenario, every time the XSD changes, I need to write XSLT manually, how can I dynamically generate this XSLT . p>

Currently, I can compare old and new XSDs and get a list of changes using the Microsoft.XmlDiffPatch DLL .

Based on these changes, I need to generate XSLT using C #.

+5
source share
1 answer

I don’t know what your question is, but I think it is technically possible.

Perhaps it would be easier to just write some C # code that reads the Xml and then adds it and returns it to a file / database / data store.

0
source

Source: https://habr.com/ru/post/1270417/


All Articles