You can simple type element content by using the simpleContent element.
Here you can define an anonymous simple type:
<xs:complexType name="uriElement"> <xs:simpleContent> <xs:restriction base="my:absoluteURI"> <xs:pattern value="http://cde.berkeley.edu/.*"/> </xs:restriction> </xs:simpleContent> </xs:complexType> <xs:element name="uri" type="my:uriElement"/>
This still creates an anonymous type:
<xs:complexType name="uriElement"> <xs:simpleContent> <xs:restriction base="my:cdeURI"/> </xs:simpleContent> </xs:complexType> <xs:element name="uri" type="my:uriElement"/>
For the above, just use the simple type directly in the element declaration:
<xs:element name="uri" type="my:cdeURI"/>
This avoids the anonymous type and the unnecessary creation of a complex type.