XSLT and DB2 data

Please support our XML, XSLT and XPATH advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Oct 2007
Posts: 21
Reputation: v.godhe is an unknown quantity at this point 
Solved Threads: 0
v.godhe v.godhe is offline Offline
Newbie Poster

Re: XSLT and DB2 data

 
0
  #11
Feb 14th, 2008
There is another XSL function, XSLTransformToClob. Is the syntax similar to XSLTransformToFile?
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 76
Reputation: dilasing is an unknown quantity at this point 
Solved Threads: 0
dilasing dilasing is offline Offline
Junior Poster in Training

Re: XSLT and DB2 data

 
0
  #12
Mar 10th, 2008
XSLTransformToClob() reads an XML document as CLOB locator and a stylesheet as CLOB or from a file, and returns the document as CLOB.

Syntax of XSLTransformToClob:

XSLTransformToClob(xmlobj , stylesheet, param, validate)

i) xmlobj -> The XML document (CLOB) or (CAST(doc AS CLOB(4k)))
ii) stylesheet -> The style sheet (CLOB), The location and name of the stylesheet input file(VARCHAR)
iii) param -> The XSLT parameter document (CLOB), The location and name of the XSLT parameter file(VARCHAR)
iv) validate -> Enable (1) or disable (0) validation of the xmlobj (INTEGER)

Consider the following example:

SELECT XSLTransformToClob(CAST(doc AS CLOB(4k)),
‘c:\dxx_install\samples\extenders\db2xml\xslt\getstart.xsl', 1)
FROM xslt_tab

In the above example, the xml document is stored in in the doc column which is of type “XML”. And “c:\dxx_install\samples\extenders\db2xml\xslt\getstart.xsl” stylesheet is applied to the xml document.

After executing the above specified query, it returns a document by applying stylesheet on the document stored in the “doc” column.
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 21
Reputation: v.godhe is an unknown quantity at this point 
Solved Threads: 0
v.godhe v.godhe is offline Offline
Newbie Poster

Re: XSLT and DB2 data

 
0
  #13
Mar 17th, 2008
I have used DB2. But new to DB2 9. I want to make use of XML extender XSL functions to transform XML data into HTML. The functions XSLTransformToFile and XSLTransformToClob take CLOB object as one of the parameters in which we can store XML data. In DB2 9 I think it is possible to store XML document directly in the “XML” type column. How we can pass XMLdocument which is in “XML” type column to these functions?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the XML, XSLT and XPATH Forum


Views: 3441 | Replies: 12
Thread Tools Search this Thread



Tag cloud for XML, XSLT and XPATH
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC