<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Use of Field Attribute</title><link>https://www.infopathdev.com:443/forums/thread/10199.aspx</link><pubDate>Mon, 07 Aug 2006 17:06:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:10199</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/10199.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=10199</wfw:commentRss><description>Its always arguable which to use. It really comes down to policy and preference.&lt;br /&gt;&lt;br /&gt;For example, I might use an attribute like this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&amp;lt;Product id="12345"&amp;gt;&lt;br /&gt;    &amp;lt;ProductDetail_1/&amp;gt;&lt;br /&gt;    &amp;lt;ProductDetail_2/&amp;gt;&lt;br /&gt;&amp;lt;/Product&amp;gt;&lt;/pre&gt;But someone else might recommend:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&amp;lt;Product&amp;gt;&lt;br /&gt;    &amp;lt;Id&amp;gt;12345&amp;lt;/Id&amp;gt;&lt;br /&gt;    &amp;lt;ProductDetail_1/&amp;gt;&lt;br /&gt;    &amp;lt;ProductDetail_2/&amp;gt;&lt;br /&gt;&amp;lt;/Product&amp;gt;&lt;/pre&gt;Which is right? Both.&lt;br /&gt;&lt;br /&gt;For a repeating group, I might like something like this because it makes it cleaner in the XML:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&amp;lt;Vehicle vin="" color="" engineType="" etc=""/&amp;gt;&lt;/pre&gt;Whereas someone else might prefer the following because each element is easier to find:&lt;br /&gt;&lt;pre&gt;&amp;lt;Vehicle&amp;gt;&lt;br /&gt;    &amp;lt;Vin/&amp;gt;&lt;br /&gt;    &amp;lt;Color/&amp;gt;&lt;br /&gt;    &amp;lt;EngineType/&amp;gt;&lt;br /&gt;    &amp;lt;Etc/&amp;gt;&lt;br /&gt;&amp;lt;/Vehicle&amp;gt;&lt;/pre&gt;Which is right? Again, both.&lt;br /&gt;&lt;br /&gt;It all comes down to either policy or personal preference.</description></item><item><title>Re: Use of Field Attribute</title><link>https://www.infopathdev.com:443/forums/thread/10198.aspx</link><pubDate>Fri, 04 Aug 2006 09:48:19 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:10198</guid><dc:creator>dlgross</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/10198.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=10198</wfw:commentRss><description>Greg, thanks. I accidently added a field attribute and it took me a while to realize why it was required and I could not change it, which is why I asked this question. Do you have any examples of business scenarios in which &amp;quot;attributes are tightly related to a particular element&amp;quot;? I&amp;#39;m not quite sure what you mean by this.&lt;br /&gt;Thanks</description></item><item><title>Re: Use of Field Attribute</title><link>https://www.infopathdev.com:443/forums/thread/10197.aspx</link><pubDate>Thu, 03 Aug 2006 23:32:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:10197</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/10197.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=10197</wfw:commentRss><description>There is not set pattern on this. Each has its benefits.&lt;br /&gt;&lt;br /&gt;The one thing to keep in mind is that for attributes, if you choose a datatype other than string, it automatically becomes a required field. If you want to have a &amp;quot;date&amp;quot; attribute, but not required, you must use a string--but then you lose the automatic datatype validation that InfoPath provides.&lt;br /&gt;&lt;br /&gt;For me, I like to use attributes when they are more tightly related to a particular element. And I often like to use them on repeating elements because it makes the list easier to read in the XML itself (if your into looking at the raw XML).</description></item><item><title>Use of Field Attribute</title><link>https://www.infopathdev.com:443/forums/thread/5755.aspx</link><pubDate>Thu, 03 Aug 2006 20:19:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:5755</guid><dc:creator>dlgross</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/5755.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=5755</wfw:commentRss><description>When should i use a Field Attribute instead of a Field Element?</description></item></channel></rss>