"mixing" simpleType and complexType

Hello list-users,

I need to "mix" simpleTypes and complexTypes. To be more precisely an 
example:

As result I need the following

<peculiar>Ω<subscript>2</subscript></peculiar>

where as the "Ω" should be from the unicode block "greek" and the "2" 
from the unicode block "superscriptsandsubscripts". The problem is that 
I defined a simpleType for both and I do not know how to nest them in an 
element "peculiar"? The "Ω" and the "2" should be tested if they are 
part of the unicode blocks.


    <xs:simpleType name="greekType">
        <xs:restriction base="xs:string">
            <xs:pattern value="\p{IsGreek}+"/>
        </xs:restriction>
    </xs:simpleType>

    <xs:simpleType name="subscriptType">
        <xs:restriction base="xs:string">
            <xs:pattern value="\p{IsSuperscriptsandSubscripts}+"/>
        </xs:restriction>
    </xs:simpleType>
   
    <xs:element name="peculiar">
        <xs:complexType>
            ???
        </xs:complexType>
    </xs:element>

I hope that the problem was described clearly :-)
Any hints are welcome. Thanks so much,

Andreas

Received on Friday, 25 July 2008 19:13:25 UTC