Skip to content

Instantly share code, notes, and snippets.

@wsalesky
wsalesky / desc.xhtml
Last active March 8, 2024 14:01
TinyMCE XSLTForms nested repeats
<?xml-stylesheet href="xsl/xsltforms.xsl" type="text/xsl"?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:rte="http://www.agencexml.com/xsltforms/rte" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsltforms="http://www.agencexml.com/xsltforms" lang="en">
<head>
<meta name="viewport" content="initial-scale=1, width=device-width, viewport-fit=cover"/>
<title>TinyMCE Support</title>
<style type="text/css">
.large-textarea textarea {
font-family: Courier, sans-serif;
height: 10em;
width: 500px;
@wsalesky
wsalesky / index.xhtml
Created January 15, 2024 16:14
XSLTForms tinyMCE subforms example
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:rte="http://www.agencexml.com/xsltforms/rte" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:srophe="https://srophe.app" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:local="http://syriaca.org/ns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sc="http://www.ascc.net/xml/schematron" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xsltforms="http://www.agencexml.com/xsltforms" xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/>
<link rel="shortcut icon" href="resources/images/hn/favicon-16.png"/>
<title>Edit MS TEI Records</title>
<script type="text/javascript" src="/exist/apps/xsltforms/scripts/tinymce_4
@wsalesky
wsalesky / tinymceExample2.xhtml
Created January 2, 2024 23:54
XSLTForms TinyMCE dynamic content example
<?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_ms.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0" schematypens="http://purl.oclc.org/dsdl/schematron"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0">
<data>
<summary>irec2 Summary 1</summary>
<summary>irec2 Summary 2</summary>
</data>
</TEI>
@wsalesky
wsalesky / tinymceExample.xhtml
Created January 2, 2024 23:33
XSLTForms multiple tinymce editors in a single form.
<?xml-stylesheet href="xsl/xsltforms.xsl" type="text/xsl"?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xsltforms="http://www.agencexml.com/xsltforms"
xmlns:rte="http://www.agencexml.com/xsltforms/rte" lang="en">
<head>
<meta name="viewport" content="initial-scale=1, width=device-width, viewport-fit=cover" />
<title>TinyMCE Support</title>
<style type="text/css">
.large-textarea textarea {
@wsalesky
wsalesky / 52938328347.json
Created August 30, 2023 15:40
Test IIIF manifest
{
"@context": "http://iiif.io/api/presentation/2/context.json",
"@id": "https://architecturasinica.org/iiif/manifest/gallery/52938328347/52938328347.json",
"@type": "sc:Manifest",
"label": "jiashan 假山",
"description": "jiashan of yellow stone, &amp;quot;Yungang,&amp;quot; Wangshiyuan (Master of the Nets Garden), Qing dynasty, Suzhou, Jiangsu Province, detail showing interior &amp;quot;grotto&amp;quot; 網師園雲崗假山, 局部,黃石下有洞,江蘇省蘇州(photo: Jin Yinuo 金一諾, 2023)",
"attribution": "Architectura Sinica",
"metadata": [
{
"label": "Title",
@wsalesky
wsalesky / xformsRepeats.xhtml
Created February 1, 2022 01:17
XForms repeats following XML document order.
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<head>
<title>Insert with Origin</title>
<style type="text/css">
@namespace xf url("http://www.w3.org/2002/xforms");
body {font-family:Helvetica, sans-serif}
</style>
<xf:model>
<xf:instance id="i-rec">
<TEI xmlns="http://www.tei-c.org/ns/1.0">
@wsalesky
wsalesky / move.xhtml
Created January 26, 2022 13:55
Testing XSLTForms and HTML5 drag and drop functionality.
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<head>
<title>Insert with Origin</title>
<script type="text/javascript">
document.addEventListener('DOMContentLoaded', (event) => {
function handleDragStart(e) {
this.style.opacity = '0.4';
dragSrcEl = this;
@wsalesky
wsalesky / placeNames.xml
Created March 26, 2020 15:53
Generated Place names.
<TEI xmlns="http://www.tei-c.org/ns/1.0" xmlns:srophe="https://srophe.app">
<text>
<body>
<listPlace>
<place>
<idno>https://pleiades.stoa.org/places/520998</idno>
<placeName srophe:tags="#headword">Constantinopolis</placeName>
<desc>Capital city of the Eastern Roman Empire, the Latin, and the Ottoman
Empires founded by Constantine I in AD 330. </desc>
<location type="gps">
@wsalesky
wsalesky / git-commit.xqm
Created October 19, 2018 15:12
eXist-db git commit as a module. Can be used with XForms to pass XML content to GitHub.
xquery version "3.1";
(:~
: POC: eXist-db module to commit content to github reop via github API
: Code creates a new branch off of the master branch, commits updated content to new branch and then submits a pull request when complete.
: Intended use is for online data submission, using GitHub for review/approval process.
:
: Prerequisites:
: In order to run the module, you will need a github Authorization token.
: When you create authorization token your OAuth Scope will need to include the github repository you would like to commit to.
@wsalesky
wsalesky / git-commit.xql
Created October 12, 2018 15:28
XQuery to commit content to GitHub. Query creates a new branch, commits content and creates a new pull request to specified repository.
xquery version "3.1";
(:~
: POC: XQuery to commit content to github reop via github API. Tested in eXist-db v4.4.0
: Code creates a new branch off of the master branch, commits updated content to the new branch
: and then submits a pull request when complete. Intended use is for online data submission,
: using GitHub for review/approval process.
:
: Prerequisites:
: In order to run the module, you will need a github Authorization token.