<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Times New Roman; font-size: 12pt; color: #000000'>Hi Mike,<br><br>I've tried to reproduce this but get no root elements to select from during the import process. Is it possible that the XSD pasted here is different from what you're using?<br><br>~jd<br>----- "Mike Mascari" <mascarim@yahoo.com> wrote:
<br>> <style><!-- DIV {margin:0px;} --></style><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt; color: black;">> <div>Hello. I've downloaded and installed the snapshot as of today (8/31/2009) and, using the designer:</div><div><br>> </div><div>1. Used Import->XML Schema as Relational Source Model</div><div><br>> </div><div>2. Selected Document over HTTP with no request parameters</div><div><br>> </div><div>3. Selected No Catalog</div><div><br>> </div><div>4. Chose "File System" as source of XML Schema (inlined below)</div><div><br>> </div><div>5. Chose "client" (I've tried w/"clients" as well) as the root element and "Finish"</div><div><br>> </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>> </div><div>7. Created a "billing" vdb, cleaned, built, and synchronized.</div><div><br>> </div><div>8. Then, with this data served up by apache:</div><div><br>> </div><div><div><?xml version="1.0" encoding="UTF-8"?></div><div><clients></div><div> <client></div><div> <name>acme</name></div><div> <rate>15</rate></div><div> </client></div><div> <client></div><div> <name>toolwerks</name></div><div> <rate>20</rate></div><div> </client></div><div></clients></div><div><br>> </div><div>I issued the following query:</div><div><br>> </div><div><div>select * from clients.client</div><div><br>> </div><div>and received the expected
result:</div><div><br>> </div><div><div><div>null;acme;15</div><div>null;toolwerks;20</div><div><br>> </div><div>9. Then I did this:</div><div><br>> </div><div>select * from clients.client where name = 'acme'</div><div><br>> </div><div>and received *two rows*:</div><div><br>> </div><div><div>null;acme;15</div><div>null;toolwerks;20</div><div><br>> </div><div>10. So I did this:</div><div><br>> </div><div>select * from clients.client where name != 'acme' </div><div><br>> </div><div>and received the expected one row:</div><div><br>> </div><div><div>null;toolwerks;20</div><div><br>> </div><div>???</div><div><br>> </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' -> 'fullname') but no
dice...</div><div><br>> </div><div>Thoughts? </div><div><br>> </div><div>- Mike</div><div><br>> </div><div>Schema:</div><div><br>> </div></div></div></div></div></div><div><div><?xml version="1.0"?></div><div><span></span></div><div><br>> </div><div> <!-- our client database --></div><div><br>> </div><div> <xs:element name="clients"></div><div> </div><div> <xs:complexType></div><div> <xs:sequence></div><div><br>> </div><div> <!-- the client --></div><div> </div><div> <xs:element name="client" minOccurs="1" maxOccurs="unbounded"></div><div>
<xs:complexType></div><div> <xs:sequence></div><div><br>> </div><div> <!-- client name --></div><div><br>> </div><div> <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1"/></div><div><br>> </div><div> <!-- bill rate --></div><div><br>> </div><div> <xs:element name="rate" minOccurs="0"></div><div> <xs:simpleType></div><div> <xs:restriction base="xs:decimal"></div><div> <xs:minInclusive value="50"/></div><div>
<xs:maxInclusive value="250"/></div><div> </xs:restriction></div><div> </xs:simpleType></div><div> </xs:element></div><div><br>> </div><div> </xs:sequence></div><div><br>> </div><div> </xs:complexType></div><div><br>> </div><div> </xs:element></div><div><br>> </div><div> </xs:sequence></div><div> </xs:complexType></div><div><br>> </div><div> </xs:element></div><div></xs:schema></div></div><div><br>> </div></div><div style="position: fixed;">> </div></div><br>>
<br>> _______________________________________________
teiid-users mailing list
teiid-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/teiid-users
</div></body></html>