⚲
Project
Profile
Help
Tour this page
Frequent Planio Questions
Learning Resources
Sign in
Register
Switch Planio account
Open in Planio App
Share current page
Search
:
Projects
All Projects
Help
Tour this page
Frequent Planio Questions
Learning Resources
Sign in
Register
Switch Planio account
Open in Planio App
Share current page
Saxon
Overview
Roadmap
Issues
Calendar
Blog
Documents
Forums
Files
Repository
Download (1.1 KB)
Bug #5747
» Example.xslt
Test script -
Herbert Brückner
, 2022-11-27 13:39
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xs=
"http://www.w3.org/2001/XMLSchema"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
xmlns:sql=
"http://saxon.sf.net/sql"
xmlns:map=
"http://www.w3.org/2005/xpath-functions/map"
xmlns:saxon=
"http://saxon.sf.net/"
extension-element-prefixes=
"saxon"
version=
"3.1"
>
<xsl:output
method=
"xml"
version=
"1.0"
encoding=
"UTF-8"
indent=
"yes"
/>
<xsl:variable
name=
"connection"
select=
"sql:connect(map{ 'database':'jdbc:oracle:thin:my_DB_URL',
'user':'my_user', 'password':'my_pwd', 'autoCommit':true()})"
/>
<xsl:template
match=
"/"
>
<!-- Example 1:
Expect: no row is updated
Observed: all rows were updated
-->
<xsl:sequence
select=
"sql:update($connection, 'SQL_TEST', '0 = 1 ', map{ 'VALUE': 'not wanted'})"
/>
<!-- Example 2:
Expect: first row is updated
Observed: all rows were updated
-->
<xsl:sequence
select=
"sql:update($connection, 'SQL_TEST', 'KEY = ''key 1'' ', map{ 'VALUE': 'now wanted'})"
/>
</xsl:template>
</xsl:stylesheet>
« Previous
1
2
3
Next »
(1-1/3)
Loading...