using xpath in xsd pattern matching?

Is it possible to use an attributes value as part of a pattern match?

eg xsd:

    <xs:element name="MyElement">
            <xs:element ref="SomeElement" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element name="MyTestElement">
                <xs:restriction base="xs:string">
                    <xs:pattern value="(Attribute name value) some other regex matching"/>
        <xs:attribute name="name" type="xs:string" use="required"/>

so basically the pattern match in MyTestElement should include the value of the outer elements name attribute, is this possible?

Source: xml

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.