<commit_before><?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:cmd="http://www.clarin.eu/cmd/" xmlns:utils="http://aac.ac.at/content_repository/utils" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:fcs="http://clarin.eu/fcs/1.0" xmlns:mods="http://www.loc.gov/mods/v3" xmlns:mets="http://www.loc.gov/METS/" xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl" version="2.0" exclude-result-prefixes="mods xlink xd utils">
    <xsl:import href="../commons_v2.xsl"/>
    <xsl:include href="../fcs/data2view_v2.xsl"/>
    <xd:doc scope="stylesheet">
        <xd:desc> generate a generic html-view for individual parts of the project-mets file:  mods:projectDmd mets:structMap                
            </xd:desc>
    </xd:doc>
    <xsl:output method="xhtml" indent="yes"/>
    <xsl:variable name="title" select="''"/>
    <xsl:variable name="internal-structure" select="//mets:structMap[@TYPE='internal']"/>
    <xsl:key name="mets-div" match="mets:div" use="@ID"/>
    <xsl:template name="continue-root">
<!--    <xsl:template match="/">-->
        <xsl:apply-templates>
            <xsl:with-param name="strict" select="true()"/>
        </xsl:apply-templates>
    </xsl:template>
    <xsl:template match="cmd:CMD">
        <div class="projectDMD mdtype-cmd record">
            <div class="header">
                <h2>
                    <!--<xsl:value-of select=".//sourceDesc/bibl[@type='short']"/>-->
                    <xsl:call-template name="getTitle"/>
                </h2>
                <div class="links">
                    <xsl:variable name="resource-id" select=".//cmd:ResourceProxy[1]/data(@id)"/>
                    <xsl:variable name="md-link-cmdi">
                        <xsl:call-template name="formURL">
                            <xsl:with-param name="action" select="'get-metadata'"/>
                            <xsl:with-param name="format" select="'htmlpage'"/>
                            <xsl:with-param name="q" select="$resource-id"/>
                        </xsl:call-template>
                    </xsl:variable>
                    <xsl:variable name="link-explain">
                        <xsl:call-template name="formURL">
                            <xsl:with-param name="action" select="'explain'"/>
                            <xsl:with-param name="format" select="'htmllist'"/>
                        </xsl:call-template>
                    </xsl:variable>
                    <a class="link-info" href="#">Info</a>
                    <a class="link-cmdi" href="{$md-link-cmdi}">CMD</a>
                    <a class="link-explain" href="{$link-explain}">Register</a>                    
<!--                    <div class="div-after"/>-->
                </div>
            </div>
            <div class="data-view metadata">
                <p>
                    <xsl:apply-templates select="(.//cmd:Description)[1]"/>
                </p>
                <p>
                    <xsl:apply-templates select=".//cmd:License" mode="record-data">
                        <xsl:with-param name="strict" select="true()"/>
                    </xsl:apply-templates>
                </p>
                <p><commit_msg>allow for multilingual Description, guided by  parameter<commit_after><?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:cmd="http://www.clarin.eu/cmd/" xmlns:utils="http://aac.ac.at/content_repository/utils" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:fcs="http://clarin.eu/fcs/1.0" xmlns:mods="http://www.loc.gov/mods/v3" xmlns:mets="http://www.loc.gov/METS/" xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl" version="2.0" exclude-result-prefixes="mods xlink xd utils">
    <xsl:import href="../commons_v2.xsl"/>
    <xsl:include href="../fcs/data2view_v2.xsl"/>
    <xd:doc scope="stylesheet">
        <xd:desc> generate a generic html-view for individual parts of the project-mets file:  mods:projectDmd mets:structMap                
        </xd:desc>
    </xd:doc>
    <xsl:output method="xhtml" indent="yes"/>
    
    
    <xd:doc>
        <xd:desc>
            <xd:p>preferred language to select for description etc.</xd:p>
            <xd:p>fallback to any available language</xd:p>
        </xd:desc>
    </xd:doc>
    <xsl:param name="lang" select="'de'"/>
    <xsl:variable name="title" select="''"/>
    <xsl:variable name="internal-structure" select="//mets:structMap[@TYPE='internal']"/>
    <xsl:key name="mets-div" match="mets:div" use="@ID"/>
    <xsl:template name="continue-root">
        <!--    <xsl:template match="/">-->
        <xsl:apply-templates>
            <xsl:with-param name="strict" select="true()"/>
        </xsl:apply-templates>
    </xsl:template>
    <xsl:template match="cmd:CMD">
        <div class="projectDMD mdtype-cmd record">
            <div class="header">
                <h2>
                    <!--<xsl:value-of select=".//sourceDesc/bibl[@type='short']"/>-->
                    <xsl:call-template name="getTitle"/>
                </h2>
                <div class="links">
                    <xsl:variable name="resource-id" select=".//cmd:ResourceProxy[1]/data(@id)"/>
                    <xsl:variable name="md-link-cmdi">
                        <xsl:call-template name="formURL">
                            <xsl:with-param name="action" select="'get-metadata'"/>
                            <xsl:with-param name="format" select="'htmlpage'"/>
                            <xsl:with-param name="q" select="$resource-id"/>
                        </xsl:call-template>
                    </xsl:variable>
                    <xsl:variable name="link-explain">
                        <xsl:call-template name="formURL">
                            <xsl:with-param name="action" select="'explain'"/>
                            <xsl:with-param name="format" select="'htmllist'"/>
                        </xsl:call-template>
                    </xsl:variable>
                    <a class="link-info" href="#">Info</a>
                    <a class="link-cmdi" href="{$md-link-cmdi}">CMD</a>
                    <a class="link-explain" href="{$link-explain}">Register</a>                    
                    <!--                    <div class="div-after"/>-->
                </div>
            </div>
            <div class="data-view metadata">
                <xsl:choose>
                    <xsl:when test="exists(.//cmd:Description[@xml:lang=$lang])">
                        <xsl:apply-templates select=".//cmd:Description[@xml:lang=$lang]"/>
                    </xsl:when>
                    <xsl:otherwise>
                        <xsl:apply-templates select="(.//cmd:Description)[1]"/>
                    </xsl:otherwise>
                </xsl:choose>
                
                <p>
                    <xsl:apply-templates select=".//cmd:License" mode="record-data">
                        <xsl:with-param name="strict" select="true()"/>
                    </xsl:apply-templates>
                </p>
                <p>
{'fraction_non_alphanumeric': 0.1815771109560363, 'fraction_numerical': 0.00837404047452896, 'mean_word_length': 1.7508637236084452, 'pattern_counts': {'":': 0, '<': 141, '<?xml version=': 2, '>': 141, 'https://': 0, 'lorem ipsum': 0, 'www.': 14, 'xml': 24}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6395015', 'n_tokens_mistral': 2271, 'n_tokens_neox': 2050, 'n_words': 309}