cancel
Showing results for 
Search instead for 
Did you mean: 

simpleContent and attributes in XSD

fikus
Champ in-the-making
Champ in-the-making
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.
1 REPLY 1

sethatrothbury
Champ in-the-making
Champ in-the-making
First thing that comes to mind would be to use a template to process the content you're entering to format it into the styling of your choice.