<commit_before>xquery version "1.0";

declare namespace demo="http://luxdb.net/demo";

import module namespace config="http://luxdb.net/demo/config" at "config.xqy";
import module namespace layout="http://luxdb.net/demo/layout" at "layout.xqy";

declare variable $lux:http as document-node() external;

(: Query Tool :)

(: load any JS files here - they'll go at the end of the body :)
declare function demo:javascript-postamble() {
  <div>
    <script src="{config:path('js/jquery-1.8.2.min.js', $lux:http)}"></script>
    <script src="{config:path('js/query-history.js', $lux:http)}"></script>
  </div>
};

declare function demo:main () {
  let $params := $lux:http/http/params/param 
  let $query := $params[@name='query']/value/string()
  let $body := 
  <body>
    <div id="editor">
      <div id="left">
        <ol id="query-history">
        </ol>
      </div>
      <div id="right">
        <form action="../xquery" id="search" name="search" method="post" target="results">
          <input type="hidden" name="wt" value="lux" />
          <input type="hidden" name="lux.contentType" value="text/xml" />
          <input type="hidden" name="lux.xml-xsl-stylesheet" value="{config:path('chrome-xml.xsl', $lux:http)}" />
          <textarea id="q" name="q" cols="80" rows="10">{$query}</textarea>
          <br/>
          <input type="submit" value="go" />   
          (use ctrl-Enter)
          <input type="button" value="save new" onclick="saveQuery()" />
          (max 10)<commit_msg>removed "save new" button which was unuseful<commit_after>xquery version "1.0";

declare namespace demo="http://luxdb.net/demo";

import module namespace config="http://luxdb.net/demo/config" at "config.xqy";
import module namespace layout="http://luxdb.net/demo/layout" at "layout.xqy";

declare variable $lux:http as document-node() external;

(: Query Tool :)

(: load any JS files here - they'll go at the end of the body :)
declare function demo:javascript-postamble() {
  <div>
    <script src="{config:path('js/jquery-1.8.2.min.js', $lux:http)}"></script>
    <script src="{config:path('js/query-history.js', $lux:http)}"></script>
  </div>
};

declare function demo:main () {
  let $params := $lux:http/http/params/param 
  let $query := $params[@name='query']/value/string()
  let $body := 
  <body>
    <div id="editor">
      <div id="left">
        <ol id="query-history">
        </ol>
      </div>
      <div id="right">
        <form action="../xquery" id="search" name="search" method="post" target="results">
          <input type="hidden" name="wt" value="lux" />
          <input type="hidden" name="lux.contentType" value="text/xml" />
          <input type="hidden" name="lux.xml-xsl-stylesheet" value="{config:path('chrome-xml.xsl', $lux:http)}" />
          <textarea id="q" name="q" cols="80" rows="10">{$query}</textarea>
          <br/>
          <input type="submit" value="go" />   
          (use ctrl-Enter)
{'fraction_non_alphanumeric': 0.19761499148211242, 'fraction_numerical': 0.0068143100511073255, 'mean_word_length': 3.330383480825959, 'pattern_counts': {'":': 0, '<': 46, '<?xml version=': 0, '>': 46, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '3804074', 'n_tokens_mistral': 1005, 'n_tokens_neox': 944, 'n_words': 216}