Reading / writing xml elements with " type="xsd:boolean" fixed="true"

<[email protected]> Tue, 13 Nov 2012 19:18:26 +0000
Newsgroups gmane.text.xml.xmlbeans.user
Message-ID <[email protected]>
--_000_0FBC44948FBC7E458DF71D62626B413F012A6D98OSL1424veritdnv_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I  have this element in my schema:

<xsd:element name=3D"C2" type=3D"xsd:boolean" fixed=3D"true" minOccurs=3D"0=
"/>

Both option 1:
<Capability>
<C2/>
</Capability>

And option 2 :
<Capability>
<C2>true</C2>
</Capability>

are legal representantions

How can I generically enforce xmlbeans consuming a document containing a mu=
ltitude of  option 1 to write out an xml document using option 2 ?

Med vennlig hilsen / Best regards,
for Det Norske Veritas AS
Geir =D8vsttun
_______________________________
Principal Information Architect
Risk Management Solutions
Information Quality Management (IQM)

Phone/Mobile:  +47 452 49 453
Web: www.dnv.com<http://www.dnv.com/>



***************************************************************************=
***********
The contents of this e-mail message and any attachments are confidential an=
d are intended solely for the addressee. If you have received this transmis=
sion in error, please immediately notify the sender by return e-mail and de=
lete this message and its attachments. Any unauthorized use, copying or dis=
semination of this transmission is prohibited. Neither the confidentiality =
nor the integrity of this message can be vouched for following transmission=
 on the Internet.
***************************************************************************=
***********


--_000_0FBC44948FBC7E458DF71D62626B413F012A6D98OSL1424veritdnv_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
1">
<meta name=3D"Generator" content=3D"Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
	{font-family:SimSun;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:SimSun;
	panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
	{font-family:"\@SimSun";
	panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Calibri","sans-serif";
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri","sans-serif";}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"EN-US" link=3D"blue" vlink=3D"purple">
<div class=3D"WordSection1">
<p class=3D"MsoNormal"><span style=3D"font-size:10.0pt;font-family:&quot;Ar=
ial&quot;,&quot;sans-serif&quot;;color:blue;background:white;mso-highlight:=
white">I&nbsp; have this element in my schema:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:10.0pt;font-family:&quot;Ar=
ial&quot;,&quot;sans-serif&quot;;color:blue;background:white;mso-highlight:=
white"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:10.0pt;font-family:&quot;Ar=
ial&quot;,&quot;sans-serif&quot;;color:blue;background:white;mso-highlight:=
white">&lt;</span><span style=3D"font-size:10.0pt;font-family:&quot;Arial&q=
uot;,&quot;sans-serif&quot;;color:maroon;background:white;mso-highlight:whi=
te">xsd:element</span><span style=3D"font-size:10.0pt;font-family:&quot;Ari=
al&quot;,&quot;sans-serif&quot;;color:red;background:white;mso-highlight:wh=
ite">
 name</span><span style=3D"font-size:10.0pt;font-family:&quot;Arial&quot;,&=
quot;sans-serif&quot;;color:blue;background:white;mso-highlight:white">=3D&=
quot;</span><span style=3D"font-size:10.0pt;font-family:&quot;Arial&quot;,&=
quot;sans-serif&quot;;color:black;background:white;mso-highlight:white">C2<=
/span><span style=3D"font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;s=
ans-serif&quot;;color:blue;background:white;mso-highlight:white">&quot;</sp=
an><span style=3D"font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;sans=
-serif&quot;;color:red;background:white;mso-highlight:white">
 type</span><span style=3D"font-size:10.0pt;font-family:&quot;Arial&quot;,&=
quot;sans-serif&quot;;color:blue;background:white;mso-highlight:white">=3D&=
quot;</span><span style=3D"font-size:10.0pt;font-family:&quot;Arial&quot;,&=
quot;sans-serif&quot;;color:black;background:white;mso-highlight:white">xsd=
:boolean</span><span style=3D"font-size:10.0pt;font-family:&quot;Arial&quot=
;,&quot;sans-serif&quot;;color:blue;background:white;mso-highlight:white">&=
quot;</span><span style=3D"font-size:10.0pt;font-family:&quot;Arial&quot;,&=
quot;sans-serif&quot;;color:red;background:white;mso-highlight:white">
 fixed</span><span style=3D"font-size:10.0pt;font-family:&quot;Arial&quot;,=
&quot;sans-serif&quot;;color:blue;background:white;mso-highlight:white">=3D=
&quot;</span><span style=3D"font-size:10.0pt;font-family:&quot;Arial&quot;,=
&quot;sans-serif&quot;;color:black;background:white;mso-highlight:white">tr=
ue</span><span style=3D"font-size:10.0pt;font-family:&quot;Arial&quot;,&quo=
t;sans-serif&quot;;color:blue;background:white;mso-highlight:white">&quot;<=
/span><span style=3D"font-size:10.0pt;font-family:&quot;Arial&quot;,&quot;s=
ans-serif&quot;;color:red;background:white;mso-highlight:white">
 minOccurs</span><span style=3D"font-size:10.0pt;font-family:&quot;Arial&qu=
ot;,&quot;sans-serif&quot;;color:blue;background:white;mso-highlight:white"=
>=3D&quot;</span><span style=3D"font-size:10.0pt;font-family:&quot;Arial&qu=
ot;,&quot;sans-serif&quot;;color:black;background:white;mso-highlight:white=
">0</span><span style=3D"font-size:10.0pt;font-family:&quot;Arial&quot;,&qu=
ot;sans-serif&quot;;color:blue;background:white;mso-highlight:white">&quot;=
/&gt;</span><span lang=3D"EN-GB" style=3D"color:#1F497D"><o:p></o:p></span>=
</p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB" style=3D"color:#1F497D"><o:p>&n=
bsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB" style=3D"color:#1F497D">Both op=
tion 1:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB" style=3D"color:#1F497D">&lt;Cap=
ability&gt;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB" style=3D"color:#1F497D">&lt;C2/=
&gt;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB" style=3D"color:#1F497D">&lt;/Ca=
pability&gt;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB" style=3D"color:#1F497D"><o:p>&n=
bsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB" style=3D"color:#1F497D">And opt=
ion 2 :<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB" style=3D"color:#1F497D">&lt;Cap=
ability&gt;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB" style=3D"color:#1F497D">&lt;C2&=
gt;true&lt;/C2&gt; <o:p>
</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB" style=3D"color:#1F497D">&lt;/Ca=
pability&gt;<o:p></o:p></span></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">are legal representantions<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal">How can I generically enforce xmlbeans consuming a d=
ocument containing a multitude of &nbsp;option 1 to write out an xml docume=
nt using option 2 ?
<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal" style=3D"text-autospace:none"><i><span style=3D"font=
-size:8.0pt;font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:teal=
">Med vennlig hilsen / Best regards,
<br>
for Det Norske Veritas AS<br>
</span></i><b><i><span style=3D"font-size:10.0pt;font-family:&quot;Tahoma&q=
uot;,&quot;sans-serif&quot;;color:teal">Geir =D8vsttun
<br>
</span></i></b><i><span style=3D"font-size:8.0pt;font-family:&quot;Arial&qu=
ot;,&quot;sans-serif&quot;;color:teal">_______________________________<o:p>=
</o:p></span></i></p>
<p class=3D"MsoNormal"><i><span style=3D"font-size:8.0pt;font-family:&quot;=
Arial&quot;,&quot;sans-serif&quot;;color:teal">Principal Information Archit=
ect
<o:p></o:p></span></i></p>
<p class=3D"MsoNormal"><i><span style=3D"font-size:8.0pt;font-family:&quot;=
Arial&quot;,&quot;sans-serif&quot;;color:teal">Risk Management Solutions<o:=
p></o:p></span></i></p>
<p class=3D"MsoNormal"><i><span style=3D"font-size:8.0pt;font-family:&quot;=
Arial&quot;,&quot;sans-serif&quot;;color:teal">Information Quality Manageme=
nt (IQM)<br>
<br>
Phone/Mobile:&nbsp; </span></i><i><span style=3D"font-size:8.0pt;font-famil=
y:&quot;Arial&quot;,&quot;sans-serif&quot;;color:blue">&#43;47 452 49 453</=
span></i><i><span style=3D"font-size:8.0pt;font-family:&quot;Arial&quot;,&q=
uot;sans-serif&quot;;color:teal">
<br>
Web: </span></i><i><span style=3D"font-size:8.0pt;font-family:&quot;Arial&q=
uot;,&quot;sans-serif&quot;;color:blue"><a href=3D"http://www.dnv.com/"><sp=
an style=3D"color:blue">www.dnv.com</span></a></span></i><span lang=3D"NO-B=
OK"><o:p></o:p></span></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
<br clear=3Dall> **********************************************************=
****************************=0D
The contents of this e-mail message and any attachments are confidential an=
d are intended solely for the addressee. If you have received this transmis=
sion in error, please immediately notify the sender by return e-mail and de=
lete this message and its attachments. Any unauthorized use, copying or dis=
semination of this transmission is prohibited. Neither the confidentiality =
nor the integrity of this message can be vouched for following transmission=
 on the Internet.=0D
***************************************************************************=
***********
</body>
</html>


--_000_0FBC44948FBC7E458DF71D62626B413F012A6D98OSL1424veritdnv_--