Help with ComplexTypes [message #43365] |
Tue, 04 May 2004 15:19  |
Eclipse User |
|
|
|
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
|
|
|
|
Re: Help with ComplexTypes [message #43425 is a reply to message #43396] |
Tue, 04 May 2004 17:20  |
Eclipse User |
|
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_000B_01C431F3.B1985160
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
thanks Ed... that worked.
"Ed Merks" <merks@ca.ibm.com> wrote in message =
news:4097EF47.80254ED4@ca.ibm.com...
Lance,=20
You must do this from the example code in order to create the =
syntactic <simpleContent> "scaffolding":=20
XSDSimpleTypeDefinition anonymousSimpleTypeDefinition =3D =
xsdFactory.createXSDSimpleTypeDefinition();=20
=
simpleContentComplexTypeDefinition.setContent(anonymousSimpl eTypeDefiniti=
on);
Lance Phillips wrote:=20
I'm trying to create a complex type with simple content. I've =
copied the=20
creation logic as close to exactly as possible from the =
XsdProtypicalSchema.=20
However, when I write out my xsd it gets written out with complex =
content.=20
Any ideas? Here is my code block...=20
final XSDSimpleTypeDefinition xsdDt =3D =
resolveSimpleDatatype(eObject, value);=20
if (xsdDt !=3D null) {=20
=
((XSDComplexTypeDefinition)eObject).setDerivationMethod(XSDD erivationMeth=
od.=20
EXTENSION_LITERAL);=20
=
((XSDComplexTypeDefinition)eObject).setBaseTypeDefinition(xs dDt);=20
((XSDComplexTypeDefinition)eObject).setContent(xsdDt);=20
}=20
And here is the resulting ComplexType....=20
<xs:complexType abstract=3D"false" mixed=3D"false" =
name=3D"gYearMonth">=20
<xs:complexContent>=20
<xs:extension base=3D"xs:gYearMonth">=20
<xs:attributeGroup ref=3D"Q1:commonAttributes"/>=20
</xs:extension>=20
</xs:complexContent>=20
</xs:complexType>=20
thanks,=20
lp
------=_NextPart_000_000B_01C431F3.B1985160
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>thanks Ed... that worked.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Ed Merks" <<A =
href=3D"mailto:merks@ca.ibm.com">merks@ca.ibm.com</A>>=20
wrote in message <A=20
=
href=3D"news:4097EF47.80254ED4@ca.ibm.com">news:4097EF47.80254ED4@ca.ibm.=
com</A>...</DIV>Lance,=20
<P>You must do this from the example code in order to create the =
syntactic=20
<simpleContent> "scaffolding":=20
<BLOCKQUOTE>XSDSimpleTypeDefinition anonymousSimpleTypeDefinition =3D=20
xsdFactory.createXSDSimpleTypeDefinition();=20
=
<BR> simpleContentComplexTypeDefinition.setContent(anonymousSimpl eTypeDefi=
nition);</BLOCKQUOTE>
<P><BR>Lance Phillips wrote:=20
<BLOCKQUOTE TYPE=3D"CITE">I'm trying to create a complex type with =
simple=20
content. I've copied the <BR>creation logic as close to =
exactly as=20
possible from the XsdProtypicalSchema. <BR>However, when I write out =
my xsd=20
it gets written out with complex content. <BR>Any ideas? Here =
is my=20
code block...=20
<P>final XSDSimpleTypeDefinition xsdDt =3D =
resolveSimpleDatatype(eObject,=20
value); <BR>if (xsdDt !=3D null) {=20
=
<P> ((XSDComplexTypeDefinition)eObject).setDerivationMethod(XSDD erivationM=
ethod.=20
<BR>EXTENSION_LITERAL); <BR> =20
((XSDComplexTypeDefinition)eObject).setBaseTypeDefinition(xs dDt);=20
<BR> =20
((XSDComplexTypeDefinition)eObject).setContent(xsdDt); <BR>}=20
<P>And here is the resulting ComplexType.... <BR><xs:complexType=20
abstract=3D"false" mixed=3D"false" name=3D"gYearMonth"> =
<BR> =20
<xs:complexContent> =
<BR> =20
<xs:extension base=3D"xs:gYearMonth">=20
=
<BR> =20
<xs:attributeGroup ref=3D"Q1:commonAttributes"/>=20
<BR> </xs:extension> =
<BR> </xs:complexContent>=20
<BR></xs:complexType>=20
<P>thanks,=20
<P>lp</P></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_000B_01C431F3.B1985160--
|
|
|
Re: Help with ComplexTypes [message #586622 is a reply to message #43365] |
Tue, 04 May 2004 15:30  |
Eclipse User |
|
|
|
--------------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 #586636 is a reply to message #43396] |
Tue, 04 May 2004 17:20  |
Eclipse User |
|
|
|
This is a multi-part message in MIME format.
------=_NextPart_000_000B_01C431F3.B1985160
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
thanks Ed... that worked.
"Ed Merks" <merks@ca.ibm.com> wrote in message =
news:4097EF47.80254ED4@ca.ibm.com...
Lance,=20
You must do this from the example code in order to create the =
syntactic <simpleContent> "scaffolding":=20
XSDSimpleTypeDefinition anonymousSimpleTypeDefinition =3D =
xsdFactory.createXSDSimpleTypeDefinition();=20
=
simpleContentComplexTypeDefinition.setContent(anonymousSimpl eTypeDefiniti=
on);
Lance Phillips wrote:=20
I'm trying to create a complex type with simple content. I've =
copied the=20
creation logic as close to exactly as possible from the =
XsdProtypicalSchema.=20
However, when I write out my xsd it gets written out with complex =
content.=20
Any ideas? Here is my code block...=20
final XSDSimpleTypeDefinition xsdDt =3D =
resolveSimpleDatatype(eObject, value);=20
if (xsdDt !=3D null) {=20
=
((XSDComplexTypeDefinition)eObject).setDerivationMethod(XSDD erivationMeth=
od.=20
EXTENSION_LITERAL);=20
=
((XSDComplexTypeDefinition)eObject).setBaseTypeDefinition(xs dDt);=20
((XSDComplexTypeDefinition)eObject).setContent(xsdDt);=20
}=20
And here is the resulting ComplexType....=20
<xs:complexType abstract=3D"false" mixed=3D"false" =
name=3D"gYearMonth">=20
<xs:complexContent>=20
<xs:extension base=3D"xs:gYearMonth">=20
<xs:attributeGroup ref=3D"Q1:commonAttributes"/>=20
</xs:extension>=20
</xs:complexContent>=20
</xs:complexType>=20
thanks,=20
lp
------=_NextPart_000_000B_01C431F3.B1985160
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>thanks Ed... that worked.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV>"Ed Merks" <<A =
href=3D"mailto:merks@ca.ibm.com">merks@ca.ibm.com</A>>=20
wrote in message <A=20
=
href=3D"news:4097EF47.80254ED4@ca.ibm.com">news:4097EF47.80254ED4@ca.ibm.=
com</A>...</DIV>Lance,=20
<P>You must do this from the example code in order to create the =
syntactic=20
<simpleContent> "scaffolding":=20
<BLOCKQUOTE>XSDSimpleTypeDefinition anonymousSimpleTypeDefinition =3D=20
xsdFactory.createXSDSimpleTypeDefinition();=20
=
<BR> simpleContentComplexTypeDefinition.setContent(anonymousSimpl eTypeDefi=
nition);</BLOCKQUOTE>
<P><BR>Lance Phillips wrote:=20
<BLOCKQUOTE TYPE=3D"CITE">I'm trying to create a complex type with =
simple=20
content. I've copied the <BR>creation logic as close to =
exactly as=20
possible from the XsdProtypicalSchema. <BR>However, when I write out =
my xsd=20
it gets written out with complex content. <BR>Any ideas? Here =
is my=20
code block...=20
<P>final XSDSimpleTypeDefinition xsdDt =3D =
resolveSimpleDatatype(eObject,=20
value); <BR>if (xsdDt !=3D null) {=20
=
<P> ((XSDComplexTypeDefinition)eObject).setDerivationMethod(XSDD erivationM=
ethod.=20
<BR>EXTENSION_LITERAL); <BR> =20
((XSDComplexTypeDefinition)eObject).setBaseTypeDefinition(xs dDt);=20
<BR> =20
((XSDComplexTypeDefinition)eObject).setContent(xsdDt); <BR>}=20
<P>And here is the resulting ComplexType.... <BR><xs:complexType=20
abstract=3D"false" mixed=3D"false" name=3D"gYearMonth"> =
<BR> =20
<xs:complexContent> =
<BR> =20
<xs:extension base=3D"xs:gYearMonth">=20
=
<BR> =20
<xs:attributeGroup ref=3D"Q1:commonAttributes"/>=20
<BR> </xs:extension> =
<BR> </xs:complexContent>=20
<BR></xs:complexType>=20
<P>thanks,=20
<P>lp</P></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_000B_01C431F3.B1985160--
|
|
|
Powered by
FUDForum. Page generated in 0.28588 seconds