Validate XML against XSD generated by Oxygen
Posted: Fri Aug 21, 2020 6:01 pm
Hello:
I use Oxygen to generate XSD. However, Oxygen hinted Error:
This predicament causes me to comment out below:
If I comment out the subsequent referenced schema in the orignial XML:
My Java API will fail the XSD validation, as the original XML referenced the import ns:
The Java API validation throws error:
I review below post but as the "CD" uses , it wouldn't work.
topic616.html
Do you have a realistic solution for this problem?
I use Oxygen to generate XSD. However, Oxygen hinted Error:
Code: Select all
The {target namespace} of an attribute declaration must not match 'http://www.w3.org/2001/XMLSchema-instance'.
Code: Select all
<xs:import namespace="http://www.w3.org/2001/XMLSchema-instance" schemaLocation="xsi.xsd"/>
Code: Select all
<xs:attribute ref="xsi:schemaLocation" use="required"/>
Code: Select all
<xs:attribute ref="xsi:type" use="required"/>
Code: Select all
<value nullFlavor="OTH" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CD">
Code: Select all
cvc-elt.4.2: Cannot resolve 'CD' to a type definition for element 'value'.
Code: Select all
xmlns:xsi
topic616.html
Do you have a realistic solution for this problem?