XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
alessandro marzialiSubject: XQUERY default views
Author: alessandro marziali
Date: 16 Apr 2004 06:21 AM
I would like to know how it is possible to obtain
a default XML document from a table of a relational
database in XQUERY. Do I have to write a simple
SQL/XML query to obtain an XML document and then
write XQUERY statements on it?

Best Regards.

Alessandro Marziali

Postnext
Alberto MassariSubject: Re: XQUERY default views
Author: Alberto Massari
Date: 16 Apr 2004 02:29 PM
Hi Alessandro,

At 06.23 16/04/2004 -0400, stylus-studio-faq Listmanager wrote:
>From: "alessandro marziali"
><alessandro.marziali@enel.it>
>
>I would like to know how it is possible to obtain
>a default XML document from a table of a relational
>database in XQUERY. Do I have to write a simple
>SQL/XML query to obtain an XML document and then
>write XQUERY statements on it?

What do you mean by "default XML document"? If you enter a simple SQL query
in the SQL/XML editor and run it, you will get back an XML document having
every line in the SQL table wrapped in a "row" element, with the values for
each column inside an element named after the column name. At that point
you can write a XSL or XQuery transformation to filter/convert it as you
like it.
These transformations can be run either on the XML file saved from the
previous step, or on the Stylus-specific URL representing the SQL/XML query
(something like db:///MySQLQuery.rdbxml); in the first case you will be
working on the snapshot on data you received when you ran the query, in the
latter the data will be fetched from the database every time you run the
XSL or XQuery transformation.

Hope this answer your question,
Alberto


Posttop
Ivan PedruzziSubject: RE: XQUERY default views
Author: Ivan Pedruzzi
Date: 16 Apr 2004 05:23 PM


> I would like to know how it is possible to obtain
> a default XML document from a table of a relational
> database in XQUERY. Do I have to write a simple
> SQL/XML query to obtain an XML document and then
> write XQUERY statements on it?

It depends on what XQuery processor you are using.
As Alberto pointed out today with Stylus you need to create a "DB to
XML" data source to run XQuery against a relational database.

In the near future it will be possible to run XQuery directly against
the database.
Take a look to this interesting white paper
http://www.datadirect.com/techzone/xml/topics/xquerysupport/index.ssp

Ivan

>
> Best Regards.
>
> Alessandro Marziali

 
Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.