⚲
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 (989 Bytes)
Bug #2037
» file-exists.xsl
Stefan Krause
, 2014-03-23 17:43
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
xmlns:xs=
"http://www.w3.org/2001/XMLSchema"
xmlns:file=
"http://expath.org/ns/file"
version=
"2.0"
exclude-result-prefixes=
"#all"
>
<xsl:template
match=
"/"
>
<xsl:variable
name=
"file"
as=
"xs:string"
select=
"string(document-uri(/))"
/>
<root>
<test>
<xsl:text>
document-uri(/):
</xsl:text><xsl:value-of
select=
"$file"
/>
:
<xsl:value-of
select=
"file:exists($file)"
/>
</test>
<xsl:variable
name=
"file2"
as=
"xs:string"
select=
"substring-after($file, 'file:')"
/>
<test>
<xsl:text>
native path:
</xsl:text><xsl:value-of
select=
"$file2"
/>
:
<xsl:value-of
select=
"file:exists($file2)"
/>
</test>
<xsl:variable
name=
"file3"
as=
"xs:string"
select=
"file:path-to-native($file)"
/>
<test>
<xsl:text>
file:path-to-native():
</xsl:text><xsl:value-of
select=
"$file3"
/>
:
<xsl:value-of
select=
"file:exists($file3)"
/>
</test>
</root>
</xsl:template>
</xsl:stylesheet>
« Previous
1
2
Next »
(1-1/2)
Loading...