Can I do this with Castor??
 
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <xsd:simpleType name="AppEventType">
            <xsd:restriction base="xsd:token">
                <xsd:enumeration value="PropertyEvent"/>
                <xsd:enumeration value="ComponentEvent"/>
            </xsd:restriction>
        </xsd:simpleType>
        <xsd:complexType name="ApplicationEventType" abstract="true">
            <xsd:sequence>
                <xsd:element name="type" type="AppEventType"/>
            </xsd:sequence>
        </xsd:complexType>
        <xsd:complexType name="BasePropertyEventType" abstract="true">
            <xsd:complexContent>
                <xsd:extension base="ApplicationEventType">
                    <xsd:sequence>
                        <xsd:element name="propertyName" type="xsd:string"/>
                        <xsd:element name="propertyValue" type="xsd:string"/>
                    </xsd:sequence>
                </xsd:extension>
            </xsd:complexContent>
        </xsd:complexType>
        <xsd:complexType name="PropertyEventType">
            <xsd:complexContent>
                <xsd:restriction base="BasePropertyEventType">
                    <xsd:sequence>
                        <xsd:element name="type" type="AppEventType" fixed="PropertyEvent"/>
                        <xsd:element name="propertyName" type="xsd:string"/>
                        <xsd:element name="propertyValue" type="xsd:string"/>
                    </xsd:sequence>
                </xsd:restriction>
            </xsd:complexContent>
        </xsd:complexType>
</xsd:schema>
 
I am trying to come up with some derived types that have the "type" field set to specific values.
 
 
Eric
732-949-7424 - Office
732-310-1839 - Personal Cell
mailto:[EMAIL PROTECTED]
 
----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-user

Reply via email to