From 7465bb4ef59c735224d0c42c69d9b84927060e1f Mon Sep 17 00:00:00 2001
From: Jens Kupferschmidt <kupferschmidt@rz.uni-leipzig.de>
Date: Thu, 19 Sep 2024 16:36:42 +0200
Subject: [PATCH] set access to boolean

---
 src/main/resources/xslt/biocol2native.xsl | 22 +++++++++++-----------
 src/main/resources/xslt/biocol2xml.xsl    |  8 ++++----
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/main/resources/xslt/biocol2native.xsl b/src/main/resources/xslt/biocol2native.xsl
index 18492b6..4932dec 100644
--- a/src/main/resources/xslt/biocol2native.xsl
+++ b/src/main/resources/xslt/biocol2native.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<xsl:stylesheet version="3.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="#all">
+<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="#all">
 
   <xsl:template match="metadata[contains(../@ID, '_biocol_')]" mode="present-native" priority="1">
-    <xsl:param name="accessintern" />
+    <xsl:param name="accessintern" as="xs:boolean" />
     <xsl:param name="status" />
-    <xsl:param name="access" />
+    <xsl:param name="access" as="xs:boolean" />
     <metadata>
       <xsl:if test="@xml:lang">
         <xsl:attribute name="xml:lang">
@@ -21,12 +21,12 @@
                 <xsl:apply-templates select="." mode="classification-native" />
               </xsl:when>
               <xsl:when test="name() = 'def.biocol04'">
-                <xsl:if test="$accessintern">
+                <xsl:if test="$accessintern = true()">
                   <xsl:copy-of select="." />
                 </xsl:if>
               </xsl:when>
               <xsl:when test="name() = 'def.biocol05'">
-                <xsl:if test="$accessintern">
+                <xsl:if test="$accessintern = true()">
                   <xsl:copy-of select="." />
                 </xsl:if>
               </xsl:when>
@@ -40,27 +40,27 @@
                 <xsl:apply-templates select="." mode="classification-native" />
               </xsl:when>
               <xsl:when test="name() = 'def.biocol80'">
-                <xsl:if test="$accessintern">
+                <xsl:if test="$accessintern = true()">
                   <xsl:copy-of select="." />
                 </xsl:if>
               </xsl:when>
               <xsl:when test="name() = 'def.biocol81'">
-                <xsl:if test="$accessintern">
+                <xsl:if test="$accessintern = true()">
                   <xsl:copy-of select="." />
                 </xsl:if>
               </xsl:when>
               <xsl:when test="name() = 'def.biocol82'">
-                <xsl:if test="$accessintern">
+                <xsl:if test="$accessintern = true()">
                   <xsl:copy-of select="." />
                 </xsl:if>
               </xsl:when>
               <xsl:when test="name() = 'def.biocol83'">
-                <xsl:if test="$accessintern">
+                <xsl:if test="$accessintern = true()">
                   <xsl:copy-of select="." />
                 </xsl:if>
               </xsl:when>
               <xsl:when test="name() = 'def.biocol84'">
-                <xsl:if test="$accessintern">
+                <xsl:if test="$accessintern = true()">
                   <xsl:copy-of select="." />
                 </xsl:if>
               </xsl:when>
diff --git a/src/main/resources/xslt/biocol2xml.xsl b/src/main/resources/xslt/biocol2xml.xsl
index 8767329..bcc8846 100644
--- a/src/main/resources/xslt/biocol2xml.xsl
+++ b/src/main/resources/xslt/biocol2xml.xsl
@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
-<xsl:stylesheet version="3.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="xsl">
+<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xsl">
 
   <xsl:template match="metadata[contains(../@ID, '_biocol_')]" mode="present-xml" priority="1">
-    <xsl:param name="accessintern" />
+    <xsl:param name="accessintern" as="xs:boolean" />
     <xsl:param name="status" />
-    <xsl:param name="access" />
+    <xsl:param name="access" as="xs:boolean" />
     <metadata>
       <xsl:if test="@xml:lang">
         <xsl:attribute name="xml:lang">
-- 
GitLab