<commit_before><?xml version="1.0" encoding="UTF-8"?>

<!--
 $Id: link.xsl,v 1.3 2004/02/25 15:39:09 gregor Exp $
 -->

<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns="http://www.w3.org/1999/xhtml"
	xmlns:xhtml="http://www.w3.org/1999/xhtml"
    xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
    >

<xsl:param name="contextprefix"/>
<xsl:param name="publicationid"/>
<xsl:param name="area"/>
<xsl:param name="tab"/>
<xsl:param name="documentid"/>
<xsl:param name="documentextension"/>
<xsl:param name="documenturl"/>
<xsl:param name="chosenlanguage"/>
<xsl:param name="defaultlanguage"/>

<xsl:variable name="extension"><xsl:if test="$documentextension != ''">.</xsl:if><xsl:value-of select="$documentextension"/></xsl:variable>
    
<xsl:template match="/">
    <page:page>
      <page:title>Insert Link</page:title>
      <script type="text/javascript" src="{$contextprefix}/{$publicationid}/{$area}/info-sitetree/ua.js">&#160;</script>
      <script type="text/javascript" src="{$contextprefix}/{$publicationid}/{$area}/info-sitetree/tree.js">&#160;</script>
      <script type="text/javascript" src="{$contextprefix}/{$publicationid}/{$area}/{$documenturl}?lenya.usecase=bxeng&amp;lenya.step=link-tree">&#160;</script>
      <script> 
          var url;
          window.onload = insertText

          function insertText() { 
            var selectionContent = window.opener.getSelection().getEditableRange().toString(); 
            if (selectionContent.length != 0) { 
                document.forms["link"].text.value = selectionContent;
            } 
            focus(); 
          } 

          function setLink(src) { 
            url = src;
            document.forms["link"].url.value = url;
          }
          
          function insertLink() { 
          var text = document.forms["link"].text.value;
          var title = document.forms["link"].title.value;
          var prefix ='<xsl:value-of select="$contextprefix"/>' + '/<xsl:value-of select="$publicationid"/>' + '/<xsl:value-of select="$area"/>';
          var url = document.forms["link"].url.value;
          if (url.startsWith("/")) {
           // prepend hostname etc for internal links
           url = prefix + url;
          }
          var content = '<a xmlns="'+window.opener.XHTMLNS+'" href="'+url+'" title="'+title+'">'+text+'</a>'; 
          window.opener.bxe_insertContent(content,window.opener.bxe_ContextNode); 
          window.close();
          }
      </script>
      <page:body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td valign="top" width="20%">
    <div id="lenya-info-treecanvas">
<!-- Build the tree. -->
	<table border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td><a id="de">
				<xsl:call-template name="activate">
					<xsl:with-param name="tablanguage">de</xsl:with-param>
				</xsl:call-template>
			</a></td>
			<td><a id="en">
				<xsl:call-template name="activate">
					<xsl:with-param name="tablanguage">en</xsl:with-param>
				</xsl:call-template><commit_msg>doh.<commit_after><?xml version="1.0" encoding="UTF-8"?>

<!--
 $Id: link.xsl,v 1.4 2004/02/26 19:46:13 gregor Exp $
 -->

<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns="http://www.w3.org/1999/xhtml"
	xmlns:xhtml="http://www.w3.org/1999/xhtml"
    xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0"
    >

<xsl:param name="contextprefix"/>
<xsl:param name="publicationid"/>
<xsl:param name="area"/>
<xsl:param name="tab"/>
<xsl:param name="documentid"/>
<xsl:param name="documentextension"/>
<xsl:param name="documenturl"/>
<xsl:param name="chosenlanguage"/>
<xsl:param name="defaultlanguage"/>

<xsl:variable name="extension"><xsl:if test="$documentextension != ''">.</xsl:if><xsl:value-of select="$documentextension"/></xsl:variable>
    
<xsl:template match="/">
    <page:page>
      <page:title>Insert Link</page:title>
      <script type="text/javascript" src="{$contextprefix}/{$publicationid}/{$area}/info-sitetree/ua.js">&#160;</script>
      <script type="text/javascript" src="{$contextprefix}/{$publicationid}/{$area}/info-sitetree/tree.js">&#160;</script>
      <script type="text/javascript" src="{$contextprefix}/{$publicationid}/{$area}/{$documenturl}?lenya.usecase=bxeng&amp;lenya.step=link-tree">&#160;</script>
      <script> 
          var url;
          window.onload = insertText

          function insertText() { 
            var selectionContent = window.opener.getSelection().getEditableRange().toString(); 
            if (selectionContent.length != 0) { 
                document.forms["link"].text.value = selectionContent;
            } 
            focus(); 
          } 

          function setLink(src) { 
            url = src;
            document.forms["link"].url.value = url;
          }
          
          function insertLink() { 
          var text = document.forms["link"].text.value;
          var title = document.forms["link"].title.value;
          var prefix ='<xsl:value-of select="$contextprefix"/>' + '/<xsl:value-of select="$publicationid"/>' + '/<xsl:value-of select="$area"/>';
          var url = document.forms["link"].url.value;
          if (url.charAt(0) == "/") {
           // prepend hostname etc for internal links
           url = prefix + url;
          }
          var content = '<a xmlns="'+window.opener.XHTMLNS+'" href="'+url+'" title="'+title+'">'+text+'</a>'; 
          window.opener.bxe_insertContent(content,window.opener.bxe_ContextNode); 
          window.close();
          }
      </script>
      <page:body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td valign="top" width="20%">
    <div id="lenya-info-treecanvas">
<!-- Build the tree. -->
	<table border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td><a id="de">
				<xsl:call-template name="activate">
					<xsl:with-param name="tablanguage">de</xsl:with-param>
				</xsl:call-template>
			</a></td>
			<td><a id="en">
				<xsl:call-template name="activate">
					<xsl:with-param name="tablanguage">en</xsl:with-param>
				</xsl:call-template>
{'fraction_non_alphanumeric': 0.2012075718015666, 'fraction_numerical': 0.01941906005221932, 'mean_word_length': 3.118951612903226, 'pattern_counts': {'":': 0, '<': 115, '<?xml version=': 2, '>': 115, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 12}, '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': '1993089', 'n_tokens_mistral': 2181, 'n_tokens_neox': 1967, 'n_words': 297}