[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-dev
Subject:    Re: Serialization of an attribute with list of QNames
From:       masahiro.kurosawa.kc () hitachi ! com
Date:       2005-09-29 5:33:14
Message-ID: XNM1$1$0$3$$7$8$0$A$9007015U433b7c82 () hitachi ! com
[Download RAW message or body]

Hi, Yana.


Thank you for your reply.
I've just created a new issue in Jira. Also I understand your help.

Thanks a lot again!


>TO: <dev@xmlbeans.apache.org>
>BCC: $B9uBt!22mM5(B
>$BAw?.<T(B $B!'(B Yana Kadiyska <ykadiysk@bea.com>
>$B<gBj(B $B!'(B RE: Serialization of an attribute with list of QNames
>$B<u?.F|(B $B!'(B2005/09/29 13:22
>$BB0@-(B $B!'(B $B$J$7(B
>
>Hi, it appears that XmlBeans does not handle QNames in attribute values
>correctly. Please open a Jira bug with the sample below.
>
>For now, you can work around this by declaring the namespaces via
>XmlCursor yourself
>
>-Yana
>
>-----Original Message-----
>From: masahiro.kurosawa.kc@hitachi.com
>[mailto:masahiro.kurosawa.kc@hitachi.com] 
>Sent: Tuesday, September 27, 2005 9:34 PM
>To: dev@xmlbeans.apache.org
>Subject: Serialization of an attribute with list of QNames
>
>First of all, thank you for your great works.
>
>Well, I compiled a XSD file into XMLBeans like this:
>
>- - -
><xsd:simpleType name="ContentElementsType">
>  <xsd:list itemType="xsd:QName"/>
></xsd:simpleType>
><xsd:element name="MembershipContentRule">
>  <xsd:complexType>
>    <xsd:attribute name="ContentElements" 
>      type="wsrf-sg:ContentElementsType" use="required"/>
>  </xsd:complexType>
></xsd:element>
>- - -
>
>and use compiled XMLBeans classes like this:
>
>- - -
>// Values of 'ContentElements' attribute of 'MembershipContentRule'
>element
>XmlQName qname1 = XmlQName.Factory.newInstance();
>XmlQName qname2 = XmlQName.Factory.newInstance();
>qname1.setQNameValue( QName.valueOf( "{http://www.bizgrid.org}first" )
>);
>qname2.setQNameValue( QName.valueOf( "{http://www.bizgrid.org}second" )
>);
>ArrayList contentElements = new ArrayList();
>contentElements.add( qname1 );
>contentElements.add( qname2 );
>
>// Construct a 'MembershipContentRule' element
>MembershipContentRuleDocument membershipContentRuleDocument =
>  MembershipContentRuleDocument.Factory.newInstance();
>MembershipContentRuleDocument.MembershipContentRule
>membershipContentRule =
>  membershipContentRuleDocument.addNewMembershipContentRule();
>	        
>// Set values of attributes created above
>membershipContentRule.setContentElements( contentElements );
>
>// Output the XML text of 'MembershipContentRule' element to console 
>System.out.println( membershipContentRuleDocument.xmlText() );
>- - -
>
>Result of last line is:
>
>- - -
><wsrf:MembershipContentRule
>  ContentElements="biz:first biz:second" 
>    xmlns:wsrf="http://docs.oasis-open.org/wsrf/sgw-1"/>
>- - -
>
>
>Where are namespace URIs of QName values in 'ContentElements' element?
>Please give me a solution of this problem.
>
>Thanks.
>
>-----
>Masahiro Kurosawa
> - Hitachi, Ltd., Software Divisition
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
>For additional commands, e-mail: dev-help@xmlbeans.apache.org
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
>For additional commands, e-mail: dev-help@xmlbeans.apache.org
>
>

-----
Masahiro Kurosawa
 - Hitachi, Ltd., Software Divisition

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic