| | |
XSLT and DB2 data
Please support our XML, XSLT and XPATH advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Oct 2007
Posts: 76
Reputation:
Solved Threads: 0
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.
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.
•
•
Join Date: Oct 2007
Posts: 21
Reputation:
Solved Threads: 0
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?
![]() |
Other Threads in the XML, XSLT and XPATH Forum
- Previous Thread: SQL/XML Query
- Next Thread: different minOccurs for different operations?
Views: 3441 | Replies: 12
| Thread Tools | Search this Thread |
Tag cloud for XML, XSLT and XPATH
api blogger blogging code dataset delete development dynamiccreationofnvariablesinxslt error firstthreecharacterofastringrequired flipbook gdata google html include java link linspire linux microsoft news node openoffice overwrite precedence programming rss serialization standards swf template transform variable w3c web xml xmlnotloading xmlonserver xsl xslt





