Commit 15788b9b authored by Stephan Kreutzer's avatar Stephan Kreutzer

sos-grid-1 prototype: XSLT to generate the XHTML grid navigation interface for any SOS input file.

parent 0a31f154
......@@ -15,7 +15,7 @@ changed or expanded in the future. No future change in licensing policy will
have an effect on the rights that are granted to you for this version of the
file as originally released and distributed.
-->
<SOS xmlns="http://www.untiednations.com/SOS" xml:lang="en" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.untiednations.com/XML/SOSMeeting1.xsd">
<SOS xmlns="http://www.untiednations.com/SOS" Language="en" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.untiednations.com/SOS http://www.untiednations.com/XML/SOSMeeting1.xsd">
<POI ID="1" Type="Issue">
<Parent Parent-ID="5"/>
<Title>Risk of the format becoming proprietary because of extension</Title>
......
......@@ -15,7 +15,7 @@ changed or expanded in the future. No future change in licensing policy will
have an effect on the rights that are granted to you for this version of the
file as originally released and distributed.
-->
<SOS xmlns="http://www.untiednations.com/SOS" xml:lang="en" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.untiednations.com/XML/SOSMeeting1.xsd">
<SOS xmlns="http://www.untiednations.com/SOS" Language="en" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.untiednations.com/SOS http://www.untiednations.com/XML/SOSMeeting1.xsd">
<POI ID="1" Type="Effect">
<Parent Parent-ID="2"/>
<Parent Parent-ID="4"/>
......
The $/sos-grid-1/index.xhtml is generated via a XSLT transformation using the
$/sos_xml_to_sos_grid_xhtml_1.xsl XSLT stylesheet on a SOS XML file.
The already existing file is based on $/../../examples/copyright_license_for_software.xml
(commit https://gitlab.com/skreutzer/sos-experimential/tree/0a31f1543533128b3a9c3f1531683ef9795fa629).
#!/bin/sh
java -cp ./xml_xslt_transformator_1 xml_xslt_transformator_1 jobfile_xml_xslt_transformator_1.xml resultinfo_xml_xslt_transformator_1.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html version="-//W3C//DTD XHTML 1.1//EN" xmlns="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/1999/xhtml http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8"/>
<!--
Copyright (C) 2018-2019 Stephan Kreutzer, William Charlton
This file is part of SOS Grid Prototype 1.
SOS Grid Prototype 1 is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3 or any later version,
as published by the Free Software Foundation.
SOS Grid Prototype 1 is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License 3 for more details.
You should have received a copy of the GNU Affero General Public License 3
along with SOS Grid Prototype 1. If not, see <http://www.gnu.org/licenses/>.
-->
<title>SOS Grid Prototype 1</title>
<meta content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" name="viewport"/>
<link rel="stylesheet" type="text/css" href="./css/styles.css"/>
<script type="text/javascript" src="./js/sos-grid-engine.js"></script>
<script type="text/javascript" src="./js/sos-grid-renderer.js"></script>
<script type="text/javascript" src="./js/sos-grid-navigation.js"></script>
<script type="text/javascript">
"use strict";
// As browsers/W3C/WHATWG are incredibly evil, they might ignore the self-declarative
// XML namespace of this document and the given content type in the header, and instead
// assume/render "text/html", which then fails with JavaScript characters that are
// XML/XHTML special characters which need to be escaped, if the file is saved under
// a name that happens to end with ".html" (!!!). Just have the file name end with
// ".xhtml" and it might magically start to work.
// NavigatePoi() with empty ID string: load the "default" (first) POI.
document.addEventListener("DOMContentLoaded", function() { NavigatePoi(""); });
</script>
</head>
<body>
<div id="grid">
<div id="causes"/>
<div id="current"/>
<div id="effects"/>
</div>
<!--pre>
SOS Grid Prototype 1 (C) 2018-2019 Stephan Kreutzer, William Charlton<br/>
SOS Grid Prototype 1 is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3 or any later version,
as published by the Free Software Foundation.<br/>
SOS Grid Prototype 1 is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License 3 for more details.
You should have received a copy of the GNU Affero General Public License 3
along with SOS Grid Prototype 1. If not, see &lt;<a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>&gt;.
The complete source code is available at &lt;<a href="https://gitlab.com/skreutzer/sos-experimential/tree/master/prototypes/sos-grid-1/">https://gitlab.com/skreutzer/sos-experimential/tree/master/prototypes/sos-grid-1/</a>&gt;.
</pre-->
<!--
As the stupid browser execution environment is sandboxed, local files can't
be dynamically read from disk, and if we're forced to load the entire source
into memory anyway because of this, if it's XML, we could easily put it into
the DOM instead of parsing XML from a JavaScript variable. This interferes
with GUI work in this XHTML file, but if the XML source would need to be
escaped to be a JavaScript string literal, a conversion is unavoidable, so
this file here could just as well be the result of a conversion from the source.
-->
<div id="sos-input" style="display:none;">
<sos:SOS xmlns:sos="http://www.untiednations.com/SOS" xml:lang="en" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.untiednations.com/XML/SOSMeeting1.xsd">
<sos:POI ID="1" Type="Effect">
<sos:Parent Parent-ID="2"/>
<sos:Parent Parent-ID="4"/>
<sos:Parent Parent-ID="5"/>
<sos:Title>Copyright Law</sos:Title>
<sos:Text>Copyright law has been passed in most given jurisdictions.</sos:Text>
</sos:POI>
<sos:POI ID="2" Type="Effect">
<sos:Title>Software multiplies</sos:Title>
<sos:Text>Software like many other types of works is immaterial and not bound to physical limitations/scarcity. Every act of distribution to another entity results in a duplication (copying).</sos:Text>
</sos:POI>
<sos:POI ID="3" Type="Effect">
<sos:Title>Copying technology is cheaply available</sos:Title>
<sos:Text>Most people can afford to buy copying equipment and know how to operate it.</sos:Text>
</sos:POI>
<sos:POI ID="4" Type="Effect">
<sos:Title>Copying is cheap</sos:Title>
<sos:Text>Producing another copy (another unit of the good) is almost gratis, if the producer owns or has access to copying equipment.</sos:Text>
</sos:POI>
<sos:POI ID="5" Type="Effect">
<sos:Parent Parent-ID="2"/>
<sos:Parent Parent-ID="3"/>
<sos:Parent Parent-ID="4"/>
<sos:Title>Selling software is difficult</sos:Title>
<sos:Text>The business model of selling software faces a lot of competition from gratis offers of the identical product.</sos:Text>
</sos:POI>
<sos:POI ID="6" Type="Effect">
<sos:Parent Parent-ID="1"/>
<sos:Parent Parent-ID="5"/>
<sos:Title>Copyright law is enforcable</sos:Title>
<sos:Text>Copyright law can be enforced selectively with severe penalties for infringement against companies and individuals.</sos:Text>
</sos:POI>
<sos:POI ID="7" Type="Effect">
<sos:Parent Parent-ID="2"/>
<sos:Parent Parent-ID="3"/>
<sos:Title>Copyright law isn’t enforcable</sos:Title>
<sos:Text>The state has no mechanisms available to gain knowledge about copyright infringement or interfere with it, other than investigation and after-the-fact persecution.</sos:Text>
</sos:POI>
<sos:POI ID="8" Type="Effect">
<sos:Parent Parent-ID="9"/>
<sos:Title>Binary executables are difficult to modify</sos:Title>
<sos:Text>Software can exist in the form of a binary executable (primitive instructions for a computer processor). It is very expensive and difficult to modify (especially big) applications in this form.</sos:Text>
</sos:POI>
<sos:POI ID="9" Type="Effect">
<sos:Parent Parent-ID="10"/>
<sos:Title>Source code can be compiled into a binary executable</sos:Title>
<sos:Text>A compiler can translate language constructs of software in the form of source code into a binary executable (primitive instructions for a computer processor).</sos:Text>
</sos:POI>
<sos:POI ID="10" Type="Effect">
<sos:Title>Source code is easy to modify</sos:Title>
<sos:Text>Software can exist in the form of source code (high-level instructions in a programming language). It is easy to modify software in this form.</sos:Text>
</sos:POI>
<sos:POI ID="11" Type="Effect">
<sos:Parent Parent-ID="10"/>
<sos:Parent Parent-ID="7"/>
<sos:Title>Software in the form of source code can be run with an interpreter</sos:Title>
<sos:Text>Source code (high-level instructions in a programming language) can be read by a binary executable which is an interpreter, and the interpreter enacts the corresponding primitive processor instructions for each high-level source code instruction.</sos:Text>
</sos:POI>
<sos:POI ID="12" Type="Effect">
<sos:Parent Parent-ID="8"/>
<sos:Title>Software in the form of a binary executable can be run directly</sos:Title>
<sos:Text>Binary executables are comprised of instructions for a particular computer processor, which can run them directly.</sos:Text>
</sos:POI>
<sos:POI ID="13" Type="Effect">
<sos:Parent Parent-ID="6"/>
<sos:Title>The user is allowed to modify the software</sos:Title>
</sos:POI>
<sos:POI ID="14" Type="Effect">
<sos:Parent Parent-ID="6"/>
<sos:Title>The user isn’t allowed to modify the software</sos:Title>
</sos:POI>
<sos:POI ID="15" Type="Effect">
<Parent Parent-ID="11"/>
<sos:Title>The user is enabled to modify the software</sos:Title>
</sos:POI>
<sos:POI ID="16" Type="Effect">
<sos:Parent Parent-ID="8"/>
<sos:Title>The user isn’t enabled to modify the software</sos:Title>
</sos:POI>
</sos:SOS>
</div>
</body>
</html>
<?xml version="1.0" encoding="UTF-8"?>
<xml-xslt-transformator-1-jobfile>
<job input-file="../../examples/copyright_license_for_software.xml" entities-resolver-config-file="./xml_xslt_transformator_1/entities/config_empty.xml" stylesheet-file="./sos_xml_to_sos_grid_xhtml_1.xsl" output-file="./sos-grid-1/index.xhtml"/>
</xml-xslt-transformator-1-jobfile>
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html version="-//W3C//DTD XHTML 1.1//EN" xsi:schemaLocation="http://www.w3.org/1999/xhtml http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd" xml:lang="en" lang="en" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sos="http://www.untiednations.com/SOS" xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8"/>
<!-- This file was created by sos_xml_to_sos_grid_xhtml_1.xsl of SOS Grid Prototype 1, which is free software licensed under the GNU Affero General Public License 3 or any later version (see https://gitlab.com/skreutzer/sos-experimential/prototypes/sos-grid-1/ and http://www.untiednations.com/community/plan-sos/). -->
<!--
Copyright (C) 2018-2019 Stephan Kreutzer
This file is part of SOS Grid Prototype 1.
SOS Grid Prototype 1 is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3 or any later version,
as published by the Free Software Foundation.
SOS Grid Prototype 1 is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License 3 for more details.
You should have received a copy of the GNU Affero General Public License 3
along with SOS Grid Prototype 1. If not, see <http://www.gnu.org/licenses/>.
The data in the <div id="sos-input"/> is not part of this program,
it's user data that is only processed. A different license may apply.
-->
<title>SOS Grid Prototype 1</title><meta content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" name="viewport"/><link rel="stylesheet" type="text/css" href="./css/styles.css"/><script type="text/javascript" src="./js/sos-grid-engine.js">//</script><script type="text/javascript" src="./js/sos-grid-renderer.js">//</script><script type="text/javascript" src="./js/sos-grid-navigation.js">//</script><script type="text/javascript">
"use strict";
// As browsers/W3C/WHATWG are incredibly evil, they might ignore the self-declarative
// XML namespace of this document and the given content type in the header, and instead
// assume/render "text/html", which then fails with JavaScript characters that are
// XML/XHTML special characters which need to be escaped, if the file is saved under
// a name that happens to end with ".html" (!!!). Just have the file name end with
// ".xhtml" and it might magically start to work.
function loadGrid() {
let loadLink = document.getElementById('loadLink');
loadLink.parentNode.removeChild(loadLink);
NavigatePoi("");
}
// NavigatePoi() with empty ID string: load the "default" (first) POI.
document.addEventListener("DOMContentLoaded", function() { loadGrid(); });
</script></head><body><div id="grid"><div id="causes"/><div id="current"/><div id="effects"/><div id="loadLink"><a href="#" onclick="loadGrid();">Load</a></div></div><div id="sos-input" style="display:none;"><!-- The data contained in this element and sub-elements is not part of this program, it's user data and might be under a different license than this program. This program also doesn't depend on it or link it as a library, it's only processed. --><sos:SOS Language="en" xsi:schemaLocation="http://www.untiednations.com/SOS http://www.untiednations.com/XML/SOSMeeting1.xsd">
<sos:POI ID="1" Type="Effect">
<sos:Parent Parent-ID="2"/>
<sos:Parent Parent-ID="4"/>
<sos:Parent Parent-ID="5"/>
<sos:Title>Copyright Law</sos:Title>
<sos:Text>Copyright law has been passed in most given jurisdictions.</sos:Text>
</sos:POI>
<sos:POI ID="2" Type="Effect">
<sos:Title>Software multiplies</sos:Title>
<sos:Text>Software like many other types of works is immaterial and not bound to physical limitations/scarcity. Every act of distribution to another entity results in a duplication (copying).</sos:Text>
</sos:POI>
<sos:POI ID="3" Type="Effect">
<sos:Title>Copying technology is cheaply available</sos:Title>
<sos:Text>Most people can afford to buy copying equipment and know how to operate it.</sos:Text>
</sos:POI>
<sos:POI ID="4" Type="Effect">
<sos:Title>Copying is cheap</sos:Title>
<sos:Text>Producing another copy (another unit of the good) is almost gratis, if the producer owns or has access to copying equipment.</sos:Text>
</sos:POI>
<sos:POI ID="5" Type="Effect">
<sos:Parent Parent-ID="2"/>
<sos:Parent Parent-ID="3"/>
<sos:Parent Parent-ID="4"/>
<sos:Title>Selling software is difficult</sos:Title>
<sos:Text>The business model of selling software faces a lot of competition from gratis offers of the identical product.</sos:Text>
</sos:POI>
<sos:POI ID="6" Type="Effect">
<sos:Parent Parent-ID="1"/>
<sos:Parent Parent-ID="5"/>
<sos:Title>Copyright law is enforcable</sos:Title>
<sos:Text>Copyright law can be enforced selectively with severe penalties for infringement against companies and individuals.</sos:Text>
</sos:POI>
<sos:POI ID="7" Type="Effect">
<sos:Parent Parent-ID="2"/>
<sos:Parent Parent-ID="3"/>
<sos:Title>Copyright law isn’t enforcable</sos:Title>
<sos:Text>The state has no mechanisms available to gain knowledge about copyright infringement or interfere with it, other than investigation and after-the-fact persecution.</sos:Text>
</sos:POI>
<sos:POI ID="8" Type="Effect">
<sos:Parent Parent-ID="9"/>
<sos:Title>Binary executables are difficult to modify</sos:Title>
<sos:Text>Software can exist in the form of a binary executable (primitive instructions for a computer processor). It is very expensive and difficult to modify (especially big) applications in this form.</sos:Text>
</sos:POI>
<sos:POI ID="9" Type="Effect">
<sos:Parent Parent-ID="10"/>
<sos:Title>Source code can be compiled into a binary executable</sos:Title>
<sos:Text>A compiler can translate language constructs of software in the form of source code into a binary executable (primitive instructions for a computer processor).</sos:Text>
</sos:POI>
<sos:POI ID="10" Type="Effect">
<sos:Title>Source code is easy to modify</sos:Title>
<sos:Text>Software can exist in the form of source code (high-level instructions in a programming language). It is easy to modify software in this form.</sos:Text>
</sos:POI>
<sos:POI ID="11" Type="Effect">
<sos:Parent Parent-ID="10"/>
<sos:Parent Parent-ID="7"/>
<sos:Title>Software in the form of source code can be run with an interpreter</sos:Title>
<sos:Text>Source code (high-level instructions in a programming language) can be read by a binary executable which is an interpreter, and the interpreter enacts the corresponding primitive processor instructions for each high-level source code instruction.</sos:Text>
</sos:POI>
<sos:POI ID="12" Type="Effect">
<sos:Parent Parent-ID="8"/>
<sos:Title>Software in the form of a binary executable can be run directly</sos:Title>
<sos:Text>Binary executables are comprised of instructions for a particular computer processor, which can run them directly.</sos:Text>
</sos:POI>
<sos:POI ID="13" Type="Effect">
<sos:Parent Parent-ID="6"/>
<sos:Title>The user is allowed to modify the software</sos:Title>
</sos:POI>
<sos:POI ID="14" Type="Effect">
<sos:Parent Parent-ID="6"/>
<sos:Title>The user isn’t allowed to modify the software</sos:Title>
</sos:POI>
<sos:POI ID="15" Type="Effect">
<sos:Parent Parent-ID="11"/>
<sos:Title>The user is enabled to modify the software</sos:Title>
</sos:POI>
<sos:POI ID="16" Type="Effect">
<sos:Parent Parent-ID="8"/>
<sos:Title>The user isn’t enabled to modify the software</sos:Title>
</sos:POI>
</sos:SOS></div></body></html>
\ No newline at end of file
......@@ -100,7 +100,7 @@ function Reset(targets) {
let target = document.getElementById(targets[i]);
if (target == null) {
throw "Renderer: Can't find target with ID '" + targetId + "'.";
throw "Renderer: Can't find target with ID '" + targets[i] + "'.";
}
while (target.hasChildNodes() == true) {
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2018-2019 Stephan Kreutzer
This file is part of SOS Grid Prototype 1.
SOS Grid Prototype 1 is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3 or any later version,
as published by the Free Software Foundation.
SOS Grid Prototype 1 is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License 3 for more details.
You should have received a copy of the GNU Affero General Public License 3
along with SOS Grid Prototype 1. If not, see <http://www.gnu.org/licenses/>.
-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:sos="http://www.untiednations.com/SOS">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no" doctype-public="-//W3C//DTD XHTML 1.1//EN" doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"/>
<xsl:template match="/">
<html version="-//W3C//DTD XHTML 1.1//EN" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/1999/xhtml http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8"/>
<xsl:text>&#xA;</xsl:text>
<xsl:comment> This file was created by sos_xml_to_sos_grid_xhtml_1.xsl of SOS Grid Prototype 1, which is free software licensed under the GNU Affero General Public License 3 or any later version (see https://gitlab.com/skreutzer/sos-experimential/prototypes/sos-grid-1/ and http://www.untiednations.com/community/plan-sos/). </xsl:comment>
<xsl:text>&#xA;</xsl:text>
<xsl:comment>
Copyright (C) 2018-2019 Stephan Kreutzer
This file is part of SOS Grid Prototype 1.
SOS Grid Prototype 1 is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3 or any later version,
as published by the Free Software Foundation.
SOS Grid Prototype 1 is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License 3 for more details.
You should have received a copy of the GNU Affero General Public License 3
along with SOS Grid Prototype 1. If not, see &lt;http://www.gnu.org/licenses/&gt;.
The data in the &lt;div id="sos-input"/&gt; is not part of this program,
it's user data that is only processed. A different license may apply.
</xsl:comment>
<xsl:text>&#xA;</xsl:text>
<title>SOS Grid Prototype 1</title>
<meta content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" name="viewport"/>
<link rel="stylesheet" type="text/css" href="./css/styles.css"/>
<!-- <script src="...">//</script> to prevent self-closing by XSLT outputting XHTML. -->
<script type="text/javascript" src="./js/sos-grid-engine.js">//</script>
<script type="text/javascript" src="./js/sos-grid-renderer.js">//</script>
<script type="text/javascript" src="./js/sos-grid-navigation.js">//</script>
<script type="text/javascript">
<xsl:text>
"use strict";
// As browsers/W3C/WHATWG are incredibly evil, they might ignore the self-declarative
// XML namespace of this document and the given content type in the header, and instead
// assume/render "text/html", which then fails with JavaScript characters that are
// XML/XHTML special characters which need to be escaped, if the file is saved under
// a name that happens to end with ".html" (!!!). Just have the file name end with
// ".xhtml" and it might magically start to work.
function loadGrid() {
let loadLink = document.getElementById('loadLink');
loadLink.parentNode.removeChild(loadLink);
NavigatePoi("");
}
// NavigatePoi() with empty ID string: load the "default" (first) POI.
document.addEventListener("DOMContentLoaded", function() { loadGrid(); });
</xsl:text>
</script>
</head>
<body>
<div id="grid">
<div id="causes"/>
<div id="current"/>
<div id="effects"/>
<div id="loadLink">
<a href="#" onclick="loadGrid();">Load</a>
</div>
</div>
<!--
As the stupid browser execution environment is sandboxed, local files can't
be dynamically read from disk, and as we're forced to load the entire source
into memory anyway because of this, if it's XML, we could easily put it into
the DOM instead of parsing XML from a JavaScript variable. This interferes
with XHTML GUI work in this XSLT file, but if the XML source would need to be
escaped to be a JavaScript string literal, a conversion is unavoidable, so
the XHTML file can just as well be the result of a XSLT conversion from the source.
-->
<div id="sos-input" style="display:none;">
<xsl:comment> The data contained in this element and sub-elements is not part of this program, it's user data and might be under a different license than this program. This program also doesn't depend on it or link it as a library, it's only processed. </xsl:comment>
<xsl:apply-templates select="/sos:SOS"/>
</div>
</body>
</html>
</xsl:template>
<xsl:template match="//sos:*">
<xsl:element name="sos:{local-name()}">
<xsl:copy-of select="@*"/>
<xsl:apply-templates select="node()|text()"/>
</xsl:element>
</xsl:template>
<xsl:template match="//sos:*//text()">
<xsl:copy/>
</xsl:template>
<xsl:template match="text()"/>
</xsl:stylesheet>
Parts of $/sos_xml_to_sos_map_xhtml_1.xsl and everything in $/sosmap/
Parts of $/sos_xml_to_sos_map_xhtml_1.xsl and everything in $/sos-map-1/
are based on commit 115 of https://github.com/cgutteridge/webleau/
(https://github.com/cgutteridge/webleau/tree/f4d7fabd081aa099e986c64ff2a8f5484bbb8ed2).
$/sosmap/js/hammer.min.js.map was replaced with the most recent commit 3
$/sos-map-1/js/hammer.min.js.map was replaced with the most recent commit 3
(https://github.com/hammerjs/hammer.js/blob/a28c530297f6e66785476013a6c9162305a2ce42/hammer.min.js.map).
$/sosmap/css/jquery-ui.css and $/sosmap/js/jquery.ui.touch-punch.min.js
$/sos-map-1/css/jquery-ui.css and $/sos-map-1/js/jquery.ui.touch-punch.min.js
are licensed under Expat (see $/EXPAT-LICENSE) or GPL 2 (see $/GPL_2-LICENSE);
$/sosmap/js/hammer.min.js, $/sosmap/js/hammer.min.js.map, $/sosmap/js/jquery-1.12.4.min.js
and $/sosmap/js/jquery-ui.js are licensed under Expat (see $/EXPAT-LICENSE);
$/sosmap/css/sosmap.css, $/sosmap/js/lqs/* and $/sos_xml_to_sos_map_xhtml_1.xsl
$/sos-map-1/js/hammer.min.js, $/sos-map-1/js/hammer.min.js.map, $/sos-map-1/js/jquery-1.12.4.min.js
and $/sos-map-1/js/jquery-ui.js are licensed under Expat (see $/EXPAT-LICENSE);
$/sos-map-1/css/sos-map-1.css, $/sos-map-1/js/lqs/* and $/sos_xml_to_sos_map_xhtml_1.xsl
are licensed under the Apache 2.0 (see $/APACHE_2_0-LICENSE).
The $/sosmap/index.html is generated via a XSLT transformation using the
The $/sos-map-1/index.xhtml is generated via a XSLT transformation using the
$/sos_xml_to_sos_map_xhtml_1.xsl XSLT stylesheet on a SOS XML file.
The already existing file is based on $/../examples/copyright_license_for_format_examples.xml
(commit 2 of https://gitlab.com/skreutzer/sos-experimential/blob/master/examples/copyright_license_for_format_examples.xml,
https://gitlab.com/skreutzer/sos-experimential/tree/6f4e95b49f50df0dd6125cd2ea654e3dc9be76f0).
The already existing file is based on $/../../examples/copyright_license_for_format_examples.xml
(commit https://gitlab.com/skreutzer/sos-experimential/tree/0a31f1543533128b3a9c3f1531683ef9795fa629).
<?xml version="1.0" encoding="UTF-8"?>
<xml-xslt-transformator-1-jobfile>
<job input-file="../../examples/copyright_license_for_format_examples.xml" entities-resolver-config-file="./xml_xslt_transformator_1/entities/config_empty.xml" stylesheet-file="./sos_xml_to_sos_map_xhtml_1.xsl" output-file="./sosmap/index.html"/>
<job input-file="../../examples/copyright_license_for_format_examples.xml" entities-resolver-config-file="./xml_xslt_transformator_1/entities/config_empty.xml" stylesheet-file="./sos_xml_to_sos_map_xhtml_1.xsl" output-file="./sos-map-1/index.xhtml"/>
</xml-xslt-transformator-1-jobfile>
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html version="-//W3C//DTD XHTML 1.1//EN" xsi:schemaLocation="http://www.w3.org/1999/xhtml http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd" xml:lang="en" lang="en" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sos="http://www.untiednations.com/SOS" xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8"/>
<!-- This file was created by sos_xml_to_sos_map_xhtml_1.xsl, which is free software licensed under the Apache License 2.0 (see https://gitlab.com/skreutzer/sos-experimential/prototypes/sosmap). -->
<!-- This file was created by sos_xml_to_sos_map_xhtml_1.xsl of SOS Map Prototype 1, which is free software licensed under the Apache License 2.0 (see https://gitlab.com/skreutzer/sos-experimential/prototypes/sos-map-1/ and http://www.untiednations.com/community/plan-sos/). -->
<!--
Copyright 2018 Christopher Gutteridge, Stephan Kreutzer
Copyright 2018-2019 Christopher Gutteridge, Stephan Kreutzer
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
......@@ -19,7 +19,7 @@ limitations under the License.
The data in the LQS.setLayout() argument is not part of this program,
it's user data that is only processed. A different license may apply.
-->
<title>SOS Map Prototype</title><meta content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" name="viewport"/><script type="text/javascript" src="js/jquery-1.12.4.min.js">//</script><script type="text/javascript" src="js/jquery-ui.js">//</script><script type="text/javascript" src="js/jquery.ui.touch-punch.min.js">//</script><script type="text/javascript" src="js/hammer.min.js">//</script><script type="text/javascript" src="js/lqs/core.js">//</script><script type="text/javascript" src="js/lqs/point.js">//</script><script type="text/javascript" src="js/lqs/line.js">//</script><script type="text/javascript" src="js/lqs/node.js">//</script><script type="text/javascript" src="js/lqs/link.js">//</script><script type="text/javascript" src="js/lqs/viewspec.js">//</script><script type="text/javascript" src="js/lqs/node-text.js">//</script><script type="text/javascript" src="js/lqs/node-html.js">//</script><script type="text/javascript" src="js/lqs/node-error.js">//</script><script type="text/javascript" src="js/lqs/node-embed.js">//</script><script type="text/javascript" src="js/lqs/node-cited.js">//</script><link rel="stylesheet" type="text/css" href="css/jquery-ui.css"/><link rel="stylesheet" type="text/css" href="css/sosmap.css"/><script type="text/javascript">
<title>SOS Map Prototype 1</title><meta content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" name="viewport"/><script type="text/javascript" src="js/jquery-1.12.4.min.js">//</script><script type="text/javascript" src="js/jquery-ui.js">//</script><script type="text/javascript" src="js/jquery.ui.touch-punch.min.js">//</script><script type="text/javascript" src="js/hammer.min.js">//</script><script type="text/javascript" src="js/lqs/core.js">//</script><script type="text/javascript" src="js/lqs/point.js">//</script><script type="text/javascript" src="js/lqs/line.js">//</script><script type="text/javascript" src="js/lqs/node.js">//</script><script type="text/javascript" src="js/lqs/link.js">//</script><script type="text/javascript" src="js/lqs/viewspec.js">//</script><script type="text/javascript" src="js/lqs/node-text.js">//</script><script type="text/javascript" src="js/lqs/node-html.js">//</script><script type="text/javascript" src="js/lqs/node-error.js">//</script><script type="text/javascript" src="js/lqs/node-embed.js">//</script><script type="text/javascript" src="js/lqs/node-cited.js">//</script><link rel="stylesheet" type="text/css" href="css/jquery-ui.css"/><link rel="stylesheet" type="text/css" href="css/sosmap.css"/><script type="text/javascript">
document.addEventListener('DOMContentLoaded', function() {
var lqs = new LQS();
// The data passed as argument to this call is not part of this program, it's user data and might be under a different license than this program. This program also doesn't depend on it or link it as a library, it's merely processed.
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2018 Christopher Gutteridge, Stephan Kreutzer
Copyright 2018-2019 Christopher Gutteridge, Stephan Kreutzer
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
......@@ -22,10 +22,10 @@ limitations under the License.
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8"/>
<xsl:text>&#xA;</xsl:text>
<xsl:comment> This file was created by sos_xml_to_sos_map_xhtml_1.xsl, which is free software licensed under the Apache License 2.0 (see https://gitlab.com/skreutzer/sos-experimential/prototypes/sosmap). </xsl:comment>
<xsl:comment> This file was created by sos_xml_to_sos_map_xhtml_1.xsl of SOS Map Prototype 1, which is free software licensed under the Apache License 2.0 (see https://gitlab.com/skreutzer/sos-experimential/prototypes/sos-map-1/ and http://www.untiednations.com/community/plan-sos/). </xsl:comment>
<xsl:text>&#xA;</xsl:text>
<xsl:comment>
Copyright 2018 Christopher Gutteridge, Stephan Kreutzer
Copyright 2018-2019 Christopher Gutteridge, Stephan Kreutzer
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
......@@ -43,7 +43,7 @@ The data in the LQS.setLayout() argument is not part of this program,
it's user data that is only processed. A different license may apply.
</xsl:comment>
<xsl:text>&#xA;</xsl:text>
<title>SOS Map Prototype</title>
<title>SOS Map Prototype 1</title>
<meta content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" name="viewport"/>
<!-- <script src="...">//</script> to prevent self-closing by XSLT outputting XHTML. -->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment