You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "Lawrence Jones (JIRA)" <xm...@xml.apache.org> on 2006/03/14 19:56:56 UTC

[jira] Created: (XMLBEANS-253) .xsdconfig qname element should allow specifying only element or only complexType

.xsdconfig qname element should allow specifying only element or only complexType
---------------------------------------------------------------------------------

         Key: XMLBEANS-253
         URL: http://issues.apache.org/jira/browse/XMLBEANS-253
     Project: XMLBeans
        Type: Improvement
  Components: Binding  
    Versions: Version 2.1    
 Environment: All
    Reporter: Lawrence Jones
 Assigned to: Lawrence Jones 
    Priority: Minor
     Fix For: TBD


Currently the <qname> element in .xsdconfig files allows only the name and javaname attributes to be specified.

If you have a schema with a global type and a global element with the same name and you try to map that name to a non-default javaname using the <qname> element in a .xsdconfig file then you will get that one of them maps to the javaname and one of them maps to javaname + "2" in order to avoid collisions. 

Suggest that we update <qname> to allow a third attribute which specifies whether this mapping applies to elements only, types only, or both with default being both.

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


[jira] Updated: (XMLBEANS-253) .xsdconfig qname element should allow specifying only element or only complexType

Posted by "Lawrence Jones (JIRA)" <xm...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XMLBEANS-253?page=all ]

Lawrence Jones updated XMLBEANS-253:
------------------------------------

    Attachment: test.xsdconfig

.xsdconfig file that exemplifies the problem

> .xsdconfig qname element should allow specifying only element or only complexType
> ---------------------------------------------------------------------------------
>
>          Key: XMLBEANS-253
>          URL: http://issues.apache.org/jira/browse/XMLBEANS-253
>      Project: XMLBeans
>         Type: Improvement
>   Components: Binding
>     Versions: Version 2.1
>  Environment: All
>     Reporter: Lawrence Jones
>     Assignee: Lawrence Jones
>     Priority: Minor
>      Fix For: TBD
>  Attachments: test.wsdl, test.xsdconfig
>
> Currently the <qname> element in .xsdconfig files allows only the name and javaname attributes to be specified.
> If you have a schema with a global type and a global element with the same name and you try to map that name to a non-default javaname using the <qname> element in a .xsdconfig file then you will get that one of them maps to the javaname and one of them maps to javaname + "2" in order to avoid collisions. 
> Suggest that we update <qname> to allow a third attribute which specifies whether this mapping applies to elements only, types only, or both with default being both.

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


[jira] Commented: (XMLBEANS-253) .xsdconfig qname element should allow specifying only element or only complexType

Posted by "Lawrence Jones (JIRA)" <xm...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XMLBEANS-253?page=comments#action_12370731 ] 

Lawrence Jones commented on XMLBEANS-253:
-----------------------------------------

There is a similar issue where the schema has an anonymous inner type e.g.:

	<xs:element name="service-type">
		<xs:complexType>
               .
               .
               .
		</xs:complexType>
	</xs:element> 

and then the .xsdconfig file has a <qname> element to rename the class for <service-type>. As things stand the _inner_ interface which is created for the anonymous type will end up as (java_name_for_outer_type + "2"). There is a request that it be original (non-xsdconfig) name for the outer element (without the "Document" suffix of course). Not sure how (if?) this affects backward compat.

> .xsdconfig qname element should allow specifying only element or only complexType
> ---------------------------------------------------------------------------------
>
>          Key: XMLBEANS-253
>          URL: http://issues.apache.org/jira/browse/XMLBEANS-253
>      Project: XMLBeans
>         Type: Improvement
>   Components: Binding
>     Versions: Version 2.1
>  Environment: All
>     Reporter: Lawrence Jones
>     Assignee: Lawrence Jones
>     Priority: Minor
>      Fix For: TBD
>  Attachments: test.wsdl, test.xsdconfig
>
> Currently the <qname> element in .xsdconfig files allows only the name and javaname attributes to be specified.
> If you have a schema with a global type and a global element with the same name and you try to map that name to a non-default javaname using the <qname> element in a .xsdconfig file then you will get that one of them maps to the javaname and one of them maps to javaname + "2" in order to avoid collisions. 
> Suggest that we update <qname> to allow a third attribute which specifies whether this mapping applies to elements only, types only, or both with default being both.

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


[jira] Updated: (XMLBEANS-253) .xsdconfig qname element should allow specifying only element or only complexType

Posted by "Lawrence Jones (JIRA)" <xm...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XMLBEANS-253?page=all ]

Lawrence Jones updated XMLBEANS-253:
------------------------------------

    Attachment: test.wsdl

test.wsdl file that exemplifies the problem

> .xsdconfig qname element should allow specifying only element or only complexType
> ---------------------------------------------------------------------------------
>
>          Key: XMLBEANS-253
>          URL: http://issues.apache.org/jira/browse/XMLBEANS-253
>      Project: XMLBeans
>         Type: Improvement
>   Components: Binding
>     Versions: Version 2.1
>  Environment: All
>     Reporter: Lawrence Jones
>     Assignee: Lawrence Jones
>     Priority: Minor
>      Fix For: TBD
>  Attachments: test.wsdl, test.xsdconfig
>
> Currently the <qname> element in .xsdconfig files allows only the name and javaname attributes to be specified.
> If you have a schema with a global type and a global element with the same name and you try to map that name to a non-default javaname using the <qname> element in a .xsdconfig file then you will get that one of them maps to the javaname and one of them maps to javaname + "2" in order to avoid collisions. 
> Suggest that we update <qname> to allow a third attribute which specifies whether this mapping applies to elements only, types only, or both with default being both.

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


[jira] Commented: (XMLBEANS-253) .xsdconfig qname element should allow specifying only element or only complexType

Posted by "Radu Preotiuc-Pietro (JIRA)" <xm...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XMLBEANS-253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12582833#action_12582833 ] 

Radu Preotiuc-Pietro commented on XMLBEANS-253:
-----------------------------------------------

My thoughts on this issue:

I propose we add a new attribute to the <qname> configuration element, something like target="element | type | property" with the following meaning:
- "element" - only the document type corresponding to the global element with that qname gets its name changed, not the global type, if any
- "type" - only the global type with that qname has the name changed, not the global element, if any
- "property" - all methods corresponding to elements/attributes with that qname use the new name and global types and elements are not affected.

I am envisioning that multiple settings for the same qname would be allowed so that the default will be target="element & type" which would correspond to the current behavior.

I would also note that when target is set to "element", then if there is an inner class, its name will always be java_name_for_outer_type + "2" because in Java you can't have an inner class with the same name as one of its outer classes and also for backwards-compatibility.


> .xsdconfig qname element should allow specifying only element or only complexType
> ---------------------------------------------------------------------------------
>
>                 Key: XMLBEANS-253
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-253
>             Project: XMLBeans
>          Issue Type: Improvement
>          Components: Binding
>    Affects Versions: Version 2.1
>         Environment: All
>            Reporter: Lawrence Jones
>            Assignee: Lawrence Jones
>            Priority: Minor
>             Fix For: TBD
>
>         Attachments: test.wsdl, test.xsdconfig
>
>
> Currently the <qname> element in .xsdconfig files allows only the name and javaname attributes to be specified.
> If you have a schema with a global type and a global element with the same name and you try to map that name to a non-default javaname using the <qname> element in a .xsdconfig file then you will get that one of them maps to the javaname and one of them maps to javaname + "2" in order to avoid collisions. 
> Suggest that we update <qname> to allow a third attribute which specifies whether this mapping applies to elements only, types only, or both with default being both.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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