You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by "Johannes Stamminger (JIRA)" <xm...@xml.apache.org> on 2007/06/08 18:44:26 UTC

[jira] Created: (XMLBEANS-334) No access to content for mixed complexType containing an empty choice only

No access to content for mixed complexType containing an empty choice only
--------------------------------------------------------------------------

                 Key: XMLBEANS-334
                 URL: https://issues.apache.org/jira/browse/XMLBEANS-334
             Project: XMLBeans
          Issue Type: Bug
          Components: Binding
    Affects Versions: Version 2.2,  Version 2.3
            Reporter: Johannes Stamminger


Within a small example that I will attach in a minute there is defined an element Title:
	<xs:element name="Title">
		<xs:complexType mixed="true">
			<xs:choice minOccurs="0" maxOccurs="unbounded"/>
		</xs:complexType>
	</xs:element>

The generated sourcecode  for interface Title within XBTitleDocument (all xmlbeans generated classes were created with XB prefix by way of xsdconfig) does extend from org.apache.xmlbeans.XmlObject and contain nothing else than the static org.apache.xmlbeans.SchemaType member. Especially it does not provide access to the string content of the element.

Though the generated implementation TitleImpl in XBTitleDocumentImpl does provide access as it
 -> derives from org.apache.xmlbeans.impl.values.XmlComplexContentImpl 
 -> deriving from XmlObjectBase
 -> granting access to that value by way of method getStringValue()


-- 
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


[jira] Resolved: (XMLBEANS-334) No access to content for mixed complexType containing an empty choice only

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

Radu Preotiuc-Pietro resolved XMLBEANS-334.
-------------------------------------------

       Resolution: Invalid
    Fix Version/s: unspecified

> No access to content for mixed complexType containing an empty choice only
> --------------------------------------------------------------------------
>
>                 Key: XMLBEANS-334
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-334
>             Project: XMLBeans
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions: Version 2.2,  Version 2.3
>            Reporter: Johannes Stamminger
>            Priority: Trivial
>             Fix For: unspecified
>
>
> Within a small example that I will attach in a minute there is defined an element Title:
> 	<xs:element name="Title">
> 		<xs:complexType mixed="true">
> 			<xs:choice minOccurs="0" maxOccurs="unbounded"/>
> 		</xs:complexType>
> 	</xs:element>
> The generated sourcecode  for interface Title within XBTitleDocument (all xmlbeans generated classes were created with XB prefix by way of xsdconfig) does extend from org.apache.xmlbeans.XmlObject and contain nothing else than the static org.apache.xmlbeans.SchemaType member. Especially it does not provide access to the string content of the element.
> Though the generated implementation TitleImpl in XBTitleDocumentImpl does provide access as it
>  -> derives from org.apache.xmlbeans.impl.values.XmlComplexContentImpl 
>  -> deriving from XmlObjectBase
>  -> granting access to that value by way of method getStringValue()

-- 
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


[jira] Updated: (XMLBEANS-334) No access to content for mixed complexType containing an empty choice only

Posted by "Johannes Stamminger (JIRA)" <xm...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XMLBEANS-334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Johannes Stamminger updated XMLBEANS-334:
-----------------------------------------

    Component/s:     (was: Binding)
                 Compiler
       Priority: Trivial  (was: Major)

> No access to content for mixed complexType containing an empty choice only
> --------------------------------------------------------------------------
>
>                 Key: XMLBEANS-334
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-334
>             Project: XMLBeans
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions: Version 2.2,  Version 2.3
>            Reporter: Johannes Stamminger
>            Priority: Trivial
>
> Within a small example that I will attach in a minute there is defined an element Title:
> 	<xs:element name="Title">
> 		<xs:complexType mixed="true">
> 			<xs:choice minOccurs="0" maxOccurs="unbounded"/>
> 		</xs:complexType>
> 	</xs:element>
> The generated sourcecode  for interface Title within XBTitleDocument (all xmlbeans generated classes were created with XB prefix by way of xsdconfig) does extend from org.apache.xmlbeans.XmlObject and contain nothing else than the static org.apache.xmlbeans.SchemaType member. Especially it does not provide access to the string content of the element.
> Though the generated implementation TitleImpl in XBTitleDocumentImpl does provide access as it
>  -> derives from org.apache.xmlbeans.impl.values.XmlComplexContentImpl 
>  -> deriving from XmlObjectBase
>  -> granting access to that value by way of method getStringValue()

-- 
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


[jira] Commented: (XMLBEANS-334) No access to content for mixed complexType containing an empty choice only

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

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

Well, the thing is that, since you can have many children elements under the "Title" element and text interspersed with them, you would need a way to see what is the relative position of all the text fragments with respect to each child element. You would use XmlCursor for that.

See the MixedContent sample.


> No access to content for mixed complexType containing an empty choice only
> --------------------------------------------------------------------------
>
>                 Key: XMLBEANS-334
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-334
>             Project: XMLBeans
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions: Version 2.2,  Version 2.3
>            Reporter: Johannes Stamminger
>            Priority: Trivial
>
> Within a small example that I will attach in a minute there is defined an element Title:
> 	<xs:element name="Title">
> 		<xs:complexType mixed="true">
> 			<xs:choice minOccurs="0" maxOccurs="unbounded"/>
> 		</xs:complexType>
> 	</xs:element>
> The generated sourcecode  for interface Title within XBTitleDocument (all xmlbeans generated classes were created with XB prefix by way of xsdconfig) does extend from org.apache.xmlbeans.XmlObject and contain nothing else than the static org.apache.xmlbeans.SchemaType member. Especially it does not provide access to the string content of the element.
> Though the generated implementation TitleImpl in XBTitleDocumentImpl does provide access as it
>  -> derives from org.apache.xmlbeans.impl.values.XmlComplexContentImpl 
>  -> deriving from XmlObjectBase
>  -> granting access to that value by way of method getStringValue()

-- 
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


[jira] Commented: (XMLBEANS-334) No access to content for mixed complexType containing an empty choice only

Posted by "Johannes Stamminger (JIRA)" <xm...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XMLBEANS-334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12502878 ] 

Johannes Stamminger commented on XMLBEANS-334:
----------------------------------------------

Sorry, I fail to get the upload dialog. So I paste the schema as comment here. It becomes compiled bay way of ant task with xsdconfig noted below the schema:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:element name="List">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="Entry" minOccurs="0" maxOccurs="unbounded"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="Entry">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="Title"/>
			</xs:sequence>
			<xs:attribute name="id" type="xs:ID" use="required"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="Title">
		<xs:complexType mixed="true">
			<xs:choice minOccurs="0" maxOccurs="unbounded"/>
		</xs:complexType>
	</xs:element>
</xs:schema>



<xb:config xmlns:xb="http://xml.apache.org/xmlbeans/2004/02/xbean/config">
    <xb:namespace uri="##any">
        <xb:package>net.eads.astrium.test.list.xml.bind</xb:package>
    </xb:namespace>

    <xb:namespace uri="##any">
        <xb:prefix>XB</xb:prefix>
    </xb:namespace>
</xb:config>

> No access to content for mixed complexType containing an empty choice only
> --------------------------------------------------------------------------
>
>                 Key: XMLBEANS-334
>                 URL: https://issues.apache.org/jira/browse/XMLBEANS-334
>             Project: XMLBeans
>          Issue Type: Bug
>          Components: Binding
>    Affects Versions: Version 2.2,  Version 2.3
>            Reporter: Johannes Stamminger
>
> Within a small example that I will attach in a minute there is defined an element Title:
> 	<xs:element name="Title">
> 		<xs:complexType mixed="true">
> 			<xs:choice minOccurs="0" maxOccurs="unbounded"/>
> 		</xs:complexType>
> 	</xs:element>
> The generated sourcecode  for interface Title within XBTitleDocument (all xmlbeans generated classes were created with XB prefix by way of xsdconfig) does extend from org.apache.xmlbeans.XmlObject and contain nothing else than the static org.apache.xmlbeans.SchemaType member. Especially it does not provide access to the string content of the element.
> Though the generated implementation TitleImpl in XBTitleDocumentImpl does provide access as it
>  -> derives from org.apache.xmlbeans.impl.values.XmlComplexContentImpl 
>  -> deriving from XmlObjectBase
>  -> granting access to that value by way of method getStringValue()

-- 
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