econex |
Newbie |
|
|
|
|
None Specified |
|
Thursday, May 4, 2017 |
Monday, May 8, 2017 3:55:43 AM |
3 [0.02% of all post / 0.00 posts per day] |
|
Question is, how to produce syntactically valid output with Altova generated code? Are there recommended techniques? Is the use of original XSD mandatory alongside with the code? Or all relevant info on sequences is already present inside the code? Which external tools can be used to fix sequences? XSLT? XQuery?
|
This looks as a serious limitation. By default, unless tedious precautions are taken, which are not controlled or even described by code generated by Altova, generated code emits invalid XML not passing simple basic XSD validation.
Is there at all a way to know correct sequences from code itself? Is there at least a guarantee that class fields appear in generated code exactly in the correct sequence described in XSD?
|
I ve tried to use XMLSpy to generate C# code out of my XSD schema. Then I ve used the code to create a new document and add there some elements. Then I passed resulting XML for validation and it failed.
My schema contains many xsd:sequence elements. When I add document elements through generated code, I do it it in arbitrary order according to program logic. Naturally, I would expect that generated code will observe XSD and re-arrange added elements on XML output. Instead, it outputs all elements in their order of addition, which makes XML invalid against XSD provided.
It looks as a critical issue, which will block us from choosing XMLSpy for our development tasks. How to resolve this problem? Thank you in advance.
|
|