<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Times New Roman; font-size: 12pt; color: #000000'>Mike,<br><br>The defect you've uncovered isn't the same as TEIID-93, it's much simpler and obvious.&nbsp; I'm checking in a change for 6.2 today.&nbsp; Are you working with 6.2 or 6.1?<br><br>~jd<br>----- "Mike Mascari" &lt;mascarim@yahoo.com&gt; wrote:
<br>&gt; <style><!-- DIV {margin:0px;} --></style><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;">&gt; <div>I've attached both the xml and the xsd used and re-tested the importation and query against them with the same result. Thanks for looking into it! Could it be the same issue as this:</div><div><br>&gt; </div><div><a href="https://jira.jboss.org/jira/browse/TEIID-93" target="_blank">https://jira.jboss.org/jira/browse/TEIID-93</a></div><div><br>&gt; </div><div>??</div><div><br>&gt; </div><div>My issue is a much simpler case, however. The query needn't be pushed down as apart of the planner over a federated view to cause the irregularity -- one need only query the XML source directly.&nbsp;</div><div><br>&gt; </div><div>Thanks again!</div><div><br>&gt; </div><div>And just for giggles:</div><div><br>&gt; </div><div><div># xmllint --schema clients.xsd clients.xml&nbsp;</div><div>&lt;?xml version="1.0"
 encoding="UTF-8"?&gt;</div><div>&lt;clients&gt;</div><div>&nbsp;&nbsp;&lt;client&gt;</div><div>&nbsp;&nbsp; &nbsp;&lt;name&gt;acme&lt;/name&gt;</div><div>&nbsp;&nbsp; &nbsp;&lt;rate&gt;15&lt;/rate&gt;</div><div>&nbsp;&nbsp;&lt;/client&gt;</div><div>&nbsp;&nbsp;&lt;client&gt;</div><div>&nbsp;&nbsp; &nbsp;&lt;name&gt;toolwerks&lt;/name&gt;</div><div>&nbsp;&nbsp; &nbsp;&lt;rate&gt;20&lt;/rate&gt;</div><div>&nbsp;&nbsp;&lt;/client&gt;</div><div>&lt;/clients&gt;</div><div>clients.xml validates</div><div><br>&gt; </div><div>:-)</div><div><br>&gt; </div><div>- Mike</div></div><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;">&gt; <br>&gt; <div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">&gt; <font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> John Doyle &lt;jdoyle@redhat.com&gt;<br>&gt; <b><span style="font-weight: bold;">To:</span></b> Mike Mascari &lt;mascarim@yahoo.com&gt;<br>&gt; <b><span style="font-weight: bold;">Cc:</span></b> teiid-users@lists.jboss.org<br>&gt; <b><span style="font-weight: bold;">Sent:</span></b> Tuesday, September 1, 2009 11:48:24 AM<br>&gt; <b><span style="font-weight: bold;">Subject:</span></b> Re: [teiid-users] unexpected query results against XML data source<br>&gt; </font><br>&gt; 
<style>p {margin:0;}</style><div style="font-family: Times New Roman; font-size: 12pt; color: rgb(0, 0, 0);">&gt; Hi Mike,<br>&gt; <br>&gt; I've tried to reproduce this but get no root elements to select from during the import process.&nbsp; Is it possible that the XSD pasted here is different from what you're using?<br>&gt; <br>&gt; ~jd<br>&gt; ----- "Mike Mascari" &lt;mascarim@yahoo.com&gt; wrote:
<br>&gt; &gt; <div style="font-family: arial,helvetica,sans-serif; font-size: 10pt; color: black;">&gt; &gt; <div>Hello. I've downloaded and installed the snapshot as of today (8/31/2009) and, using the designer:</div><div><br>&gt; &gt; </div><div>1. Used Import-&gt;XML Schema as Relational Source Model</div><div><br>&gt; &gt; </div><div>2. Selected Document over HTTP with no request parameters</div><div><br>&gt; &gt; </div><div>3. Selected No Catalog</div><div><br>&gt; &gt; </div><div>4. Chose "File System" as source of XML Schema (inlined below)</div><div><br>&gt; &gt; </div><div>5. Chose "client" (I've tried w/"clients" as well) as the root element and "Finish"</div><div><br>&gt; &gt; </div><div>6. Create a "purchasing" View Model and, with "purchasing" selected, created an "example" BaseTable. I then drag-and-drop "client" from clients.xmi Source Model into SOURCES pane. (This View abstraction turns out not to be the problem -- I query the Source via the
 Execute'd VDB with the same outcome.)</div><div><br>&gt; &gt; </div><div>7. Created a "billing" vdb, cleaned, built, and synchronized.</div><div><br>&gt; &gt; </div><div>8. Then, with this data served up by apache:</div><div><br>&gt; &gt; </div><div><div>&lt;?xml version="1.0" encoding="UTF-8"?&gt;</div><div>&lt;clients&gt;</div><div>&nbsp;&nbsp;&lt;client&gt;</div><div>&nbsp;&nbsp; &nbsp;&lt;name&gt;acme&lt;/name&gt;</div><div>&nbsp;&nbsp; &nbsp;&lt;rate&gt;15&lt;/rate&gt;</div><div>&nbsp;&nbsp;&lt;/client&gt;</div><div>&nbsp;&nbsp;&lt;client&gt;</div><div>&nbsp;&nbsp; &nbsp;&lt;name&gt;toolwerks&lt;/name&gt;</div><div>&nbsp;&nbsp; &nbsp;&lt;rate&gt;20&lt;/rate&gt;</div><div>&nbsp;&nbsp;&lt;/client&gt;</div><div>&lt;/clients&gt;</div><div><br>&gt; &gt; </div><div>I issued the following query:</div><div><br>&gt; &gt; </div><div><div>select * from clients.client</div><div><br>&gt; &gt; </div><div>and received the expected
 result:</div><div><br>&gt; &gt; </div><div><div><div>null;acme;15</div><div>null;toolwerks;20</div><div><br>&gt; &gt; </div><div>9. Then I did this:</div><div><br>&gt; &gt; </div><div>select *&nbsp;from clients.client where name = 'acme'</div><div><br>&gt; &gt; </div><div>and received *two rows*:</div><div><br>&gt; &gt; </div><div><div>null;acme;15</div><div>null;toolwerks;20</div><div><br>&gt; &gt; </div><div>10. So I did this:</div><div><br>&gt; &gt; </div><div>select *&nbsp;from clients.client where name != 'acme'&nbsp;</div><div><br>&gt; &gt; </div><div>and received the expected one row:</div><div><br>&gt; &gt; </div><div><div>null;toolwerks;20</div><div><br>&gt; &gt; </div><div>???</div><div><br>&gt; &gt; </div><div>Is there something goofy with the equality operator against XML data? Is there flag that needs flipped on these attributes? I went with the "string" mapping on the 'XML Schema as Relational Source Model' dialog wizard (pane 4 IIRC). Oughtn't I have? I also changed XML node names that might
 have been SQL keywords ('name' -&gt; 'fullname') but no
 dice...</div><div><br>&gt; &gt; </div><div>Thoughts?&nbsp;</div><div><br>&gt; &gt; </div><div>- Mike</div><div><br>&gt; &gt; </div><div>Schema:</div><div><br>&gt; &gt; </div></div></div></div></div></div><div><div>&lt;?xml version="1.0"?&gt;</div><div><span></span></div><div><br>&gt; &gt; </div><div>&nbsp;&nbsp;&lt;!-- our client database --&gt;</div><div><br>&gt; &gt; </div><div>&nbsp;&nbsp;&lt;xs:element name="clients"&gt;</div><div>&nbsp;&nbsp;</div><div>&nbsp;&nbsp; &nbsp;&lt;xs:complexType&gt;</div><div>&nbsp;&nbsp; &nbsp; &nbsp;&lt;xs:sequence&gt;</div><div><br>&gt; &gt; </div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&lt;!-- the client --&gt;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&lt;xs:element name="client" minOccurs="1" maxOccurs="unbounded"&gt;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;
 &nbsp;&lt;xs:complexType&gt;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;xs:sequence&gt;</div><div><br>&gt; &gt; </div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;!-- client name --&gt;</div><div><br>&gt; &gt; </div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1"/&gt;</div><div><br>&gt; &gt; </div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;!-- bill rate --&gt;</div><div><br>&gt; &gt; </div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;xs:element name="rate" minOccurs="0"&gt;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;xs:simpleType&gt;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;xs:restriction base="xs:decimal"&gt;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;xs:minInclusive
 value="50"/&gt;</div><div>&nbsp;&nbsp; &nbsp; &nbsp;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;xs:maxInclusive value="250"/&gt;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/xs:restriction&gt;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/xs:simpleType&gt;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/xs:element&gt;</div><div><br>&gt; &gt; </div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/xs:sequence&gt;</div><div><br>&gt; &gt; </div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/xs:complexType&gt;</div><div><br>&gt; &gt; </div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&lt;/xs:element&gt;</div><div><br>&gt; &gt; </div><div>&nbsp;&nbsp; &nbsp; &nbsp;&lt;/xs:sequence&gt;</div><div>&nbsp;&nbsp; &nbsp;&lt;/xs:complexType&gt;</div><div><br>&gt; &gt; </div><div>&nbsp;&nbsp;&lt;/xs:element&gt;</div><div>&lt;/xs:schema&gt;</div></div><div><br>&gt; &gt; </div></div><div style="">&gt; &gt; </div></div><br>&gt; &gt; 



      <br>&gt; <span>&gt; _______________________________________________
teiid-users mailing list
teiid-users@lists.jboss.org
<a target="_blank" href="https://lists.jboss.org/mailman/listinfo/teiid-users">https://lists.jboss.org/mailman/listinfo/teiid-users</a>
</span></div></div></div><div style="position: fixed;">&gt; </div></div><br>&gt; 

      <br>&gt; _______________________________________________
teiid-users mailing list
teiid-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/teiid-users
</div></body></html>