<?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: Enumeration with attribute(s)</title><link>https://www.infopathdev.com:443/forums/thread/6486.aspx</link><pubDate>Sat, 22 Jan 2005 01:35:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6486</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6486.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6486</wfw:commentRss><description>InfoPath doesn't support every construct possible in XSD. Although it is robust, it can be limiting in more complex areas.&lt;br /&gt;&lt;br /&gt;Now, you can agreeably argue that this is not "complex", but unfortunately, that is for InfoPath, and not us to decide.&lt;br /&gt;&lt;br /&gt;I've worked with schemas that seem to work fine in InfoPath but there are issues with full compatibility.&lt;br /&gt;&lt;br /&gt;I don't have an answer for you on this one.&lt;br /&gt;&lt;br /&gt;Greg Collins [InfoPath MVP]</description></item><item><title>Re: Enumeration with attribute(s)</title><link>https://www.infopathdev.com:443/forums/thread/6485.aspx</link><pubDate>Fri, 21 Jan 2005 23:06:05 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6485</guid><dc:creator>4spammers</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6485.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6485</wfw:commentRss><description>&lt;blockquote id="quote"&gt;&lt;font size="1" face="Verdana, Arial, Helvetica" id="quote"&gt;quote:&lt;hr height="1" noshade id="quote"&gt;&lt;i&gt;Originally posted by Greg Collins&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Using XML Spy to create a similar schema, I find that I am blocked at adding an attribute to an enumarated node, and I am blocked at adding enumerations to a node with an attribute.&lt;hr height="1" noshade id="quote"&gt;&lt;/font id="quote"&gt;&lt;/blockquote id="quote"&gt;&lt;br /&gt;Actually, my example (above) was made using XMLSpy.  You can do it too.  First create a global simpleType for the enumeration, then create a global complexType that extends the simpleType and adds the attribute, and finally create an element that uses the complexType.&lt;br /&gt;&lt;br /&gt;I researched how to do this in XML Schema.  That's not the problem.   The problem is that InfoPath won't allow you to edit the display values.&lt;br /&gt;&lt;br /&gt;What's frustrating is that InfoPath actually &lt;i&gt;supports&lt;/i&gt; this schema -- it just won't let you changes the values while editing.  If you take the example I gave (above) and paste it into XMLSpy, it will be valid.  If you then build a form in InfoPath using the schema, you'll see my problem when you try to edit the values for the List Box.  &lt;b&gt;But&lt;/b&gt;, if you preview the same form in InfoPath, it works!  The only problem is in the InfoPath editor.&lt;br /&gt;&lt;br /&gt;I've tried adding the attribute to the XML template, hoping that its presence would be enough to make the enumerated values valid while editing the form...but no luck.&lt;br /&gt;&lt;br /&gt;What's also frustrating me is that this seems like such a simple element.  For example:&lt;pre&gt;&amp;lt;state hometown="yes"&amp;gt;California&amp;lt;/state&amp;gt;&lt;/pre&gt;where &amp;lt;state&amp;gt; has an enumerated list of possible answers, but also has an attribute.  I dunno; it doesn't seem that complex to me.&lt;br /&gt;&lt;br /&gt;As it stands, InfoPath forces me to use something like:&lt;pre&gt;&amp;lt;state&amp;gt;&lt;br /&gt;  &amp;lt;value&amp;gt;California&amp;lt;/value&amp;gt;&lt;br /&gt;  &amp;lt;hometown&amp;gt;yes&amp;lt;/hometown&amp;gt;&lt;br /&gt;&amp;lt;/state&amp;gt;&lt;/pre&gt;</description></item><item><title>Re: Enumeration with attribute(s)</title><link>https://www.infopathdev.com:443/forums/thread/6484.aspx</link><pubDate>Thu, 20 Jan 2005 19:40:53 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:6484</guid><dc:creator>Greg Collins</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/6484.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=6484</wfw:commentRss><description>Using XML Spy to create a similar schema, I find that I am blocked at adding an attribute to an enumarated node, and I am blocked at adding enumerations to a node with an attribute.&lt;br /&gt;&lt;br /&gt;It looks like, superficially, that what you want to do can't be done. But that doesn't mean that it really can't be done -- you'll need to do some more research and more asking around to find out for sure.&lt;br /&gt;&lt;br /&gt;Greg Collins [InfoPath MVP]</description></item><item><title>Enumeration with attribute(s)</title><link>https://www.infopathdev.com:443/forums/thread/4542.aspx</link><pubDate>Thu, 20 Jan 2005 16:48:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:4542</guid><dc:creator>4spammers</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/4542.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=4542</wfw:commentRss><description>I'm generating an InfoPath form from an XML Schema.  I can easily use an enumeration to generate a Drop-Down List Box or group of Option Buttons, but I'd like the enumeration element to have attributes as well.  I can create a valid schema, but InfoPath treats all of the values as "invalid."&lt;br /&gt;&lt;br /&gt;Example schema:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"&amp;gt;&lt;br /&gt;  &amp;lt;xs:element name="form"&amp;gt;&lt;br /&gt;    &amp;lt;xs:complexType&amp;gt;&lt;br /&gt;      &amp;lt;xs:sequence&amp;gt;&lt;br /&gt;        &amp;lt;xs:element ref="q1"/&amp;gt;&lt;br /&gt;      &amp;lt;/xs:sequence&amp;gt;&lt;br /&gt;    &amp;lt;/xs:complexType&amp;gt;&lt;br /&gt;  &amp;lt;/xs:element&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;xs:element name="q1" type="q1_type"/&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;xs:complexType name="q1_type"&amp;gt;&lt;br /&gt;    &amp;lt;xs:simpleContent&amp;gt;&lt;br /&gt;      &amp;lt;xs:extension base="q1_type_choices"&amp;gt;&lt;br /&gt;        &amp;lt;xs:attribute name="q1_attribute" type="xs:string"/&amp;gt;&lt;br /&gt;      &amp;lt;/xs:extension&amp;gt;&lt;br /&gt;    &amp;lt;/xs:simpleContent&amp;gt;&lt;br /&gt;  &amp;lt;/xs:complexType&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;xs:simpleType name="q1_type_choices"&amp;gt;&lt;br /&gt;    &amp;lt;xs:restriction base="xs:positiveInteger"&amp;gt;&lt;br /&gt;      &amp;lt;xs:enumeration value="1"/&amp;gt;&lt;br /&gt;      &amp;lt;xs:enumeration value="2"/&amp;gt;&lt;br /&gt;      &amp;lt;xs:enumeration value="3"/&amp;gt;&lt;br /&gt;    &amp;lt;/xs:restriction&amp;gt;&lt;br /&gt;  &amp;lt;/xs:simpleType&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/xs:schema&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;i&gt;q1_type_choices&lt;/i&gt; defines the choices (1, 2, or 3). &lt;i&gt;q1_type&lt;/i&gt; extends the enumeration with an attribute.  The result is a &lt;i&gt;form&lt;/i&gt; with a single element (&lt;i&gt;q1&lt;/i&gt;) that can contain values 1, 2, or 3 and have an attribute (&lt;i&gt;q1_attribute&lt;/i&gt;).&lt;br /&gt;&lt;br /&gt;I can load this schema into InfoPath and drag &lt;i&gt;q1&lt;/i&gt; over as a Drop-Down List Box; however, the properties for the Drop-Down List Box show the values (1, 2, and 3) as "invalid."  I cannot change the display values within InfoPath, because it refuses any value.&lt;br /&gt;&lt;br /&gt;I know the alternative is to use elements instead of attributes, but would like to know if there's a trick to allow for an enumeration + attributes before I bail on it.&lt;br /&gt;&lt;br /&gt;Thanks for any suggestions.  I'm an InfoPath newbie, so if I've missed something obvious or posted in the wrong forum, please accept my apologies.</description></item></channel></rss>