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:"Ar=
ial","sans-serif";color:blue;background:white;mso-highlight:=
white">I 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:"Ar=
ial","sans-serif";color:blue;background:white;mso-highlight:=
white"><o:p> </o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-size:10.0pt;font-family:"Ar=
ial","sans-serif";color:blue;background:white;mso-highlight:=
white"><</span><span style=3D"font-size:10.0pt;font-family:"Arial&q=
uot;,"sans-serif";color:maroon;background:white;mso-highlight:whi=
te">xsd:element</span><span style=3D"font-size:10.0pt;font-family:"Ari=
al","sans-serif";color:red;background:white;mso-highlight:wh=
ite">
name</span><span style=3D"font-size:10.0pt;font-family:"Arial",&=
quot;sans-serif";color:blue;background:white;mso-highlight:white">=3D&=
quot;</span><span style=3D"font-size:10.0pt;font-family:"Arial",&=
quot;sans-serif";color:black;background:white;mso-highlight:white">C2<=
/span><span style=3D"font-size:10.0pt;font-family:"Arial","s=
ans-serif";color:blue;background:white;mso-highlight:white">"</sp=
an><span style=3D"font-size:10.0pt;font-family:"Arial","sans=
-serif";color:red;background:white;mso-highlight:white">
type</span><span style=3D"font-size:10.0pt;font-family:"Arial",&=
quot;sans-serif";color:blue;background:white;mso-highlight:white">=3D&=
quot;</span><span style=3D"font-size:10.0pt;font-family:"Arial",&=
quot;sans-serif";color:black;background:white;mso-highlight:white">xsd=
:boolean</span><span style=3D"font-size:10.0pt;font-family:"Arial"=
;,"sans-serif";color:blue;background:white;mso-highlight:white">&=
quot;</span><span style=3D"font-size:10.0pt;font-family:"Arial",&=
quot;sans-serif";color:red;background:white;mso-highlight:white">
fixed</span><span style=3D"font-size:10.0pt;font-family:"Arial",=
"sans-serif";color:blue;background:white;mso-highlight:white">=3D=
"</span><span style=3D"font-size:10.0pt;font-family:"Arial",=
"sans-serif";color:black;background:white;mso-highlight:white">tr=
ue</span><span style=3D"font-size:10.0pt;font-family:"Arial",&quo=
t;sans-serif";color:blue;background:white;mso-highlight:white">"<=
/span><span style=3D"font-size:10.0pt;font-family:"Arial","s=
ans-serif";color:red;background:white;mso-highlight:white">
minOccurs</span><span style=3D"font-size:10.0pt;font-family:"Arial&qu=
ot;,"sans-serif";color:blue;background:white;mso-highlight:white"=
>=3D"</span><span style=3D"font-size:10.0pt;font-family:"Arial&qu=
ot;,"sans-serif";color:black;background:white;mso-highlight:white=
">0</span><span style=3D"font-size:10.0pt;font-family:"Arial",&qu=
ot;sans-serif";color:blue;background:white;mso-highlight:white">"=
/></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"><Cap=
ability><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB" style=3D"color:#1F497D"><C2/=
><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB" style=3D"color:#1F497D"></Ca=
pability><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"><Cap=
ability><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB" style=3D"color:#1F497D"><C2&=
gt;true</C2> <o:p>
</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB" style=3D"color:#1F497D"></Ca=
pability><o:p></o:p></span></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
<p class=3D"MsoNormal">are legal representantions<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
<p class=3D"MsoNormal">How can I generically enforce xmlbeans consuming a d=
ocument containing a multitude of option 1 to write out an xml docume=
nt using option 2 ?
<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p> </o:p></p>
<p class=3D"MsoNormal" style=3D"text-autospace:none"><i><span style=3D"font=
-size:8.0pt;font-family:"Arial","sans-serif";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:"Tahoma&q=
uot;,"sans-serif";color:teal">Geir =D8vsttun
<br>
</span></i></b><i><span style=3D"font-size:8.0pt;font-family:"Arial&qu=
ot;,"sans-serif";color:teal">_______________________________<o:p>=
</o:p></span></i></p>
<p class=3D"MsoNormal"><i><span style=3D"font-size:8.0pt;font-family:"=
Arial","sans-serif";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:"=
Arial","sans-serif";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:"=
Arial","sans-serif";color:teal">Information Quality Manageme=
nt (IQM)<br>
<br>
Phone/Mobile: </span></i><i><span style=3D"font-size:8.0pt;font-famil=
y:"Arial","sans-serif";color:blue">+47 452 49 453</=
span></i><i><span style=3D"font-size:8.0pt;font-family:"Arial",&q=
uot;sans-serif";color:teal">
<br>
Web: </span></i><i><span style=3D"font-size:8.0pt;font-family:"Arial&q=
uot;,"sans-serif";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> </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_--