[xsd-users] Attribute "final" error

Boris Kolpackov boris at codesynthesis.com
Thu Oct 4 05:12:12 EDT 2007


Hi Henry,

Ngu, Henry C <henry_c.ngu at lamrc.com> writes:

> But the same schemas worked without any error (no need to remove the
> attribute 'final') when I generated the code using a trial version
> of Liquid technology.

That's because Liquid's product does not perform proper error checking.
Here is a declaration for local complex type from the XML Schema
specification, Part 1, Appendix A, "Schema for Schemas (normative)"[1]:


 <xs:complexType name="localComplexType">
    <xs:complexContent>
      <xs:restriction base="xs:complexType">
        <xs:sequence>
          <xs:element ref="xs:annotation" minOccurs="0"/>
          <xs:group ref="xs:complexTypeModel"/>
        </xs:sequence>
        <xs:attribute name="name" use="prohibited"/>
        <xs:attribute name="abstract" use="prohibited"/>
        <xs:attribute name="final" use="prohibited"/>
        <xs:attribute name="block" use="prohibited"/>
        <xs:anyAttribute namespace="##other" processContents="lax"/>
      </xs:restriction>
    </xs:complexContent>
  </xs:complexType>

As you can see, the use of the final attribute is prohibited.

[1] http://www.w3.org/TR/xmlschema-1/#normative-schemaSchema

Boris




More information about the xsd-users mailing list