[
http://issues.apache.org/jira/browse/TUSCANY-503?page=comments#action_12418353
]
Yang ZHONG commented on TUSCANY-503:
------------------------------------
Test code (& the new API usage example):
public final class SubstitutionValues extends junit.framework.TestCase
{
public void test () throws java.io.IOException
{
java.net.URL url = SubstitutionValues.class.getClassLoader().getResource(
"SubstitutionValues.xsd");
XSDHelper.INSTANCE.define( url.openStream(), url.toString());
// IOException may be thrown
final DataObject object = DataFactory.INSTANCE.create(
"http://www.apache.org/tuscany/SubstitutionValues", "Module");
final Type type = object.getType();
assertNotNull( SDOUtil.getSubstitutionValues( object, type.getProperty(
"implementation")));
assertNull( SDOUtil.getSubstitutionValues( object, type.getProperty(
"nonSubstitutionHead")));
}
}
Test XSD:
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.apache.org/tuscany/SubstitutionValues"
xmlns:sca="http://www.apache.org/tuscany/SubstitutionValues">
<element name="implementation" type="string"/>
<complexType name="Module">
<sequence>
<element ref="sca:implementation"/>
<element name="nonSubstitutionHead" type="string"/>
</sequence>
</complexType>
<element name="implementation.java" type="string"
substitutionGroup="sca:implementation"/>
</schema>
> XSD substitution support in SDO2
> --------------------------------
>
> Key: TUSCANY-503
> URL: http://issues.apache.org/jira/browse/TUSCANY-503
> Project: Tuscany
> Type: New Feature
> Components: Java SDO Implementation
> Environment: Java
> Reporter: Yang ZHONG
> Priority: Minor
> Attachments: patch&test.zip
>
> Copied from eMail thread "Question about XSD substitution support in SDO2"
> (http://www.mail-archive.com/tuscany-dev%40ws.apache.org/msg03963.html):
> Raymond Feng
> Tue, 13 Jun 2006 16:43:09 -0700
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]