i have an xml schema
<xs:complexType>
...
<xs:attribute ref="unaryOperator"></xs:attribute>
</xs:complexType>
<xs:attribute name="unaryOperator">
i try to use it in my xml file like this
<inv_constraint unaryOperator="not">
The editor gives me this error:
Description Resource Path Location Type [Xerces] cvc-complex-type.3.2.2: Attribute 'unaryOperator' is not allowed to appear in element 'inv_constraint'. @see: http://www.w3.org/TR/xmlschema-1/#cvc-complex-type abc.xml /prova line 28 XML Problem
the editor suggest i do it like this
<inv_constraint xmlns:ns1="http://abc/abcd" ns1:unaryOperator="not" >
if i don't use the ref in the xml schema and just copy paste the attribute instead of referencing it, then my xml file works,
so my question is how can i make valid my xml without that weird tag and keep the ref in the xml schema?