<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY cr "&#x0A;">
<!ENTITY crt "<xsl:text xmlns:xsl='http://www.w3.org/1999/XSL/Transform' disable-output-escaping='yes'>&cr;</xsl:text>">
<!ENTITY TabString "&#160;&#160;&#160;&#160;&#160;&#160;">
]>
<xsl:stylesheet
	version="2.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:xs="http://www.w3.org/2001/XMLSchema"
	xmlns:misc="http://www.expedimentum.org/XSLT/Misc"
	xmlns:saxon="http://saxon.sf.net/"
	xmlns:doc="http://www.CraneSoftwrights.com/ns/xslstyle"
	xmlns:docv="http://www.CraneSoftwrights.com/ns/xslstyle/vocabulary"
	xmlns:xlink="http://www.w3.org/1999/xlink"
	exclude-result-prefixes="doc docv"
	>
	<!--  -->
	<!--  -->
	<!--  -->
	<doc:doc filename="files.xsl" internal-ns="docv" global-ns="doc misc" vocabulary="DocBook" info="$Revision: 111 $, $Date: 2010-07-10 00:45:43 +0200 (Sa, 10 Jul 2010) $">
		<doc:title>Dateien und Dateisystem</doc:title>
		<para>Dieses Stylesheet enthält Funktionen rund um das Dateisystem.</para>
		<para><emphasis role="bold">Achtung:</emphasis> Die Funktion <function>misc:file-exist()</function> erfordert bei Ausführung SaxonB 9.1 oder SaxonPE/EE 9.2, 
			da die Saxon-spezifischen Funktionen <code>saxon:file-last-modified()</code> (Saxon 9.1) bzw. <code>saxon:last-modified()</code>
			(Saxon 9.2) verwendet werden (siehe <link xlink:href="http://markmail.org/message/j4qdofmjyz7xlsso">http://markmail.org/message/j4qdofmjyz7xlsso</link>.</para>
		<para>Autor: <author>
			<firstname>Stefan</firstname>
			<surname>Krause</surname>
		</author>
		</para>
		<para>Homepage: <link xlink:href="http://www.expedimentum.org/">http://www.expedimentum.org/</link></para>
		<para>Lizenz: Dieses Stylesheet ist unter einer einer Creative Commons-Lizenz (<link xlink:href="http://creativecommons.org/licenses/by/3.0/">CC-BY&#160;3.0</link>) lizenziert. Die Weiternutzung ist bei Namensnennung erlaubt.</para>
		<revhistory>
			<revision>
				<revnumber>0.52</revnumber>
				<date>2008-10-13</date>
				<authorinitials>Stf</authorinitials>
				<revremark>Anpassungen an unterschiedliche Saxon-Versionen</revremark>
			</revision>
			<revision>
				<revnumber>0.50</revnumber>
				<date>2008-10-11</date>
				<authorinitials>Stf</authorinitials>
				<revremark>Start mit Testroutinen</revremark>
			</revision>
			<revision>
				<revnumber>0.36</revnumber>
				<date>2008-08-02</date>
				<authorinitials>Stf</authorinitials>
				<revremark>Umstellung der Lizenz auf CC-BY&#160;3.0</revremark>
			</revision>
			<revision>
				<revnumber>0.28</revnumber>
				<date>2008-05-03</date>
				<authorinitials>Stf</authorinitials>
				<revremark>erste Version mit Dokumentation</revremark>
			</revision>
		</revhistory>
	</doc:doc>
	<!--  -->
	<!--  -->
	<!-- __________     misc:file-exist()     __________ -->
	<doc:function>
		<doc:param name="href"><para>Pfad zur zu überprüfenden Datei (URI-encoded)</para></doc:param>
		<para>Diese Funktion überprüft, ob die angegebene Datei vorhanden ist. Das Ergebnis ist ein Wahrheitswert 
			(<code>xs:boolean</code>, <code>true()</code> oder <code>false()</code>). </para>
		<para><emphasis role="bold">Achtung!</emphasis> Diese Funktion erfordert bei Ausführung SaxonB 9.1 oder SaxonPE/EE 9.2, 
			da die Saxon-spezifischen Funktionen <code>saxon:file-last-modified()</code> (Saxon 9.1) bzw. <code>saxon:last-modified()</code>
			(Saxon 9.2) verwendet werden (siehe <link xlink:href="http://markmail.org/message/j4qdofmjyz7xlsso">http://markmail.org/message/j4qdofmjyz7xlsso</link>.</para>
	</doc:function>
	<!-- getestet mit Saxon 9.2.0.2 -->
	<xsl:function name="misc:file-exists" as="xs:boolean" use-when="function-available( 'saxon:last-modified' ) and not(function-available( 'saxon:file-last-modified' ))">
		<xsl:param name="href" as="xs:string?"/>
		<xsl:value-of select="boolean(normalize-space(string(saxon:last-modified($href))))"/>
	</xsl:function>
	<!--  -->
	<!-- getestet mit Saxon 9.1.0.7 -->
	<xsl:function name="misc:file-exists" as="xs:boolean" use-when="function-available( 'saxon:file-last-modified' ) and function-available( 'saxon:last-modified' )">
		<xsl:param name="href" as="xs:string?"/>
		<xsl:value-of select="boolean(normalize-space(string(saxon:file-last-modified($href))))"/>
	</xsl:function>
	<!--  -->
	<!-- getestet mit Saxon 8.9.0.4 -->
	<xsl:function name="misc:file-exists" as="xs:boolean" use-when="not(function-available( 'saxon:file-last-modified' ) or function-available( 'saxon:last-modified' ) )">
		<xsl:param name="href" as="xs:string?"/>
		<xsl:value-of select="false()"/>
		<xsl:message>Keine Möglichkeit zur Ermittlung, ob eine Datei existiert</xsl:message>
	</xsl:function>
	<!--  -->
	<!--  -->
	<!--  -->
</xsl:stylesheet>

