You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Mauro Franceschini (JIRA)" <tu...@ws.apache.org> on 2006/07/26 14:42:13 UTC

[jira] Created: (TUSCANY-576) Bad java class name when XSD name contains dot ('.') characters.

Bad java class name when XSD name contains dot ('.') characters.
----------------------------------------------------------------

                 Key: TUSCANY-576
                 URL: http://issues.apache.org/jira/browse/TUSCANY-576
             Project: Tuscany
          Issue Type: Bug
          Components: Java SDO Tools
    Affects Versions: Java-M2
            Reporter: Mauro Franceschini


I've generated java interface and classes starting from an XML Schema file that contains the following complex type declaration:

<xs:complexType name="CBIBonOrd.001.03">

The result is a java source file named CBIBonOrd.001.03.java that has a wrong name "CBIBonOrd.001.03".

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: [jira] Commented: (TUSCANY-576) Bad java class name when XSD name contains dot ('.') characters.

Posted by Fuhwei Lwo <fu...@bricemedia.com>.
Venkat,
   
  The "name" attribute is defined in the commonj.sdo/xml namespace. You can find it in the sdoXML.xsd under Tuscany/java/spec/sdo/src/main/resources/xml directory.
   
  The prefix of "name" attribute can be defined in your XSD with your choice as xmlns:sdoXML="commonj.sdo/xml" or xmlns:sdo="commonj.sdo/xml" or xmlns:myownprefix="commonj.sdo/xml"  In the spec, xmlns:sdo is used.
   
  "instanceClass" attribute is defined in the sdoJava.xsd under the same directory. It's used to specify the implementation class of your defined type not for overriding the name of the type.
   
  Hope this would help.
   
  Fuhwei Lwo

Venkata Krishnan <fo...@gmail.com> wrote:
  Hi,
In the XSD in the prev. mails I see the sdo annotation called
sdoXML:name. Is this in the specs? To the best of my knowledge the
annotation to be used there, as per the specs is 'sdoJava:instanceClass'.
Please clarify.

Thanks

- Venkat



On 8/5/06, Yang ZHONG (JIRA) wrote:
>
> [
> http://issues.apache.org/jira/browse/TUSCANY-576?page=comments#action_12425944]
>
> Yang ZHONG commented on TUSCANY-576:
> ------------------------------------
>
> The Java version of SDO spec 2.01says "The XSD names are preserved in the
> Type and Property. Use the sdo:name override to
> modify names as an option to remove duplicate names, blank names, or names
> with
> special characters." (XSD Mapping Details on page 104)
>
> Thank Fuhwei for having verified that sdo:name works, and I agree with
> Jeremy that the issue is resolved (by using sdo:name) and we can close the
> JIRA.
>
> > Bad java class name when XSD name contains dot ('.') characters.
> > ----------------------------------------------------------------
> >
> > Key: TUSCANY-576
> > URL: http://issues.apache.org/jira/browse/TUSCANY-576
> > Project: Tuscany
> > Issue Type: Bug
> > Components: Java SDO Tools
> > Affects Versions: Java-M2
> > Reporter: Mauro Franceschini
> >
> > I've generated java interface and classes starting from an XML Schema
> file that contains the following complex type declaration:
> > 
> > The result is a java source file named CBIBonOrd.001.03.java that has a
> wrong name "CBIBonOrd.001.03".
>
> --
> 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: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>


Re: [jira] Commented: (TUSCANY-576) Bad java class name when XSD name contains dot ('.') characters.

Posted by Venkata Krishnan <fo...@gmail.com>.
Hi,
  In the XSD in the prev. mails I see the sdo annotation called
sdoXML:name.  Is this in the specs?  To the best of my knowledge the
annotation to be used there, as per the specs is 'sdoJava:instanceClass'.
Please clarify.

Thanks

- Venkat



On 8/5/06, Yang ZHONG (JIRA) <tu...@ws.apache.org> wrote:
>
>     [
> http://issues.apache.org/jira/browse/TUSCANY-576?page=comments#action_12425944]
>
> Yang ZHONG commented on TUSCANY-576:
> ------------------------------------
>
> The Java version of SDO spec 2.01says "The XSD names are preserved in the
> Type and Property. Use the sdo:name override to
> modify names as an option to remove duplicate names, blank names, or names
> with
> special characters." (XSD Mapping Details on page 104)
>
> Thank Fuhwei for having verified that sdo:name works, and I agree with
> Jeremy that the issue is resolved (by using sdo:name) and we can close the
> JIRA.
>
> > Bad java class name when XSD name contains dot ('.') characters.
> > ----------------------------------------------------------------
> >
> >                 Key: TUSCANY-576
> >                 URL: http://issues.apache.org/jira/browse/TUSCANY-576
> >             Project: Tuscany
> >          Issue Type: Bug
> >          Components: Java SDO Tools
> >    Affects Versions: Java-M2
> >            Reporter: Mauro Franceschini
> >
> > I've generated java interface and classes starting from an XML Schema
> file that contains the following complex type declaration:
> > <xs:complexType name="CBIBonOrd.001.03">
> > The result is a java source file named CBIBonOrd.001.03.java that has a
> wrong name "CBIBonOrd.001.03".
>
> --
> 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: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>

[jira] Commented: (TUSCANY-576) Bad java class name when XSD name contains dot ('.') characters.

Posted by "Fuhwei Lwo (JIRA)" <tu...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/TUSCANY-576?page=comments#action_12425827 ] 
            
Fuhwei Lwo commented on TUSCANY-576:
------------------------------------

I have just verified the following work.  The newly generated Java class name for the Quote type will be MyQuote.java and MyQuoteImpl.java.

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema 
  targetNamespace="http://www.example.com/simple"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
	xmlns:sdoXML="commonj.sdo/xml"
  xmlns:simple="http://www.example.com/simple"> 
  
   <xsd:element name="stockQuote" type="simple:Quote"/>
   
   <xsd:complexType name="Quote" sdoXML:name="MyQuote">
       <xsd:sequence>
          <xsd:element name="symbol" type="xsd:string"/>
          <xsd:element name="companyName" type="xsd:string"/>
          <xsd:element name="price" type="xsd:decimal"/>
          <xsd:element name="open1" type="xsd:decimal"/>
          <xsd:element name="high" type="xsd:decimal"/>
          <xsd:element name="low" type="xsd:decimal"/>
          <xsd:element name="volume" type="xsd:double"/>
          <xsd:element name="change1" type="xsd:double"/>
          <xsd:element name="quotes" type="simple:Quote" minOccurs="0" maxOccurs="unbounded"/>
       </xsd:sequence>
   </xsd:complexType>

</xsd:schema>

> Bad java class name when XSD name contains dot ('.') characters.
> ----------------------------------------------------------------
>
>                 Key: TUSCANY-576
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-576
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Tools
>    Affects Versions: Java-M2
>            Reporter: Mauro Franceschini
>
> I've generated java interface and classes starting from an XML Schema file that contains the following complex type declaration:
> <xs:complexType name="CBIBonOrd.001.03">
> The result is a java source file named CBIBonOrd.001.03.java that has a wrong name "CBIBonOrd.001.03".

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-576) Bad java class name when XSD name contains dot ('.') characters.

Posted by "Yang ZHONG (JIRA)" <tu...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/TUSCANY-576?page=comments#action_12425944 ] 
            
Yang ZHONG commented on TUSCANY-576:
------------------------------------

The Java version of SDO spec 2.01says "The XSD names are preserved in the Type and Property. Use the sdo:name override to
modify names as an option to remove duplicate names, blank names, or names with
special characters." (XSD Mapping Details on page 104)

Thank Fuhwei for having verified that sdo:name works, and I agree with Jeremy that the issue is resolved (by using sdo:name) and we can close the JIRA.

> Bad java class name when XSD name contains dot ('.') characters.
> ----------------------------------------------------------------
>
>                 Key: TUSCANY-576
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-576
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Tools
>    Affects Versions: Java-M2
>            Reporter: Mauro Franceschini
>
> I've generated java interface and classes starting from an XML Schema file that contains the following complex type declaration:
> <xs:complexType name="CBIBonOrd.001.03">
> The result is a java source file named CBIBonOrd.001.03.java that has a wrong name "CBIBonOrd.001.03".

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Closed: (TUSCANY-576) Bad java class name when XSD name contains dot ('.') characters.

Posted by "Pete Robbins (JIRA)" <tu...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/TUSCANY-576?page=all ]

Pete Robbins closed TUSCANY-576.
--------------------------------

    Fix Version/s: Java-Mx
       Resolution: Fixed

Closed at request of Kelvin

> Bad java class name when XSD name contains dot ('.') characters.
> ----------------------------------------------------------------
>
>                 Key: TUSCANY-576
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-576
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Tools
>    Affects Versions: Java-M2
>            Reporter: Mauro Franceschini
>             Fix For: Java-Mx
>
>
> I've generated java interface and classes starting from an XML Schema file that contains the following complex type declaration:
> <xs:complexType name="CBIBonOrd.001.03">
> The result is a java source file named CBIBonOrd.001.03.java that has a wrong name "CBIBonOrd.001.03".

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: [jira] Commented: (TUSCANY-576) Bad java class name when XSD name contains dot ('.') characters.

Posted by Jeremy Boynes <jb...@apache.org>.
On Aug 4, 2006, at 12:23 PM, Fuhwei Lwo wrote:

> I have verified it works and make a comment in the JIRA.

Thanks Fuhwei.

Yang, does this resolve the issue and can we close the JIRA?
--
Jeremy


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: [jira] Commented: (TUSCANY-576) Bad java class name when XSD name contains dot ('.') characters.

Posted by Fuhwei Lwo <fu...@bricemedia.com>.
I have verified it works and make a comment in the JIRA.
  
  Fuhwei Lwo

Jeremy Boynes <jb...@apache.org> wrote:  On Aug 4, 2006, at 11:59 AM, Fuhwei Lwo wrote:

> I remember a discussion in the past mentioned to use SDO annotation  
> in  the XSD to override the default type name for SDO codegen tool,  
> e.g.  sdoXML:name="MyNewTypeName".
>
>   Can anyone verify whether this is working?  Thanks.

How about giving it a go and posting the results here?
--
Jeremy


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org



Re: [jira] Commented: (TUSCANY-576) Bad java class name when XSD name contains dot ('.') characters.

Posted by Jeremy Boynes <jb...@apache.org>.
On Aug 4, 2006, at 11:59 AM, Fuhwei Lwo wrote:

> I remember a discussion in the past mentioned to use SDO annotation  
> in  the XSD to override the default type name for SDO codegen tool,  
> e.g.  sdoXML:name="MyNewTypeName".
>
>   Can anyone verify whether this is working?  Thanks.

How about giving it a go and posting the results here?
--
Jeremy


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: [jira] Commented: (TUSCANY-576) Bad java class name when XSD name contains dot ('.') characters.

Posted by Fuhwei Lwo <fu...@bricemedia.com>.
I remember a discussion in the past mentioned to use SDO annotation in  the XSD to override the default type name for SDO codegen tool, e.g.  sdoXML:name="MyNewTypeName".
  
  Can anyone verify whether this is working?  Thanks.
  
  Regards,
  
  Fuhwei Lwo

"Yang ZHONG (JIRA)" <tu...@ws.apache.org> wrote:      [ http://issues.apache.org/jira/browse/TUSCANY-576?page=comments#action_12425813 ] 
            
Yang ZHONG commented on TUSCANY-576:
------------------------------------

XSD  type, element and attribute names are all xsd:NCName, that means we  need to map xsd:NCName to Java class and method name for static SDO  type and property.

I'll look into the name mapping and code generation.

> Bad java class name when XSD name contains dot ('.') characters.
> ----------------------------------------------------------------
>
>                 Key: TUSCANY-576
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-576
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Tools
>    Affects Versions: Java-M2
>            Reporter: Mauro Franceschini
>
>  I've generated java interface and classes starting from an XML Schema  file that contains the following complex type declaration:
> 
> The result is a java source file named CBIBonOrd.001.03.java that has a wrong name "CBIBonOrd.001.03".

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org



[jira] Commented: (TUSCANY-576) Bad java class name when XSD name contains dot ('.') characters.

Posted by "Yang ZHONG (JIRA)" <tu...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/TUSCANY-576?page=comments#action_12425813 ] 
            
Yang ZHONG commented on TUSCANY-576:
------------------------------------

XSD type, element and attribute names are all xsd:NCName, that means we need to map xsd:NCName to Java class and method name for static SDO type and property.

I'll look into the name mapping and code generation.

> Bad java class name when XSD name contains dot ('.') characters.
> ----------------------------------------------------------------
>
>                 Key: TUSCANY-576
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-576
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Tools
>    Affects Versions: Java-M2
>            Reporter: Mauro Franceschini
>
> I've generated java interface and classes starting from an XML Schema file that contains the following complex type declaration:
> <xs:complexType name="CBIBonOrd.001.03">
> The result is a java source file named CBIBonOrd.001.03.java that has a wrong name "CBIBonOrd.001.03".

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org