Subject: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.
Subject: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.