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
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
+ Stylus Studio Technical Forum (14621)
+ Website Feedback (249)
- XSLT Help and Discussion (7625)
-> + Use of before and after string (3) Sticky Topic
-> - How do I substitute element ty... (1)
-> + How does one add working days ... (4)
-> - Help, I have existing XLT and... (1)
-> + Need help on XSLT issue - (2)
-> + EDI to XML Conversion (7)
-> - XML To JSON Conversion using X... (1)
-> + Formatting Paragraphs to same ... (2)
-> - Grouping of records (1)
-> + Problems with xsd 1.1 (4)
-> + XML to HL7 mapping (3)
-> + XSLT 3 and Iterate (2)
-> + XSL-FO to PDF preview (3)
-> + java.lang.RuntimeException: Er... (2)
-> + Create Acroforms with Stylus X... (2)
-> + How to change XSLT parameter s... (3)
-> + how to change format of the da... (2)
-> + Search "Next 8 Results " doesn... (2)
-> - Support for Git (1)
-> + newbee (8)
-- [1-20] [21-40] [41-60] Next
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
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

   
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.