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
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Byron BignellSubject: XSLT using DBXML and XML
Author: Byron Bignell
Date: 03 May 2007 05:55 PM
Originally Posted: 03 May 2007 05:34 PM
Well, I'm trying to build an xslt that uses data from a query (DB) and from an XML file as source material. I need to (and have been trying to) get the thing to work to no avail yet.

I'm testing for equality between a value from the database and the matching value from the xml. What I'm seeing is that the data from the database just isn't there at the time I test the transform.

for example:
<a:shortdescription>
<xsl:value-of select="document('xquery:///jdbc:xquery:sqlserver://localhost:1433;schema=dbo;table=Channels;user=sa;password=173A6451196704;xmlforest=true;DatabaseName=xmradio;urltype=.xml')/s:sequence/Channels/ChannelName"/>
</a:shortdescription>

returns nothing when I do the transform, but when I just examine the data 'raw' (so to speak) its there.

I've tested the DBXML data alone and its 'there'.

Not sure where I've gone wrong; although my mother can tell me endlessly...but that's another story.

Thoughts?

Byron

Postnext
Ivan PedruzziSubject: XSLT using DBXML and XML
Author: Ivan Pedruzzi
Date: 03 May 2007 06:05 PM
Hi Byron,

What do you mean by "raw"?

What do you see if you simply double click on a table in Stylus Studio File Explorer?

Also you may want to try XQuery to access relation data.
Here a useful video tutorial
http://www.xquery.com/videos/datadirectxquery/ddxq1a.html


Hope this helps
Ivan Pedruzzi
Stylus Studio Team

Postnext
Byron BignellSubject: XSLT using DBXML and XML
Author: Byron Bignell
Date: 03 May 2007 06:10 PM
Hi Ivan,

Well,by raw I mean that when I double click on a table I see all the data in XML.

I'll have a look at the tutorial.

B/

Postnext
Byron BignellSubject: XSLT using DBXML and XML
Author: Byron Bignell
Date: 03 May 2007 07:24 PM
Originally Posted: 03 May 2007 06:21 PM
Hi Ivan,

I love this tool. I swear in the name of Wotan himself. I LOVE this tool.

Now that it looks right and all, what's the best way to deploy this to a coldfusion server?

Byron

Postnext
Byron BignellSubject: XSLT using DBXML and XML
Author: Byron Bignell
Date: 03 May 2007 07:46 PM
So, it all seems to have worked. I have one question about deploying this to a web server and being able to pass in the path and name of the XML file to process.

where $Channels/ChannelNumber = doc("file:///c:/Inetpub/wwwroot/xmradio/www/xml/onXM_channels/44.xml")/channel/@number

In this case I need to be able to pass in "file:///c:/Inetpub/wwwroot/xmradio/www/xml/onXM_channels/44.xml" or more correctly just the XML document name as a variable to the java code/class that gets generated.

Byron

Posttop
Ivan PedruzziSubject: XSLT using DBXML and XML
Author: Ivan Pedruzzi
Date: 03 May 2007 11:23 PM
Byron,

You will need to declare an external variable

declare variable $inputdoc as document-node(element(*,xs:untyped)) external;

You will then replace doc(".../44.xml") with $inputdoc.

Stylus Studio bundles a servlet example (examples\XQueryWebService) that shows how to deploy xquery queries as web service.

You just need to deploy the XQueryWebService directory and copy the <stylus-folder>\bin\lib\datadirect\.* to WEB-INF\lib directory

Once the the servlet is up an running you can copy your xquery files into the servlet folder.

To get the WSDL you simply open
http://myserver/XQ


Ivan Pedruzzi
Stylus Studio Team

 
Topic Page 1 2 3 4 5 6 7 8 9 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.