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

List:       xmlbeans-dev
Subject:    RE: toString()/Pretty print - outputs default values if not explicitly set?
From:       "Radu Preotiuc-Pietro" <radup () bea ! com>
Date:       2007-06-25 4:21:04
Message-ID: BF6B6CA032BA0A429BD924F96765147D0B75C6 () repbex02 ! amer ! bea ! com
[Download RAW message or body]

Kurt, the reason to have default values declared in the Schema is so you
_don't_ have to specify them in the instance, they are defaulted. So
this is what XMLBeans in doing. The default values are returned when you
called the generated getters, but they are not put in the XML document.
 
Radu


________________________________

	From: Kurt Roy [mailto:kroy@prospricing.com] 
	Sent: Saturday, June 23, 2007 2:34 PM
	To: dev@xmlbeans.apache.org
	Subject: toString()/Pretty print - outputs default values if not
explicitly set?
	
	

	Hello,

	 

	We have a schema that has some default values specified for some
attributes. We are building an xmlbeans structure in order to do a
"toString()" to get the resultant output xml. For some of the default
values, we do not have any exact values to set on the xmlbean, so we are
not explicitly setting values for these attributes.

	 

	We were expecting the XmlBean to provide the default value upon
calling "toString()".

	 

	Is this supported? I did not see this in the doc (very possible
I did not see it though).

	 

	Thanks,

	Kurt Roy | PROS | Software Architect, Software Development
	phone: +1 713-335-8007 | email: kroy@prospricing.com 

	Save the Date for the 14th Annual PROS Summit * April 20-23,
2008 at the Hilton Americas Hotel in Houston, Texas *
www.prospricing.com <http://www.prospricing.com/> 

	 

	
________________________________

	The information contained in this email may be confidential
and/or legally privileged. It has been sent for the sole use of the
intended recipient(s). If the reader of this message is not an intended
recipient, you are hereby notified that any unauthorized review, use,
disclosure, dissemination, distribution, or copying of this
communication, or any of its contents, is strictly prohibited. If you
have received this communication in error, please contact the sender by
reply email and destroy all copies of the original message. Thank you
	
	

	


Notice:  This email message, together with any attachments, may contain information  \
of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be \
confidential,  proprietary,  copyrighted  and/or legally privileged, and is intended \
solely for the use of the individual or entity named in this message. If you are not \
the intended recipient, and have received this message in error, please immediately \
return this by email and then delete it.


[Attachment #3 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:o = 
"urn:schemas-microsoft-com:office:office" xmlns:w = 
"urn:schemas-microsoft-com:office:word" xmlns:st1 = 
"urn:schemas-microsoft-com:office:smarttags" xmlns:ns0 = 
"urn:schemas-microsoft-com:office:smarttags"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3132" name=GENERATOR><o:SmartTagType 
name="State" 
namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType><o:SmartTagType \
 name="City" 
namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType><o:SmartTagType \
 name="place" 
namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType><!--[if \
!mso]> <STYLE>st1\:* {
	BEHAVIOR: url(#default#ieooui)
}
</STYLE>
<![endif]-->
<STYLE>@font-face {
	font-family: Verdana;
}
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; }
P.MsoNormal {
	FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
	FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
	FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
	COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
	COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
	COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
	COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
	COLOR: windowtext; FONT-FAMILY: Arial; mso-style-type: personal-compose
}
DIV.Section1 {
	page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV dir=ltr align=left><SPAN class=718491704-25062007><FONT face=Arial 
color=#0000ff size=2>Kurt, the reason to have default values declared in the 
Schema is so you _don't_ have to specify them in the&nbsp;instance, they are 
defaulted. So this is what XMLBeans in doing. The default values are returned 
when you called the generated getters, but they are not put in the XML 
document.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=718491704-25062007><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=718491704-25062007><FONT face=Arial 
color=#0000ff size=2>Radu</FONT></SPAN></DIV><BR>
<BLOCKQUOTE dir=ltr 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; \
MARGIN-RIGHT: 0px">  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
  <HR tabIndex=-1>
  <FONT face=Tahoma size=2><B>From:</B> Kurt Roy [mailto:kroy@prospricing.com] 
  <BR><B>Sent:</B> Saturday, June 23, 2007 2:34 PM<BR><B>To:</B> 
  dev@xmlbeans.apache.org<BR><B>Subject:</B> toString()/Pretty print - outputs 
  default values if not explicitly set?<BR></FONT><BR></DIV>
  <DIV></DIV>
  <DIV class=Section1>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hello,<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">We have a schema that has some 
  default values specified for some attributes. We are building an xmlbeans 
  structure in order to do a &#8220;toString()&#8221; to get the resultant output \
xml. For   some of the default values, we do not have any exact values to set on the 
  xmlbean, so we are not explicitly setting values for these 
  attributes.<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">We were expecting the XmlBean to 
  provide the default value upon calling 
  &#8220;toString()&#8221;.<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Is this supported? I did not see 
  this in the doc (very possible I did not see it 
  though).<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Thanks,<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal 
  style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><B><FONT 
  face=Verdana color=#2020a0 size=1><SPAN 
  style="FONT-WEIGHT: bold; FONT-SIZE: 7.5pt; COLOR: #2020a0; FONT-FAMILY: \
Verdana">Kurt   Roy</SPAN></FONT></B><FONT face=Verdana color=#2020a0 size=1><SPAN 
  style="FONT-SIZE: 7.5pt; COLOR: #2020a0; FONT-FAMILY: \
Verdana">&nbsp;|&nbsp;PROS&nbsp;|   Software Architect, Software \
Development</SPAN></FONT><FONT   color=#1f497d><SPAN style="COLOR: \
#1f497d"><BR></SPAN></FONT><B><FONT   face=Verdana color=#2020a0 size=1><SPAN 
  style="FONT-WEIGHT: bold; FONT-SIZE: 7.5pt; COLOR: #2020a0; FONT-FAMILY: \
Verdana">phone:</SPAN></FONT></B><FONT   face=Verdana color=#2020a0 size=1><SPAN 
  style="FONT-SIZE: 7.5pt; COLOR: #2020a0; FONT-FAMILY: Verdana"> 
  +1&nbsp;713-335-8007 | <B><SPAN 
  style="FONT-WEIGHT: bold">email:</SPAN></B>&nbsp;<A 
  title=mailto:name@prospricing.com 
  href="mailto:kroy@prospricing.com">kroy@prospricing.com</A> 
  <o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal 
  style="mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><FONT 
  face=Verdana color=navy size=1><SPAN 
  style="FONT-SIZE: 7.5pt; COLOR: navy; FONT-FAMILY: Verdana">Save the Date for 
  the 14<SUP>th</SUP> Annual PROS </SPAN></FONT><FONT face=Verdana size=1><SPAN 
  style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"><ns0:City 
  w:endInsDate="2007-06-23T16:28:00Z" w:endInsAuthor="kroy" 
  w:insDate="2007-06-23T16:28:00Z" w:insAuthor="kroy"><st1:City w:st="on"><FONT 
  color=navy><SPAN 
  style="COLOR: navy">Summit</SPAN></FONT></st1:City></ns0:City><FONT 
  color=navy><SPAN style="COLOR: navy"> </SPAN></FONT><FONT color=#2020a0><SPAN 
  style="COLOR: #2020a0">&#8226;&nbsp;</SPAN></FONT><FONT color=navy><SPAN 
  style="COLOR: navy">April 20-23, 2008 at the Hilton Americas Hotel in 
  <U1:PLACE u2:st="on"></SPAN></FONT><ns0:place 
  w:endInsDate="2007-06-23T16:28:00Z" w:endInsAuthor="kroy" 
  w:insDate="2007-06-23T16:28:00Z" w:insAuthor="kroy"><U3:CITY 
  u2:st="on"><ST1:PLACE u2:st="on"><ns0:City w:endInsDate="2007-06-23T16:28:00Z" 
  w:endInsAuthor="kroy" w:insDate="2007-06-23T16:28:00Z" 
  w:insAuthor="kroy"><st1:place w:st="on"><st1:City w:st="on"><FONT 
  color=navy><SPAN 
  style="COLOR: navy">Houston</st1:place></U3:CITY></U1:PLACE></SPAN></FONT></st1:City></ns0:City></ST1:PLACE><FONT \
  color=navy><SPAN style="COLOR: navy">, <U2:STATE 
  u4:st="on"></SPAN></FONT><ns0:State w:endInsDate="2007-06-23T16:28:00Z" 
  w:endInsAuthor="kroy" w:insDate="2007-06-23T16:28:00Z" 
  w:insAuthor="kroy"><st1:State w:st="on"><FONT color=navy><SPAN 
  style="COLOR: navy">Texas</U2:STATE></SPAN></FONT></st1:State></ns0:State></ns0:place><FONT \
  color=navy><SPAN style="COLOR: navy">&nbsp;</SPAN></FONT><FONT 
  color=#2020a0><SPAN style="COLOR: #2020a0">&#8226;</SPAN></FONT><FONT 
  color=navy><SPAN style="COLOR: navy"> <A title=http://www.prospricing.com/ 
  href="http://www.prospricing.com/"><FONT title=http://www.prospricing.com/ 
  color=#003366><SPAN title=http://www.prospricing.com/><SPAN 
  style="COLOR: #003366">www.prospricing.com</SPAN></SPAN></FONT></A></SPAN></FONT></SPAN></FONT><o:p></o:p></P>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt"><o:p>&nbsp;</o:p></SPAN></FONT></P></DIV>
  <DIV>
  <P>
  <HR>
  The information contained in this email may be confidential and/or legally 
  privileged. It has been sent for the sole use of the intended recipient(s). If 
  the reader of this message is not an intended recipient, you are hereby 
  notified that any unauthorized review, use, disclosure, dissemination, 
  distribution, or copying of this communication, or any of its contents, is 
  strictly prohibited. If you have received this communication in error, please 
  contact the sender by reply email and destroy all copies of the original 
  message. Thank you<BR><BR>
  <P></P></DIV></BLOCKQUOTE></BODY></HTML>
<br>
Notice:  This email message, together with any attachments, may contain information  \
of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be \
confidential,  proprietary,  copyrighted  and/or legally privileged, and is intended \
solely for the use of the individual or entity named in this message. If you are not \
the intended recipient, and have received this message in error, please immediately \
return this by email and then delete it.



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

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