diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2008-12-15 15:44:27 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2008-12-15 15:44:27 +0000 |
commit | 7a2bf0d1581171a38220e3d4775fc430f92d8b09 (patch) | |
tree | 6f663ebde0a0a9c39d7c1ad423808a69359469cc /branches/sca-java-1.x/modules/assembly-xsd/src/main/resources/sca-contributions.xsd | |
parent | dca2ad000553723f9e0883611e4accfbc79b4482 (diff) |
Modify the contribution schema to demonstrate how extensibility could be implemented. Still using the OSOA namespace here.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@726718 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.x/modules/assembly-xsd/src/main/resources/sca-contributions.xsd')
-rw-r--r-- | branches/sca-java-1.x/modules/assembly-xsd/src/main/resources/sca-contributions.xsd | 50 |
1 files changed, 30 insertions, 20 deletions
diff --git a/branches/sca-java-1.x/modules/assembly-xsd/src/main/resources/sca-contributions.xsd b/branches/sca-java-1.x/modules/assembly-xsd/src/main/resources/sca-contributions.xsd index f4f1037eb1..2da2fedb1f 100644 --- a/branches/sca-java-1.x/modules/assembly-xsd/src/main/resources/sca-contributions.xsd +++ b/branches/sca-java-1.x/modules/assembly-xsd/src/main/resources/sca-contributions.xsd @@ -3,23 +3,17 @@ <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.osoa.org/xmlns/sca/1.0" xmlns:sca="http://www.osoa.org/xmlns/sca/1.0" - xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0" elementFormDefault="qualified"> <include schemaLocation="sca-core.xsd"/> - <import namespace="http://tuscany.apache.org/xmlns/sca/1.0" schemaLocation="tuscany-sca-contributions.xsd"/> <element name="contribution" type="sca:ContributionType"/> <complexType name="ContributionType"> - <sequence> - <element name="deployable" type="sca:DeployableType" minOccurs="0" maxOccurs="unbounded"/> + <sequence> <choice minOccurs="0" maxOccurs="unbounded"> - <element name="import" type="sca:ImportType"/> - <element name="export" type="sca:ExportType"/> - <element name="import.java" type="t:ImportJavaType"/> - <element name="export.java" type="t:ExportJavaType"/> - <element name="import.resource" type="t:ImportResourceType"/> - <element name="export.resource" type="t:ExportResourceType"/> + <element name="deployable" type="sca:DeployableType" minOccurs="0" maxOccurs="unbounded"/> + <element ref="sca:baseImport"/> + <element ref="sca:baseExport"/> </choice> <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> </sequence> @@ -32,24 +26,40 @@ </sequence> <attribute name="composite" type="QName" use="required"/> <anyAttribute namespace="##other" processContents="lax"/> - </complexType> - - <element name="import" type="sca:ImportType"/> - <complexType name="ImportType"> + </complexType> + + <element name="baseImport" type="sca:BaseImportType" abstract="true"/> + <complexType name="BaseImportType" abstract="true"> <sequence> <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> </sequence> - <attribute name="namespace" type="string" use="required"/> <attribute name="location" type="anyURI" use="optional"/> <anyAttribute namespace="##other" processContents="lax"/> - </complexType> + </complexType> - <element name="export" type="sca:ExportType"/> - <complexType name="ExportType"> + <element name="import" type="sca:ImportType" substitutionGroup="sca:baseImport"/> + <complexType name="ImportType"> + <complexContent> + <extension base="sca:BaseImportType"> + <attribute name="namespace" type="string" use="required"/> + </extension> + </complexContent> + </complexType> + + <element name="baseExport" type="sca:BaseExportType" abstract="true"/> + <complexType name="BaseExportType" abstract="true"> <sequence> <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> </sequence> - <attribute name="namespace" type="string" use="required"/> <anyAttribute namespace="##other" processContents="lax"/> + </complexType> + + <element name="export" type="sca:ExportType" substitutionGroup="sca:baseExport"/> + <complexType name="ExportType"> + <complexContent> + <extension base="sca:BaseExportType"> + <attribute name="namespace" type="string" use="required"/> + </extension> + </complexContent> </complexType> -</schema> +</schema>
\ No newline at end of file |