Lists Home |
Date Index |
Florent Georges wrote:
> Philippe Poulard wrote:
> Salut Philippe
Salut Florent ;)
>> but unlike XSLT :
>>-it can query various data sources (RDBMS with SQL, XML:DB
>>databases, LDAP, etc)
> XSLT too. The XSLT input tree must conform to the XPath Data Model,
> but there is no need to have a lexical XML representation. Actually,
> there is no need to have XML at all.
can you please give me the stylesheet that can produce the following XML :
<?xml version="1.0" encoding="UTF-8"?>
<item part-number="321" price="138.95" quantity="1">
<item part-number="654" price="29.99" quantity="2">
<item part-number="987" price="11.27" quantity="3">
...from this SQL query :
FROM po, products
WHERE po.pn = products.pn
AND id = ?
ORDER BY currency
...with XSLT ?
Here is a solution based on Active Tags that doesn't require any
vendor-specific mapping mechanism :
(as the underlying engine is in Java, all you need is a JDBC driver)
> I don't know if there are softwares like RDBMS that already implement
> that for XSLT, but I guess there are. There are for XQuery, which rely
> on the same data model.
AFAIK, there is no XML-flavor data model for SQL (I mean : as a
standard) ; at least, there is SQL/XML, but it is a mapping mechanism
and not yet widely supported
On the opposite, there is a standard for LDAP :
So, the only thing to do is to parse such a file :
(just plug the right driver to your app)
AFAIK, neither XSLT nor XQuery are defining by their own how to map SQL
to XML, they are just relying on the result XML mapping
Active Tags is rather a system that can parse XML files, validate
documents, run XSLT stylesheets, perform I/O operations, launch SQL
queries, do system interactions, etc...
| Philippe Poulard |
Have the RefleX !