|
Re: Help with ComplexTypes [message #43396 is a reply to message #43365] |
Tue, 04 May 2004 19:30 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
--------------FB882CCC9D80301CB79CFB57
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lance,
You must do this from the example code in order to create the syntactic
<simpleContent> "scaffolding":
XSDSimpleTypeDefinition anonymousSimpleTypeDefinition =
xsdFactory.createXSDSimpleTypeDefinition();
simpleContentComplexTypeDefinition.setContent(anonymousSimpl eTypeDefinition);
Lance Phillips wrote:
> I'm trying to create a complex type with simple content. I've copied the
> creation logic as close to exactly as possible from the XsdProtypicalSchema.
> However, when I write out my xsd it gets written out with complex content.
> Any ideas? Here is my code block...
>
> final XSDSimpleTypeDefinition xsdDt = resolveSimpleDatatype(eObject, value);
> if (xsdDt != null) {
>
> ((XSDComplexTypeDefinition)eObject).setDerivationMethod(XSDD erivationMethod.
> EXTENSION_LITERAL);
> ((XSDComplexTypeDefinition)eObject).setBaseTypeDefinition(xs dDt);
> ((XSDComplexTypeDefinition)eObject).setContent(xsdDt);
> }
>
> And here is the resulting ComplexType....
> <xs:complexType abstract="false" mixed="false" name="gYearMonth">
> <xs:complexContent>
> <xs:extension base="xs:gYearMonth">
> <xs:attributeGroup ref="Q1:commonAttributes"/>
> </xs:extension>
> </xs:complexContent>
> </xs:complexType>
>
> thanks,
>
> lp
--------------FB882CCC9D80301CB79CFB57
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Lance,
<p>You must do this from the example code in order to create the syntactic
<simpleContent> "scaffolding":
<blockquote>XSDSimpleTypeDefinition anonymousSimpleTypeDefinition = xsdFactory.createXSDSimpleTypeDefinition();
<br> simpleContentComplexTypeDefinition.setContent(anonymousSimpl eTypeDefinition); </blockquote>
<p><br>Lance Phillips wrote:
<blockquote TYPE=CITE>I'm trying to create a complex type with simple content.
I've copied the
<br>creation logic as close to exactly as possible from the XsdProtypicalSchema.
<br>However, when I write out my xsd it gets written out with complex content.
<br>Any ideas? Here is my code block...
<p>final XSDSimpleTypeDefinition xsdDt = resolveSimpleDatatype(eObject,
value);
<br>if (xsdDt != null) {
<p> ((XSDComplexTypeDefinition)eObject).setDerivationMethod(XSDD erivationMethod.
<br>EXTENSION_LITERAL);
<br> ((XSDComplexTypeDefinition)eObject).setBaseTypeDefinition(xs dDt);
<br> ((XSDComplexTypeDefinition)eObject).setContent(xsdDt);
<br>}
<p>And here is the resulting ComplexType....
<br><xs:complexType abstract="false" mixed="false" name="gYearMonth">
<br> <xs:complexContent>
<br> <xs:extension base="xs:gYearMonth">
<br>
<xs:attributeGroup ref="Q1:commonAttributes"/>
<br> </xs:extension>
<br> </xs:complexContent>
<br></xs:complexType>
<p>thanks,
<p>lp</blockquote>
</html>
--------------FB882CCC9D80301CB79CFB57--
|
|
|
|
Re: Help with ComplexTypes [message #586622 is a reply to message #43365] |
Tue, 04 May 2004 19:30 |
Ed Merks Messages: 33136 Registered: July 2009 |
Senior Member |
|
|
--------------FB882CCC9D80301CB79CFB57
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lance,
You must do this from the example code in order to create the syntactic
<simpleContent> "scaffolding":
XSDSimpleTypeDefinition anonymousSimpleTypeDefinition =
xsdFactory.createXSDSimpleTypeDefinition();
simpleContentComplexTypeDefinition.setContent(anonymousSimpl eTypeDefinition);
Lance Phillips wrote:
> I'm trying to create a complex type with simple content. I've copied the
> creation logic as close to exactly as possible from the XsdProtypicalSchema.
> However, when I write out my xsd it gets written out with complex content.
> Any ideas? Here is my code block...
>
> final XSDSimpleTypeDefinition xsdDt = resolveSimpleDatatype(eObject, value);
> if (xsdDt != null) {
>
> ((XSDComplexTypeDefinition)eObject).setDerivationMethod(XSDD erivationMethod.
> EXTENSION_LITERAL);
> ((XSDComplexTypeDefinition)eObject).setBaseTypeDefinition(xs dDt);
> ((XSDComplexTypeDefinition)eObject).setContent(xsdDt);
> }
>
> And here is the resulting ComplexType....
> <xs:complexType abstract="false" mixed="false" name="gYearMonth">
> <xs:complexContent>
> <xs:extension base="xs:gYearMonth">
> <xs:attributeGroup ref="Q1:commonAttributes"/>
> </xs:extension>
> </xs:complexContent>
> </xs:complexType>
>
> thanks,
>
> lp
--------------FB882CCC9D80301CB79CFB57
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Lance,
<p>You must do this from the example code in order to create the syntactic
<simpleContent> "scaffolding":
<blockquote>XSDSimpleTypeDefinition anonymousSimpleTypeDefinition = xsdFactory.createXSDSimpleTypeDefinition();
<br> simpleContentComplexTypeDefinition.setContent(anonymousSimpl eTypeDefinition); </blockquote>
<p><br>Lance Phillips wrote:
<blockquote TYPE=CITE>I'm trying to create a complex type with simple content.
I've copied the
<br>creation logic as close to exactly as possible from the XsdProtypicalSchema.
<br>However, when I write out my xsd it gets written out with complex content.
<br>Any ideas? Here is my code block...
<p>final XSDSimpleTypeDefinition xsdDt = resolveSimpleDatatype(eObject,
value);
<br>if (xsdDt != null) {
<p> ((XSDComplexTypeDefinition)eObject).setDerivationMethod(XSDD erivationMethod.
<br>EXTENSION_LITERAL);
<br> ((XSDComplexTypeDefinition)eObject).setBaseTypeDefinition(xs dDt);
<br> ((XSDComplexTypeDefinition)eObject).setContent(xsdDt);
<br>}
<p>And here is the resulting ComplexType....
<br><xs:complexType abstract="false" mixed="false" name="gYearMonth">
<br> <xs:complexContent>
<br> <xs:extension base="xs:gYearMonth">
<br>
<xs:attributeGroup ref="Q1:commonAttributes"/>
<br> </xs:extension>
<br> </xs:complexContent>
<br></xs:complexType>
<p>thanks,
<p>lp</blockquote>
</html>
--------------FB882CCC9D80301CB79CFB57--
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Powered by
FUDForum. Page generated in 0.02473 seconds