summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.4/modules
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2008-12-15 15:54:22 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2008-12-15 15:54:22 +0000
commita7f21afc22b3d682bb3b5ffc03bc0f11a90091fe (patch)
tree781eee64bd034b5c2b0ae88af6d1e3770231c80b /branches/sca-java-1.4/modules
parent7a2bf0d1581171a38220e3d4775fc430f92d8b09 (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@726721 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.4/modules')
-rw-r--r--branches/sca-java-1.4/modules/assembly-xsd/src/main/resources/sca-contributions.xsd46
-rw-r--r--branches/sca-java-1.4/modules/assembly-xsd/src/main/resources/sca.xsd3
-rw-r--r--branches/sca-java-1.4/modules/assembly-xsd/src/main/resources/tuscany-sca-contributions.xsd59
-rw-r--r--branches/sca-java-1.4/modules/assembly-xsd/src/main/resources/tuscany-sca.xsd2
4 files changed, 57 insertions, 53 deletions
diff --git a/branches/sca-java-1.4/modules/assembly-xsd/src/main/resources/sca-contributions.xsd b/branches/sca-java-1.4/modules/assembly-xsd/src/main/resources/sca-contributions.xsd
index d1e6f69f37..2da2fedb1f 100644
--- a/branches/sca-java-1.4/modules/assembly-xsd/src/main/resources/sca-contributions.xsd
+++ b/branches/sca-java-1.4/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>
<choice minOccurs="0" maxOccurs="unbounded">
- <element name="deployable" type="sca:DeployableType" 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> \ No newline at end of file
diff --git a/branches/sca-java-1.4/modules/assembly-xsd/src/main/resources/sca.xsd b/branches/sca-java-1.4/modules/assembly-xsd/src/main/resources/sca.xsd
index e4471a4f51..b4eae28bfe 100644
--- a/branches/sca-java-1.4/modules/assembly-xsd/src/main/resources/sca.xsd
+++ b/branches/sca-java-1.4/modules/assembly-xsd/src/main/resources/sca.xsd
@@ -17,8 +17,7 @@
<include schemaLocation="sca-binding-sca.xsd"/>
<include schemaLocation="sca-contributions.xsd"/>
-
- <include schemaLocation="sca-contributions.xsd"/>
+ <include schemaLocation="tuscany-sca-contributions.xsd"/>
<include schemaLocation="sca-definitions.xsd"/>
<include schemaLocation="sca-policy.xsd"/>
diff --git a/branches/sca-java-1.4/modules/assembly-xsd/src/main/resources/tuscany-sca-contributions.xsd b/branches/sca-java-1.4/modules/assembly-xsd/src/main/resources/tuscany-sca-contributions.xsd
index d8ee19af03..20385e7f2c 100644
--- a/branches/sca-java-1.4/modules/assembly-xsd/src/main/resources/tuscany-sca-contributions.xsd
+++ b/branches/sca-java-1.4/modules/assembly-xsd/src/main/resources/tuscany-sca-contributions.xsd
@@ -18,50 +18,45 @@
* under the License.
-->
<schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://tuscany.apache.org/xmlns/sca/1.0"
+ 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">
- <element name="import.resource" type="t:ImportResourceType"/>
+ <include schemaLocation="sca-contributions.xsd"/>
+
+ <element name="import.resource" type="sca:ImportResourceType" substitutionGroup="sca:baseImport"/>
<complexType name="ImportResourceType">
- <sequence>
- <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="namespace" type="string" use="optional"/>
- <attribute name="location" type="anyURI" use="optional"/>
- <attribute name="uri" type="anyURI" use="required"/>
- <anyAttribute namespace="##other" processContents="lax"/>
+ <complexContent>
+ <extension base="sca:BaseImportType">
+ <attribute name="uri" type="anyURI" use="required"/>
+ </extension>
+ </complexContent>
</complexType>
- <element name="export.resource" type="t:ExportResourceType"/>
+ <element name="export.resource" type="sca:ExportResourceType" substitutionGroup="sca:baseExport"/>
<complexType name="ExportResourceType">
- <sequence>
- <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="namespace" type="string" use="optional"/>
- <attribute name="uri" type="anyURI" use="required"/>
- <anyAttribute namespace="##other" processContents="lax"/>
+ <complexContent>
+ <extension base="sca:BaseExportType">
+ <attribute name="uri" type="anyURI" use="required"/>
+ </extension>
+ </complexContent>
</complexType>
- <element name="import.java" type="t:ImportJavaType"/>
+ <element name="import.java" type="sca:ImportJavaType" substitutionGroup="sca:baseImport"/>
<complexType name="ImportJavaType">
- <sequence>
- <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="namespace" type="string" use="optional"/>
- <attribute name="location" type="anyURI" use="optional"/>
- <attribute name="package" type="string" use="required"/>
- <anyAttribute namespace="##other" processContents="lax"/>
+ <complexContent>
+ <extension base="sca:BaseImportType">
+ <attribute name="package" type="string" use="required"/>
+ </extension>
+ </complexContent>
</complexType>
- <element name="export.java" type="t:ExportJavaType"/>
+ <element name="export.java" type="sca:ExportJavaType" substitutionGroup="sca:baseExport"/>
<complexType name="ExportJavaType">
- <sequence>
- <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="namespace" type="string" use="optional"/>
- <attribute name="package" type="string" use="required"/>
- <anyAttribute namespace="##other" processContents="lax"/>
+ <complexContent>
+ <extension base="sca:BaseExportType">
+ <attribute name="package" type="string" use="required"/>
+ </extension>
+ </complexContent>
</complexType>
</schema>
diff --git a/branches/sca-java-1.4/modules/assembly-xsd/src/main/resources/tuscany-sca.xsd b/branches/sca-java-1.4/modules/assembly-xsd/src/main/resources/tuscany-sca.xsd
index a02c76459f..5b85038126 100644
--- a/branches/sca-java-1.4/modules/assembly-xsd/src/main/resources/tuscany-sca.xsd
+++ b/branches/sca-java-1.4/modules/assembly-xsd/src/main/resources/tuscany-sca.xsd
@@ -46,6 +46,6 @@
<include schemaLocation="tuscany-sca-implementation-widget.xsd"/>
<include schemaLocation="tuscany-sca-implementation-xquery.xsd"/>
- <include schemaLocation="tuscany-sca-contributions.xsd"/>
+ <import namespace="http://www.osoa.org/xmlns/sca/1.0" schemaLocation="tuscany-sca-contributions.xsd"/>
</schema> \ No newline at end of file