diff options
Diffstat (limited to 'java/sca')
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 |