You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by "Dmitry Repchevsky (JIRA)" <ji...@apache.org> on 2011/08/02 12:26:27 UTC

[jira] [Created] (XMLSCHEMA-16) XmlSchemaSerializer doesn't serialize union memberTypesQNames

XmlSchemaSerializer doesn't serialize union memberTypesQNames
-------------------------------------------------------------

                 Key: XMLSCHEMA-16
                 URL: https://issues.apache.org/jira/browse/XMLSCHEMA-16
             Project: XmlSchema
          Issue Type: Improvement
    Affects Versions: XmlSchema 2.0
         Environment: Java
            Reporter: Dmitry Repchevsky


The only way to define member types for an XmlSchemaSimpleTypeUnion is to define its "memberTypesSource" String.
When a new XmlSchemaSimpleTypeUnion is created it must be possible to specify an array of QNames (memberTypesQNames).
The problem is that elements specified in the "memberTypes" must be prefixed, but developer have no this information in a time of  XmlSchemaSimpleTypeUnion creation.
The patch creates memberTypes from provided memberTypesQNames when memberTypesSource is null.


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Commented] (XMLSCHEMA-16) XmlSchemaSerializer doesn't serialize union memberTypesQNames

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/XMLSCHEMA-16?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13105415#comment-13105415 ] 

Hudson commented on XMLSCHEMA-16:
---------------------------------

Integrated in xmlschema-trunk-jdk15 #14 (See [https://builds.apache.org/job/xmlschema-trunk-jdk15/14/])
    [XMLSCHEMA-16] Output qnames for unions
Patch from Dmitry Repchevsky applied

dkulp : 
Files : 
* /webservices/xmlschema/trunk/xmlschema-core/src/main/java/org/apache/ws/commons/schema/XmlSchemaSerializer.java


> XmlSchemaSerializer doesn't serialize union memberTypesQNames
> -------------------------------------------------------------
>
>                 Key: XMLSCHEMA-16
>                 URL: https://issues.apache.org/jira/browse/XMLSCHEMA-16
>             Project: XmlSchema
>          Issue Type: Improvement
>    Affects Versions: XmlSchema 2.0
>         Environment: Java
>            Reporter: Dmitry Repchevsky
>            Assignee: Daniel Kulp
>              Labels: patch
>             Fix For: XmlSchema 2.0.1
>
>         Attachments: union.patch
>
>   Original Estimate: 0.05h
>  Remaining Estimate: 0.05h
>
> The only way to define member types for an XmlSchemaSimpleTypeUnion is to define its "memberTypesSource" String.
> When a new XmlSchemaSimpleTypeUnion is created it must be possible to specify an array of QNames (memberTypesQNames).
> The problem is that elements specified in the "memberTypes" must be prefixed, but developer have no this information in a time of  XmlSchemaSimpleTypeUnion creation.
> The patch creates memberTypes from provided memberTypesQNames when memberTypesSource is null.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Reopened] (XMLSCHEMA-16) XmlSchemaSerializer doesn't serialize union memberTypesQNames

Posted by "Dmitry Repchevsky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/XMLSCHEMA-16?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitry Repchevsky reopened XMLSCHEMA-16:
----------------------------------------


I am very sorry, my fault, but the order may be important in unions...

So the loop must be changed... :-(


> XmlSchemaSerializer doesn't serialize union memberTypesQNames
> -------------------------------------------------------------
>
>                 Key: XMLSCHEMA-16
>                 URL: https://issues.apache.org/jira/browse/XMLSCHEMA-16
>             Project: XmlSchema
>          Issue Type: Improvement
>    Affects Versions: XmlSchema 2.0
>         Environment: Java
>            Reporter: Dmitry Repchevsky
>            Assignee: Daniel Kulp
>              Labels: patch
>             Fix For: XmlSchema 2.0.1
>
>         Attachments: union.patch, union_patch.diff
>
>   Original Estimate: 0.05h
>  Remaining Estimate: 0.05h
>
> The only way to define member types for an XmlSchemaSimpleTypeUnion is to define its "memberTypesSource" String.
> When a new XmlSchemaSimpleTypeUnion is created it must be possible to specify an array of QNames (memberTypesQNames).
> The problem is that elements specified in the "memberTypes" must be prefixed, but developer have no this information in a time of  XmlSchemaSimpleTypeUnion creation.
> The patch creates memberTypes from provided memberTypesQNames when memberTypesSource is null.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Updated] (XMLSCHEMA-16) XmlSchemaSerializer doesn't serialize union memberTypesQNames

Posted by "Dmitry Repchevsky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/XMLSCHEMA-16?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitry Repchevsky updated XMLSCHEMA-16:
---------------------------------------

    Attachment: union_patch.diff

He is a patch for XmlSchema 2.0.1 (over a previous patch)

> XmlSchemaSerializer doesn't serialize union memberTypesQNames
> -------------------------------------------------------------
>
>                 Key: XMLSCHEMA-16
>                 URL: https://issues.apache.org/jira/browse/XMLSCHEMA-16
>             Project: XmlSchema
>          Issue Type: Improvement
>    Affects Versions: XmlSchema 2.0
>         Environment: Java
>            Reporter: Dmitry Repchevsky
>            Assignee: Daniel Kulp
>              Labels: patch
>             Fix For: XmlSchema 2.0.1
>
>         Attachments: union.patch, union_patch.diff
>
>   Original Estimate: 0.05h
>  Remaining Estimate: 0.05h
>
> The only way to define member types for an XmlSchemaSimpleTypeUnion is to define its "memberTypesSource" String.
> When a new XmlSchemaSimpleTypeUnion is created it must be possible to specify an array of QNames (memberTypesQNames).
> The problem is that elements specified in the "memberTypes" must be prefixed, but developer have no this information in a time of  XmlSchemaSimpleTypeUnion creation.
> The patch creates memberTypes from provided memberTypesQNames when memberTypesSource is null.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Resolved] (XMLSCHEMA-16) XmlSchemaSerializer doesn't serialize union memberTypesQNames

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/XMLSCHEMA-16?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved XMLSCHEMA-16.
----------------------------------

    Resolution: Fixed


New patch applied.  Thanks.

> XmlSchemaSerializer doesn't serialize union memberTypesQNames
> -------------------------------------------------------------
>
>                 Key: XMLSCHEMA-16
>                 URL: https://issues.apache.org/jira/browse/XMLSCHEMA-16
>             Project: XmlSchema
>          Issue Type: Improvement
>    Affects Versions: XmlSchema 2.0
>         Environment: Java
>            Reporter: Dmitry Repchevsky
>            Assignee: Daniel Kulp
>              Labels: patch
>             Fix For: XmlSchema 2.0.1
>
>         Attachments: union.patch, union_patch.diff
>
>   Original Estimate: 0.05h
>  Remaining Estimate: 0.05h
>
> The only way to define member types for an XmlSchemaSimpleTypeUnion is to define its "memberTypesSource" String.
> When a new XmlSchemaSimpleTypeUnion is created it must be possible to specify an array of QNames (memberTypesQNames).
> The problem is that elements specified in the "memberTypes" must be prefixed, but developer have no this information in a time of  XmlSchemaSimpleTypeUnion creation.
> The patch creates memberTypes from provided memberTypesQNames when memberTypesSource is null.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Updated] (XMLSCHEMA-16) XmlSchemaSerializer doesn't serialize union memberTypesQNames

Posted by "Dmitry Repchevsky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/XMLSCHEMA-16?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitry Repchevsky updated XMLSCHEMA-16:
---------------------------------------

    Attachment: union.patch

> XmlSchemaSerializer doesn't serialize union memberTypesQNames
> -------------------------------------------------------------
>
>                 Key: XMLSCHEMA-16
>                 URL: https://issues.apache.org/jira/browse/XMLSCHEMA-16
>             Project: XmlSchema
>          Issue Type: Improvement
>    Affects Versions: XmlSchema 2.0
>         Environment: Java
>            Reporter: Dmitry Repchevsky
>              Labels: patch
>         Attachments: union.patch
>
>   Original Estimate: 0.05h
>  Remaining Estimate: 0.05h
>
> The only way to define member types for an XmlSchemaSimpleTypeUnion is to define its "memberTypesSource" String.
> When a new XmlSchemaSimpleTypeUnion is created it must be possible to specify an array of QNames (memberTypesQNames).
> The problem is that elements specified in the "memberTypes" must be prefixed, but developer have no this information in a time of  XmlSchemaSimpleTypeUnion creation.
> The patch creates memberTypes from provided memberTypesQNames when memberTypesSource is null.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Resolved] (XMLSCHEMA-16) XmlSchemaSerializer doesn't serialize union memberTypesQNames

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/XMLSCHEMA-16?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved XMLSCHEMA-16.
----------------------------------

       Resolution: Fixed
    Fix Version/s: XmlSchema 2.0.1
         Assignee: Daniel Kulp

> XmlSchemaSerializer doesn't serialize union memberTypesQNames
> -------------------------------------------------------------
>
>                 Key: XMLSCHEMA-16
>                 URL: https://issues.apache.org/jira/browse/XMLSCHEMA-16
>             Project: XmlSchema
>          Issue Type: Improvement
>    Affects Versions: XmlSchema 2.0
>         Environment: Java
>            Reporter: Dmitry Repchevsky
>            Assignee: Daniel Kulp
>              Labels: patch
>             Fix For: XmlSchema 2.0.1
>
>         Attachments: union.patch
>
>   Original Estimate: 0.05h
>  Remaining Estimate: 0.05h
>
> The only way to define member types for an XmlSchemaSimpleTypeUnion is to define its "memberTypesSource" String.
> When a new XmlSchemaSimpleTypeUnion is created it must be possible to specify an array of QNames (memberTypesQNames).
> The problem is that elements specified in the "memberTypes" must be prefixed, but developer have no this information in a time of  XmlSchemaSimpleTypeUnion creation.
> The patch creates memberTypes from provided memberTypesQNames when memberTypesSource is null.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Updated] (XMLSCHEMA-16) XmlSchemaSerializer doesn't serialize union memberTypesQNames

Posted by "Dmitry Repchevsky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/XMLSCHEMA-16?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitry Repchevsky updated XMLSCHEMA-16:
---------------------------------------


Index: src/main/java/org/apache/ws/commons/schema/XmlSchemaSerializer.java
===================================================================
--- src/main/java/org/apache/ws/commons/schema/XmlSchemaSerializer.java	(revision 1153085)
+++ src/main/java/org/apache/ws/commons/schema/XmlSchemaSerializer.java	(working copy)
@@ -2138,6 +2138,29 @@
         if (unionObj.getMemberTypesSource() != null) {
             union.setAttribute("memberTypes", unionObj.getMemberTypesSource());
         }
+        else {
+            QName[] memberTypesQNames = unionObj.getMemberTypesQNames();
+            if (memberTypesQNames != null && memberTypesQNames.length > 0) {
+                StringBuilder memberTypes = new StringBuilder();
+                for (int i = memberTypesQNames.length - 1; i >= 0; i--) {
+                    QName memberTypesQName = memberTypesQNames[i];
+                    String namespace = memberTypesQName.getNamespaceURI();
+                    if (namespace.length() != 0) {
+                        String prefix = schemaNamespace.get(namespace);                        
+                        if (prefix.length() != 0) {
+                            memberTypes.append(prefix).append(':');
+                        }
+                    }
+                    memberTypes.append(memberTypesQName.getLocalPart());
+                    if (i != 0) {
+                      memberTypes.append(' ');
+                    }
+                }
+                
+                union.setAttribute("memberTypes", memberTypes.toString());
+            }
+        }
+
         if (unionObj.getBaseTypes().size() > 0) {
             int baseTypesLength = unionObj.getBaseTypes().size();
             Element baseType;


> XmlSchemaSerializer doesn't serialize union memberTypesQNames
> -------------------------------------------------------------
>
>                 Key: XMLSCHEMA-16
>                 URL: https://issues.apache.org/jira/browse/XMLSCHEMA-16
>             Project: XmlSchema
>          Issue Type: Improvement
>    Affects Versions: XmlSchema 2.0
>         Environment: Java
>            Reporter: Dmitry Repchevsky
>              Labels: patch
>   Original Estimate: 0.05h
>  Remaining Estimate: 0.05h
>
> The only way to define member types for an XmlSchemaSimpleTypeUnion is to define its "memberTypesSource" String.
> When a new XmlSchemaSimpleTypeUnion is created it must be possible to specify an array of QNames (memberTypesQNames).
> The problem is that elements specified in the "memberTypes" must be prefixed, but developer have no this information in a time of  XmlSchemaSimpleTypeUnion creation.
> The patch creates memberTypes from provided memberTypesQNames when memberTypesSource is null.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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