diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2008-11-03 15:37:23 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2008-11-03 15:37:23 +0000 |
commit | 705970570728dc8349a15e0e98837b5f896385be (patch) | |
tree | 094e286ed34016da187dee515427a66caa4ff662 /java | |
parent | a46f9b3773b5c74da6e03dbac6037474ed75ab60 (diff) |
Add import/export.resource to the contributions schema. However it seems that our contribution schema is in the wrong place and the extension elements are in the wrong namespace. I'll open JIRA.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@710084 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
3 files changed, 24 insertions, 5 deletions
diff --git a/java/sca/itest/validation/src/main/resources/contribution/resource/AttributeURIMissing/META-INF/sca-contribution.xml b/java/sca/itest/validation/src/main/resources/contribution/resource/AttributeURIMissing/META-INF/sca-contribution.xml index 8a2a1a23be..d3ce4d91c1 100644 --- a/java/sca/itest/validation/src/main/resources/contribution/resource/AttributeURIMissing/META-INF/sca-contribution.xml +++ b/java/sca/itest/validation/src/main/resources/contribution/resource/AttributeURIMissing/META-INF/sca-contribution.xml @@ -18,7 +18,6 @@ * under the License. --> <contribution xmlns="http://www.osoa.org/xmlns/sca/1.0" - targetNamespace="http://calc" xmlns:calc="http://calc"> <deployable composite="calc:Calculator"/> <import.resource xmlns="http://www.osoa.org/xmlns/sca/1.0"/> diff --git a/java/sca/itest/validation/src/test/java/contribution/resource/AttributeURIMissingTestCase.java b/java/sca/itest/validation/src/test/java/contribution/resource/AttributeURIMissingTestCase.java index 69c4d40bc7..b01ec2a254 100644 --- a/java/sca/itest/validation/src/test/java/contribution/resource/AttributeURIMissingTestCase.java +++ b/java/sca/itest/validation/src/test/java/contribution/resource/AttributeURIMissingTestCase.java @@ -52,7 +52,7 @@ public class AttributeURIMissingTestCase extends TestCase { public void testCalculator() { Monitor monitor = customDomain.getMonitorInstance(); - Problem problem = ((DefaultLoggingMonitorImpl)monitor).getProblems().get(0); + Problem problem = ((DefaultLoggingMonitorImpl)monitor).getProblems().get(2); assertNotNull(problem); assertEquals("AttributeURIMissing", problem.getMessageId()); diff --git a/java/sca/modules/assembly-xsd/src/main/resources/sca-contributions.xsd b/java/sca/modules/assembly-xsd/src/main/resources/sca-contributions.xsd index a22d8ac075..a0dbbf4c73 100644 --- a/java/sca/modules/assembly-xsd/src/main/resources/sca-contributions.xsd +++ b/java/sca/modules/assembly-xsd/src/main/resources/sca-contributions.xsd @@ -11,8 +11,8 @@ <complexType name="ContributionType"> <sequence> <element name="deployable" type="sca:DeployableType" minOccurs="1" maxOccurs="unbounded"/> - <element name="import" type="sca:ImportType" minOccurs="0" maxOccurs="unbounded"/> - <element name="export" type="sca:ExportType" minOccurs="0" maxOccurs="unbounded"/> + <element ref="sca:import" minOccurs="0" maxOccurs="unbounded"/> + <element ref="sca:export" minOccurs="0" maxOccurs="unbounded"/> <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> </sequence> <anyAttribute namespace="##other" processContents="lax"/> @@ -26,6 +26,7 @@ <anyAttribute namespace="##other" processContents="lax"/> </complexType> + <element name="import" type="sca:ImportType"/> <complexType name="ImportType"> <sequence> <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> @@ -35,11 +36,30 @@ <anyAttribute namespace="##other" processContents="lax"/> </complexType> + <element name="export" type="sca:ExportType"/> <complexType name="ExportType"> <sequence> <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/> </sequence> <attribute name="namespace" type="string" use="required"/> <anyAttribute namespace="##other" processContents="lax"/> - </complexType> + </complexType> + + <element name="import.resource" type="sca:ImportResourceType" substitutionGroup="sca:import"/> + <complexType name="ImportResourceType"> + <complexContent> + <extension base="sca:ImportType"> + <attribute name="uri" type="anyURI" use="optional"/> + </extension> + </complexContent> + </complexType> + + <element name="export.resource" type="sca:ExportResourceType" substitutionGroup="sca:export"/> + <complexType name="ExportResourceType"> + <complexContent> + <extension base="sca:ExportType"> + <attribute name="uri" type="anyURI" use="optional"/> + </extension> + </complexContent> + </complexType> </schema>
\ No newline at end of file |