1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
|
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http:///org.eclipse.emf.test.models/XSDDefaults.ecore"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:defaults="http:///org.eclipse.emf.test.models/XSDDefaults.ecore"
ecore:package="org.eclipse.emf.test.tools.genmodel.xsddefaults" ecore:nsPrefix="xsddefaults">
<xsd:annotation>
<xsd:appinfo source="http://www.eclipse.org/emf/2002/GenModel" ecore:key="prefix">XSDDefaults</xsd:appinfo>
</xsd:annotation>
<xsd:element name="BigElement">
<xsd:complexType>
<xsd:attribute name="boolean1" type="xsd:boolean">
<xsd:annotation>
<xsd:appinfo source="http://www.eclipse.org/emf/GenModelTest" ecore:key="staticDefaultValue">false</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="boolean2" type="xsd:boolean" default="1">
<xsd:annotation>
<xsd:appinfo source="http://www.eclipse.org/emf/GenModelTest" ecore:key="staticDefaultValue">true</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="string1" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://www.eclipse.org/emf/GenModelTest" ecore:key="staticDefaultValue">null</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="string2" type="xsd:string" default="nothing">
<xsd:annotation>
<xsd:appinfo source="http://www.eclipse.org/emf/GenModelTest" ecore:key="staticDefaultValue">"nothing"</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="date1" type="xsd:date">
<xsd:annotation>
<xsd:appinfo source="http://www.eclipse.org/emf/GenModelTest" ecore:key="staticDefaultValue">null</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="date2" type="xsd:date" default="2007-01-26">
<xsd:annotation>
<xsd:appinfo source="http://www.eclipse.org/emf/GenModelTest" ecore:key="staticDefaultValue">XMLTypeFactory.eINSTANCE.createFromString(XMLTypePackage.eINSTANCE.getDate(), "2007-01-26")</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="nmToken1" type="xsd:NMTOKEN">
<xsd:annotation>
<xsd:appinfo source="http://www.eclipse.org/emf/GenModelTest" ecore:key="staticDefaultValue">null</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="nmToken2" type="xsd:NMTOKEN" default="foo">
<xsd:annotation>
<xsd:appinfo source="http://www.eclipse.org/emf/GenModelTest" ecore:key="staticDefaultValue">"foo"</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="nmTokens1" type="xsd:NMTOKENS">
<xsd:annotation>
<xsd:appinfo source="http://www.eclipse.org/emf/GenModelTest" ecore:key="staticDefaultValue">null</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="nmTokens2" type="xsd:NMTOKENS" default="foo bar baz">
<xsd:annotation>
<xsd:appinfo source="http://www.eclipse.org/emf/GenModelTest" ecore:key="staticDefaultValue">(List)XMLTypeFactory.eINSTANCE.createFromString(XMLTypePackage.eINSTANCE.getNMTOKENS(), "foo bar baz")</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="anySimpleType1" type="xsd:anySimpleType">
<xsd:annotation>
<xsd:appinfo source="http://www.eclipse.org/emf/GenModelTest" ecore:key="staticDefaultValue">null</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="anySimpleType2" type="xsd:anySimpleType" default="nothing">
<xsd:annotation>
<xsd:appinfo source="http://www.eclipse.org/emf/GenModelTest" ecore:key="staticDefaultValue">"nothing"</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="myBoolean1" type="defaults:MyBoolean">
<xsd:annotation>
<xsd:appinfo source="http://www.eclipse.org/emf/GenModelTest" ecore:key="staticDefaultValue">false</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="myBoolean2" type="defaults:MyBoolean" default="1">
<xsd:annotation>
<xsd:appinfo source="http://www.eclipse.org/emf/GenModelTest" ecore:key="staticDefaultValue">true</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="myString1" type="defaults:MyString">
<xsd:annotation>
<xsd:appinfo source="http://www.eclipse.org/emf/GenModelTest" ecore:key="staticDefaultValue">null</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="myString2" type="defaults:MyString" default="my value">
<xsd:annotation>
<xsd:appinfo source="http://www.eclipse.org/emf/GenModelTest" ecore:key="staticDefaultValue">"my value"</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="myDate1" type="defaults:MyDate">
<xsd:annotation>
<xsd:appinfo source="http://www.eclipse.org/emf/GenModelTest" ecore:key="staticDefaultValue">null</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="myDate2" type="defaults:MyDate" default="2000-01-01">
<xsd:annotation>
<xsd:appinfo source="http://www.eclipse.org/emf/GenModelTest" ecore:key="staticDefaultValue">XSDDefaultsFactory.eINSTANCE.createFromString(XSDDefaultsPackage.eINSTANCE.getMyDate(), "2000-01-01")</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
</xsd:complexType>
</xsd:element>
<xsd:simpleType name="MyBoolean">
<xsd:restriction base="xsd:boolean">
<xsd:pattern value="[01]"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="MyString">
<xsd:restriction base="xsd:string">
<xsd:pattern value="[Mm][Yy].*"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="MyDate">
<xsd:restriction base="xsd:date">
<xsd:pattern value="2[0-9]{3}-[0-9]{2}-[0-9]{2}"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>
|