Hi Andrey,

Are you going to create a JIRA for this and perhaps provide this patch?
If not, I'll put this in a JIRA.

Haleh

On Tue, Dec 2, 2008 at 7:01 AM, Frank Budinsky <[EMAIL PROTECTED]> wrote:

> Hi Andrey,
>
> I think there's a blatant bug in
> SchemaBuilder.addElement2ComplexType(...).  It looks to me like the
> following if statement:
>
>        if ( aProperty.isContainment() )
>        {
>
>
> element.setTypeDefinition(typeTable.getXSDTypeDef(elementSchemaType.getNamespaceURI(),
>  elementSchemaType.getLocalPart()));
>        }
>        else
>        {
>            if ( !aProperty.getType().isDataType() )
>            {
>                QName qName = typeTable.getSimpleSchemaTypeName("URI");
>
> element.setTypeDefinition(typeTable.getXSDTypeDef(qName.getNamespaceURI(),
>                                            qName.getLocalPart()));
>            }
>        }
>
> should look like this:
>
>        if ( aProperty.isContainment() || aProperty.getType().isDataType()
> )
>        {
>
>
> element.setTypeDefinition(typeTable.getXSDTypeDef(elementSchemaType.getNamespaceURI(),
>  elementSchemaType.getLocalPart()));
>        }
>        else
>        {
>            if ( !aProperty.getType().isDataType() )
>            {
>                QName qName = typeTable.getSimpleSchemaTypeName("URI");
>
> element.setTypeDefinition(typeTable.getXSDTypeDef(qName.getNamespaceURI(),
>                                            qName.getLocalPart()));
>            }
>        }
>
> Frank
>
>
>
>
>
> "Andrey Utkin" <[EMAIL PROTECTED]>
> 12/01/2008 05:41 PM
> Please respond to
> user@tuscany.apache.org
>
>
> To
> user@tuscany.apache.org
> cc
>
> Subject
> SDO - generating XSD from dynamic type
>
>
>
>
>
>
> Hi,
>
> I need to generate XSD for dynamic types. All works fine, but for DataType
> properties  represented by xsd:element (many==true or nullable==true)
> there are no "type" attribute generated in xsd. So, that I can`t use
> generated xsd to define the type in another context - the type information
> of such properties is lost. Iam using XSDHelper.generate(List<Type>)
> method.
> Does someone know how to generate XSD for dynamic types without losing
> type information of such properties?
>
> Thanks.
>
>

Reply via email to