xml - Mixed Type XSD Validation help -


I have been working to build an XSD to validate the given XML, my issue is that something XML elements are the form

1234567

I need to create an XSD which does not consider the element 'value' as attribute, so with my much limited experience in the creation of XSD (I have read the W3C tutorial) Tried

  & lt; Xs: element name = "ElementName" type = "xs: int" & gt; & Lt; X: complex type blended = "true" & gt; & Lt; Xs: attribute name = "description" type = "x: string" /> & Lt; / XS: complexType & gt; & Lt; / XS: element & gt;  

And lo and behold ... it does not work, it says:

"Type attribute with either simple type or complex type Can not be present "

I'm sure this is something stupid I did, but no other answer / misinterpretation could be found!

Thank you in advance

There are some different types of mixed content Requires a complex type with:

  & lt; Xs: element name = "ElementName" & gt; & Lt; XS: complexType & gt; & Lt; XS: simpleContent & gt; & Lt; X: extension base = "x: int" & gt; & Lt; Xs: attribute name = "description" type = "x: string" /> & Lt; / XS: Expansion & gt; & Lt; / XS: simpleContent & gt; & Lt; / XS: complexType & gt; & Lt; / XS: element & gt;  

See also:


Comments