AnsweredAssumed Answered

simpleContent and attributes in XSD

Question asked by fikus on Jan 7, 2010
Latest reply on Mar 25, 2010 by sethatrothbury
I have an XSD describing documents like

<R>
    <T lang="en_US">
        Some text
    </T>
</R>

Notice that the element T has an attribute and text content.  The XSD for this looks like


<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

    <xs:element name="R">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="T">
                    <xs:complexType>
                        <xs:simpleContent>
                            <xs:extension base="xs:string">
                                <xs:attribute name="lang" type="xs:normalizedString"/>
                            </xs:extension>
                        </xs:simpleContent>
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>

</xs:schema>

My problem is that the generated web form does not have an entry for the lang attribute.  Is there any way to accomplish this without changing the structure of the XML?

I'm using Alfresco 3.1.1.

Outcomes