Initial commit (a clone of the jsmachines project as of v1.15.3)

This commit is contained in:
jeffpar 2014-09-27 14:52:57 -07:00
commit a5e3e6a59d
714 changed files with 130602 additions and 0 deletions

View file

@ -0,0 +1 @@
adsense.html

View file

@ -0,0 +1,35 @@
Shared Templates
===
Template folders contain a variety of XML and HTML templates and supporting files, including:
- DTD files (Document Type Definitions)
- XSD files (XML schemas -- eventually)
- XSL files (XML stylesheets)
- CSS files (stylesheets that the XSL files rely upon)
- HTML files (HTML fragments used to generate part or all of a web page)
[*common.html*](common.html) is the HTML template file used by the [HTMLOut](/my_modules/htmlout/) module
to generate a default HTML file ("index.html") for any folder that only has a "README.md", or a "machine.xml",
or none of the above.
[*common.xsl*](common.xsl) is a collection of XSL templates used by *machine.xsl* (and deprecated *outline.xsl*)
files.
[*machine.xsl*](machine.xsl) is an XML stylesheet that takes things a step further and transforms a machine XML
into a stand-alone HTML document, which also includes all necessary compiled scripts (eg, c1p.js, c1p-dbg.js,
pc.js or pc-dbg.js). Most machine XML files explcitly link to this stylesheet, so that simply loading the XML
file in your web browser creates a working virtual machine.
[*manifest.xsl*](manifest.xsl) is an XML stylesheet that renders a software manifest XML file into a standalone
document; it may even contain a referene to a machine XML file.
[*document.xsl*](document.xsl) is a collection of XSL templates used exclusively by [*outline.xsl*](outline.xsl),
which is a more grandiose version of [*machine.xsl*](machine.xsl), designed to support XML-based documentation
that could also contain embedded machine XML files. However, I've since moved away from that approach, in favor
of simple README.md files that are more flexible and work nicely with GitHub. Also, by rendering them with our own
minimalistic Markdown converter, [MarkOut](/my_modules/markout/), it's also very easy to embed virtual machines
in a README.md document.
Since the XML document syntax that [*outline.xsl*](outline.xsl) supports was never very well documented, I'm tempted
to deprecate it and port any XML documents that still rely on it (mostly the older IAS Electronic Computer Project
documents) to Markdown files.

View file

@ -0,0 +1,8 @@
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-49658648-1', 'pcjs.org');
ga('send', 'pageview');
</script>

View file

@ -0,0 +1,267 @@
@CHARSET "UTF-8";
/**
@author Jeff Parsons (@jeffpar)
@website http://www.pcjs.org/
@created 2013-05-05
@modified 2014-02-23
@license http://www.gnu.org/licenses/gpl.html
*/
body {
margin: 0;
background: #1d1d1d;
}
h1, h2 {
margin-top: 0;
color: #cccccc;
}
h1, h2, h3, h4 {
word-wrap: break-word;
}
/*
h3 ~ *:not(h3) {
margin-left: 40px;
}
*/
h4 a {
color: #cccccc !important;
}
p {
line-height: 1.5em;
}
a img {
vertical-align: bottom;
}
pre, code {
color: #000000;
background-color: #cccccc;
font-family: Monaco, Consolas, "Lucida Console", monospace;
font-size: 12px;
}
pre {
margin: 1em 2em;
padding: 1em;
border-radius: 5px;
overflow: auto;
}
code {
padding: 1px;
}
pre a, code a {
color: #006400 !important;
}
.common {
width: 100%;
margin: 0 auto;
color: #cccccc;
}
.common a {
/*color: #80bd01;*/
color: #7fc07f;
text-decoration: none;
}
.common hr {
border-color: #808080;
}
.common a:hover {
text-decoration: underline;
}
.common, .machine {
font-family: "Helvetica Neue", Helvetica, Arial, Geneva, sans-serif;
font-size: 15px;
}
.machine {
margin: 15px;
overflow: hidden;
}
.c1pjs {
overflow: visible;
}
.machine-placeholder {
text-align: center;
font-weight: bold;
}
.common-top {
background: #1d1d1d;
font-size: small;
}
.common-top-left {
float: left;
width: 60%;
}
.common-top-left ul {
line-height: 1.5em;
list-style-type: none;
margin: 0;
padding: 1em 1em 1em 9px;
overflow: hidden;
}
.common-top-left ul li {
display: block;
float: left;
}
.common-top-left ul li a {
border-right: 1px solid #6f6f6f;
padding: 2px 6px 2px 6px;
}
.common-top-left ul li:last-child a {
border-right: none;
}
.common-top-right {
float: right;
width: 40%;
}
.common-top-right p {
float: right;
margin: 0;
padding: 1em;
}
.common-middle {
clear: both;
padding: 1px 1em 1px 1em;
background: #303030;
}
.common-sidebar {
float: left;
font-size: small;
width: 140px; /* should be <= margin-left of common-main */
padding-bottom: 20px;
overflow: hidden;
word-wrap: break-word;
}
.common-list {
list-style-type: none;
margin-top: 0;
margin-bottom: 0;
padding-left: 0;
}
.common-list li {
/*font-variant: small-caps;*/
padding-bottom: 7px;
}
.common-list-data {
list-style-type: none;
margin-top: 0;
margin-bottom: 0;
padding-left: 0;
}
.common-list-data li {
line-height: 1.5em;
}
.common-list-data-items, .common-list-data-subitems {
font-size: x-small;
list-style-type: none;
margin-top: 0;
margin-bottom: 0;
padding-left: 2em;
}
.common-list-data-items li, .common-list-data-subitems li {
padding-bottom: 0;
}
.common-main {
margin-left: 150px;
/* padding-left: 1em;
padding-bottom: 1em;
padding-right: 1em; */
}
.common-image-gallery {
margin: 0 auto;
text-align: center;
}
.common-image-gallery:after {
content: '';
display: block;
}
.common-image-frame {
display: inline-block;
margin: 8px;
text-align: center;
}
.common-image-link {
padding: 5px;
border: 1px solid black;
border-radius: 5px;
background-color: #FAEBD7;
}
.common-image-label {
font-size: x-small;
}
.common-bottom {
clear: both;
padding-top: 1em;
}
.common-bottom:after {
content: '';
display: block;
clear: both;
}
.common-reference {
float: left;
font-size: x-small;
}
.common-reference a {
text-decoration: none;
}
.common-copyright {
float: right;
font-size: x-small;
}
.common-copyright a {
text-decoration: none;
}
.md-list {
}
.md-list li {
line-height: 1.5em;
margin-bottom: 1em;
}
.md-list li p {
padding-left: 2em;
}
.md-list-compact {
}
.md-list-compact li {
margin-bottom: 0;
}
.md-list-none {
list-style-type: none;
padding-left: 2em;
}
.md-list-none li {
margin-bottom: 0;
}
@media screen and (max-width: 900px) {
/*
h3 ~ *:not(h3) {
margin-left: 0;
}
*/
.common-sidebar {
width: 100%;
}
.common-list {
padding-left: 0;
}
.common-list-data {
padding-left: 0;
}
.common-sidebar h4, .common-list li, .common-list-data li, .common-list-data-items li {
width: 130px;
float: left;
overflow: hidden;
vertical-align: top;
padding-right: 1em;
margin-top: 0;
}
.common-list-data-subitems {
display: none;
}
.common-main {
clear: both;
margin-left: 0;
padding-left: 0;
padding-right: 0;
}
.md-list-none {
padding-left: 1em;
}
}

View file

@ -0,0 +1,79 @@
<!DOCTYPE html>
<!-- Some browsers tend to display a white page before displaying one of our dark pages, which causes annoying "flashes";
setting a background color as early as possible seems to help -->
<html style="background-color: #1d1d1d">
<head>
<title>pcjs.org | <!-- pcjs:title("The Original IBM PC In Your Web Browser") --></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<!-- We could set content="width=device-width, initial-scale=1", but that apparently causes problems
when rotating to landscape mode; by setting only "initial-scale", the width is apparently inferred -->
<meta name="viewport" content="initial-scale=1">
<link rel="shortcut icon" type="image/x-icon" href="/versions/images/current/favicon.ico">
<link rel="stylesheet" type="text/css" href="/versions/pcjs/<!-- pcjs:version -->/common.css">
<!-- pcjs:sockets -->
</head>
<body>
<!-- Template revision 0037 (increment this number prior to any Git push that should trigger a rebuild of all web pages) -->
<div class="common">
<div class="common-top">
<div class="common-top-left">
<ul>
<li><a href="/">Home</a></li>
<li><a href="/apps/pc/">Apps</a></li>
<li><a href="/disks/pc/">Disks</a></li>
<li><a href="/configs/pc/machines/">Machines</a></li>
<li><a href="/docs/pcjs/">Docs</a></li>
<li><a href="/pubs/">Pubs</a></li>
<li><a href="/blog/">Blog</a></li>
<li><a href="/docs/about/">About</a></li>
</ul>
</div>
<div class="common-top-right">
<p>Powered by <a href="http://nodejs.org" target="_blank">Node.js</a> and <a href="http://aws.amazon.com/about-aws/whats-new/2013/03/11/announcing-aws-elastic-beanstalk-for-node-js/" target="_blank">AWS</a></p>
</div>
</div>
<div class="common-middle">
<h4>Directory of C:\<a href="/">PCJS.ORG</a><!-- pcjs:pcpath --></h4>
<div class="common-sidebar">
<!-- pcjs:dirlist -->
<!-- pcjs:manifest -->
<!-- pcjs:htmlfileLater("adsense.html") -->
</div>
<div class="common-main">
<!-- pcjs:default("*", "common-image") -->
<div class="common-bottom">
<p class="common-reference"><!-- Bottom-left-hand stuff, if there was any, would go here --></p>
<p class="common-copyright">
<!-- When using AWS, the pcjs.org domain must redirect to www.pcjs.org, so let's avoid unnecessary redirects in any absolute URLs -->
<span class="common-copyright"><a href="http://www.pcjs.org/">pcjs.org</a> website © 2012-<!-- pcjs:year --> by <a href="http://twitter.com/jeffpar">@jeffpar</a></span><br/>
<span class="common-copyright">PCjs and C1Pjs released under <a href="http://gnu.org/licenses/gpl.html">GPL version 3 or later</a></span>
</p>
</div>
</div>
</div>
</div>
<script id="randomize" type="text/javascript">
(function() {
var p = document.getElementById('random');
if (p) {
var mags = ['BYTE-1975-11:98', 'MSJ-1986-10:34', 'MSJ-1987-05:90', 'PCTJ-1987-01:216', 'PCTJ-1987-02:222', 'PCTJ-1987-03:214', 'PCTJ-1987-04:218', 'PCTJ-1987-05:238', 'PCTJ-1987-06:236', 'PCTJ-1987-07:230', 'PCTJ-1987-08:250', 'PCTJ-1987-09:252', 'PCTJ-1987-10:231', 'PCTJ-1987-11:261', 'PCTJ-1987-12:242'];
var p2 = document.createElement('p');
p2.appendChild(document.createTextNode('In addition, you see a piece of paper lying on the floor.'));
var div1 = document.createElement('div'); div1.setAttribute('class', 'common-image-gallery');
var div2 = document.createElement('div'); div2.setAttribute('class', 'common-image-frame'); div1.appendChild(div2);
var div3 = document.createElement('div'); div3.setAttribute('class', 'common-image-link'); div2.appendChild(div3);
var mag = mags[Math.floor(Math.random() * mags.length)];
var parts = mag.split(':'), issue = parts[0], page = Math.floor(Math.random() * parseInt(parts[1])) + 1;
parts = mag.split('-');
var name = parts[0].toLowerCase();
var a = document.createElement('a'); a.setAttribute('href', '/pubs/pc/magazines/' + name + '/' + issue + '/#page-' + page); div3.appendChild(a);
var img = document.createElement('img'); img.setAttribute('src', 'http://static.pcjs.org/pubs/pc/magazines/' + name + '/' + issue + '/thumbs/' + issue + ' ' + page + '.jpeg'); img.setAttribute('width', '200'); a.appendChild(img);
p.parentNode.insertBefore(p2, p.nextSibling);
p2.parentNode.insertBefore(div1, p2.nextSibling)
}
})();
</script>
<!-- pcjs:htmlfile("analytics.html") -->
</body>
</html>

View file

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2012-05-05" modified="2014-02-23" license="http://www.gnu.org/licenses/gpl.html" -->
<!DOCTYPE xsl:stylesheet [
<!-- XSLT understands these entities only: lt, gt, apos, quot, and amp. Other required entities may be defined below (see entities.dtd). -->
<!ENTITY nbsp "&#160;"> <!ENTITY ne "&#8800;"> <!ENTITY le "&#8804;"> <!ENTITY ge "&#8805;">
<!ENTITY times "&#215;"> <!ENTITY sdot "&#8901;"> <!ENTITY divide "&#247;">
<!ENTITY copy "&#169;"> <!ENTITY Sigma "&#931;"> <!ENTITY sigma "&#963;"> <!ENTITY sum "&#8721;"> <!ENTITY lbrace "&#123;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template name="commonStyles">
<meta charset="utf-8"/>
<link rel="shortcut icon" href="/versions/images/current/favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="/my_modules/shared/templates/common.css"/>
<!-- script type="text/javascript" src="/versions/jquery/1.7.2/jquery.min.js" -->
</xsl:template>
<xsl:template name="commonTop">
<div class="common-top">
<div class="common-top-left">
<ul>
<li><a href="/">Home</a></li>
<li><a href="/apps/pc/">Apps</a></li>
<li><a href="/disks/pc/">Disks</a></li>
<li><a href="/configs/pc/machines/">Machines</a></li>
<li><a href="/docs/pcjs/">Docs</a></li>
<li><a href="/pubs/">Pubs</a></li>
<li><a href="/blog/">Blog</a></li>
<li><a href="/docs/about/">About</a></li>
</ul>
</div>
<div class="common-top-right">
<p>Powered by <a href="http://nodejs.org" target="_blank">Node.js</a> and <a href="http://aws.amazon.com/about-aws/whats-new/2013/03/11/announcing-aws-elastic-beanstalk-for-node-js/" target="_blank">AWS</a></p>
</div>
</div>
</xsl:template>
<xsl:template name="commonBottom">
<div class="common-bottom">
<p class="common-reference"></p>
<p class="common-copyright">
<span class="common-copyright"><a href="http://www.pcjs.org/">pcjs.org</a> website © 2012-2014 by <a href="http://twitter.com/jeffpar">@jeffpar</a></span><br/>
<span class="common-copyright">PCjs and C1Pjs released under <a href="http://gnu.org/licenses/gpl.html">GPL version 3 or later</a></span>
</p>
</div>
</xsl:template>
</xsl:stylesheet>

View file

@ -0,0 +1,26 @@
addend
chassis
augend
triodes
addends
rectifiers
kirchoff
triode
ohms
shiftable
sensitising
selectron
pentode
timeline
seriatim
operability
performable
deselected
uncompiled
repower
onbeforeunload
onunload
onload
onpageshow
diskette
masochistic

View file

@ -0,0 +1,167 @@
@CHARSET "UTF-8";
/* @author Jeff Parsons (@jeffpar)
@website http://www.pcjs.org/
@created 2013-05-05
@modified 2014-02-23
@license http://www.gnu.org/licenses/gpl.html
*/
.page {
margin: 2% 2%;
padding: 2% 2%;
min-width: 30em;
overflow: auto;
font-size: large;
font-family: Helvetica, Arial, sans-serif;
background: #303030;
color: #ccc;
/* background-color: #63b6fc; */
}
.page-header {
}
.page-header-title {
text-align: center;
/*text-transform: uppercase;*/
}
.page a {
color: #7fc07f;
text-decoration: none;
}
a.footlink, a.paralink {
text-decoration: none;
}
a.footlink:link, a.paralink:link {
color: blue;
}
a.footlink:visited, a.paralink:visited {
color: blue;
}
.galleryitem {
float: left;
width: 200px;
}
.item {
float: left;
width: 2em;
text-indent: 1em;
}
.list {
margin-left: 3em;
text-indent: 0;
text-align: justify;
}
ul {
list-style: none;
}
div.pnumber {
float: left;
width: 2em;
text-indent: 1em;
}
div.pitem {
margin-left: 10em;
}
p.indent, .justified p {
text-indent: 2em;
text-align: justify;
line-height: 1.5em;
}
p.noindent {
text-indent: 0;
text-align: justify;
}
p.center, .center {
text-align: center;
}
li.para {
margin-top: 1em;
margin-bottom: 1em;
}
.left {
text-align: left;
}
.right {
text-align: right;
}
blockquote.tag {
font-size: small;
font-family: Monaco, Fixed, monospace;
margin-top: 0;
margin-bottom: 0;
}
.blockquote {
padding-left: 1em;
text-indent: 0;
text-align: justify;
}
.italics {
font-style: italic;
}
.medium {
font-size: medium;
}
.small {
font-size: x-small;
}
.smallcaps {
font-variant: small-caps;
}
.strike {
text-decoration: line-through;
}
.summation, .bracelist {
display: inline-block;
position: relative;
vertical-align: middle;
text-align: center;
margin-bottom: 0.5ex;
text-indent: 0;
}
.bracelist-symbol {
font-size: 3em;
vertical-align: -40%;
}
.summation .summation-lower, .summation .summation-upper, .bracelist-item {
display: block;
font-size: 75%;
text-align: center;
}
.summation .summation-upper {
margin-bottom: 0;
margin-left: 0.8ex;
font-style: italic;
}
.summation .summation-lower{
margin-bottom: -0.6ex;
font-style: italic;
}
.summation .summation-symbol {
font-size: 2em;
}
p sup {
vertical-align: baseline;
position: relative;
bottom: .5em;
font-size: small;
}
p sub {
vertical-align: baseline;
position: relative;
bottom: -.5em;
font-size: small;
}
.footnote {
font-size: medium;
text-indent: 1em;
text-align: justify;
margin-top: .5em;
}
.image-right {
float: right;
margin-left: 1em;
margin-top: 1em;
margin-bottom: 1em;
}
.image-caption {
font-size: small;
text-align: center;
}

View file

@ -0,0 +1,454 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2012-05-05" modified="2014-02-23" license="http://www.gnu.org/licenses/gpl.html" -->
<!DOCTYPE xsl:stylesheet [
<!-- XSLT understands these entities only: lt, gt, apos, quot, and amp. Other required entities may be defined below (see entities.dtd). -->
<!ENTITY nbsp "&#160;"> <!ENTITY ne "&#8800;"> <!ENTITY le "&#8804;"> <!ENTITY ge "&#8805;">
<!ENTITY times "&#215;"> <!ENTITY sdot "&#8901;"> <!ENTITY divide "&#247;">
<!ENTITY copy "&#169;"> <!ENTITY Sigma "&#931;"> <!ENTITY sigma "&#963;"> <!ENTITY sum "&#8721;"> <!ENTITY lbrace "&#123;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template name="documentStyles">
<link rel="stylesheet" type="text/css" href="document.css"/>
</xsl:template>
<xsl:template match="title">
<h1><xsl:apply-templates/></h1>
</xsl:template>
<xsl:template name="p">
<xsl:if test="@id">
<a name="{@id}"></a>
</xsl:if>
<xsl:choose>
<xsl:when test="not(@class)">
<p><xsl:apply-templates/></p>
</xsl:when>
<xsl:otherwise>
<p class="{@class}"><xsl:apply-templates/></p>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="p">
<xsl:call-template name="p"/>
</xsl:template>
<xsl:template match="br">
<br/>
</xsl:template>
<xsl:template match="p[@number]">
<div class="pnumber">
<xsl:choose>
<xsl:when test="not(@number) or @number = ''">&nbsp;</xsl:when>
<xsl:otherwise><xsl:value-of select="@number"/></xsl:otherwise>
</xsl:choose>
</div>
<div class="pitem">
<xsl:call-template name="p"/>
</div>
</xsl:template>
<xsl:template match="span">
<xsl:choose>
<xsl:when test="not(@class)">
<span><xsl:apply-templates/></span>
</xsl:when>
<xsl:when test="@class = 'italics'">
<em><xsl:apply-templates/></em>
</xsl:when>
<xsl:otherwise>
<span class="{@class}"><xsl:apply-templates/></span>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="h2">
<h2><xsl:apply-templates/></h2>
</xsl:template>
<xsl:template match="h3">
<h3><xsl:apply-templates/></h3>
</xsl:template>
<xsl:template match="h4">
<h4><xsl:apply-templates/></h4>
</xsl:template>
<xsl:template match="h5">
<h5><xsl:apply-templates/></h5>
</xsl:template>
<xsl:template match="h6">
<h6><xsl:apply-templates/></h6>
</xsl:template>
<xsl:template match="em">
<em><xsl:apply-templates/></em>
</xsl:template>
<xsl:template match="strong">
<strong><xsl:apply-templates/></strong>
</xsl:template>
<xsl:template match="a">
<a href="{@href}" target="{@target}"><xsl:apply-templates/></a>
</xsl:template>
<xsl:template match="ol">
<blockquote><ol><xsl:apply-templates/></ol></blockquote>
</xsl:template>
<xsl:template match="ul">
<blockquote><ul><xsl:apply-templates/></ul></blockquote>
</xsl:template>
<xsl:template match="li">
<li><xsl:apply-templates/></li>
</xsl:template>
<xsl:template match="img">
<div><img src="{@src}" alt="image"/></div>
</xsl:template>
<xsl:template match="pre">
<pre><xsl:apply-templates/></pre>
</xsl:template>
<xsl:template match="figure">
<xsl:choose>
<xsl:when test="@pos">
<div class="{@pos}"><img src="{@ref}" alt="{.}"/><br/><xsl:value-of select="."/></div>
</xsl:when>
<xsl:otherwise>
<div><img src="{@ref}" alt="{.}"/><br/><xsl:value-of select="."/></div>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="sub">
<sub><xsl:apply-templates/></sub>
</xsl:template>
<xsl:template match="sup">
<sup><xsl:apply-templates/></sup>
</xsl:template>
<xsl:template match="lt">&lt;</xsl:template>
<xsl:template match="gt">&gt;</xsl:template>
<xsl:template match="ne">&ne;</xsl:template>
<xsl:template match="le">&le;</xsl:template>
<xsl:template match="ge">&ge;</xsl:template>
<xsl:template match="times">&times;</xsl:template>
<xsl:template match="dot">&sdot;</xsl:template>
<xsl:template match="divide">&divide;</xsl:template>
<xsl:template match="sigma">&sigma;</xsl:template>
<xsl:template match="summation">
<!-- Refer to: http://www.periodni.com/mathematical_and_chemical_equations_on_web.html -->
<span class="summation">
<span class="summation-upper"><xsl:value-of select="@upper"/></span>
<span class="summation-symbol">&sum;</span>
<span class="summation-lower"><xsl:value-of select="@lower"/></span>
</span>
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="bracelist">
<span class="bracelist-symbol">&lbrace;</span>
<span class="bracelist">
<xsl:for-each select="item">
<span class="bracelist-item"><xsl:apply-templates/></span>
</xsl:for-each>
</span>
</xsl:template>
<xsl:template match="footlink">
<xsl:variable name="docID" select="/document/@id"/>
<a class="footlink" id="fn{$docID}_ref{@n}" href="#fn{$docID}_{@n}"><sup><xsl:if test="@quoted"><xsl:text>[</xsl:text></xsl:if><xsl:value-of select="@n"/><xsl:if test="@quoted"><xsl:text>]</xsl:text></xsl:if></sup></a>
</xsl:template>
<xsl:template match="footnote">
<xsl:variable name="docID" select="/document/@id"/>
<div class="footnote"><a id="fn{$docID}_{@n}" href="#fn{$docID}_ref{@n}"><sup><xsl:value-of select="@n"/></sup></a><xsl:text> </xsl:text>
<xsl:apply-templates/>
</div>
</xsl:template>
<xsl:template name="authors">
<xsl:for-each select="author"><xsl:if test="position() != 1"><xsl:text>, </xsl:text></xsl:if><xsl:if test="position() != 1 and position() = last()"><xsl:text>and </xsl:text></xsl:if><xsl:value-of select="."/></xsl:for-each>
</xsl:template>
<xsl:template name="formatDate">
<xsl:param name="date"/>
<xsl:param name="format">MDY</xsl:param>
<!-- date format: YYYY-MM-DD (MM and/or DD can be 00 if unknown) -->
<xsl:variable name="year">
<xsl:value-of select="substring-before($date,'-')"/>
</xsl:variable>
<xsl:variable name="mon-day">
<xsl:value-of select="substring-after($date,'-')"/>
</xsl:variable>
<xsl:variable name="mon">
<xsl:value-of select="substring-before($mon-day,'-')"/>
</xsl:variable>
<xsl:variable name="full-day">
<xsl:value-of select="substring-after($mon-day,'-')"/>
</xsl:variable>
<xsl:variable name="day">
<xsl:choose>
<xsl:when test="substring($full-day,1,1) = '0'"><xsl:value-of select="substring($full-day,2)"/></xsl:when>
<xsl:otherwise><xsl:value-of select="$full-day"/></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:choose>
<xsl:when test="$mon = '01'">January </xsl:when>
<xsl:when test="$mon = '02'">February </xsl:when>
<xsl:when test="$mon = '03'">March </xsl:when>
<xsl:when test="$mon = '04'">April </xsl:when>
<xsl:when test="$mon = '05'">May </xsl:when>
<xsl:when test="$mon = '06'">June </xsl:when>
<xsl:when test="$mon = '07'">July </xsl:when>
<xsl:when test="$mon = '08'">August </xsl:when>
<xsl:when test="$mon = '09'">September </xsl:when>
<xsl:when test="$mon = '10'">October </xsl:when>
<xsl:when test="$mon = '11'">November </xsl:when>
<xsl:when test="$mon = '12'">December </xsl:when>
<xsl:when test="$mon = '00'"/><!-- do nothing -->
</xsl:choose>
<xsl:if test="$day != '0' and $format = 'MDY'">
<xsl:value-of select="$day"/><xsl:text>, </xsl:text>
</xsl:if>
<xsl:value-of select="$year"/>
</xsl:template>
<xsl:template match="gallery">
<h2><xsl:value-of select="description"/></h2>
<div class="gallery">
<xsl:apply-templates select="item" mode="gallery"/>
</div>
<div style="clear:both;"></div>
</xsl:template>
<xsl:template match="item" mode="gallery">
<div class="galleryitem">
<a href="{@ref}"><img src="/versions/images/current/pdf-192.jpg" alt="{.}"/></a><br/>
<div style="font-size:small; text-align:center;"><xsl:value-of select="."/></div>
</div>
</xsl:template>
<xsl:template match="list[@type = 'timeline']">
<xsl:if test="not(description)">
<h2>Timeline</h2>
</xsl:if>
<xsl:if test="description">
<h2><xsl:value-of select="description"/></h2>
</xsl:if>
<blockquote>
<xsl:apply-templates select="item" mode="timeline"/>
</blockquote>
</xsl:template>
<xsl:template match="item" mode="timeline">
<xsl:if test="@ref">
<xsl:variable name="documentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
<xsl:apply-templates select="document($documentFile)/document" mode="withDate">
<xsl:with-param name="itemRef" select="@ref"/>
</xsl:apply-templates>
</xsl:if>
<xsl:if test="not(@ref)">
<h3><xsl:call-template name="formatDate"><xsl:with-param name="date" select="@date"/></xsl:call-template></h3>
<blockquote>
<xsl:value-of select="."/>
</blockquote>
</xsl:if>
</xsl:template>
<xsl:template match="list[@type = 'people']">
<xsl:if test="not(description)">
<h2>People</h2>
</xsl:if>
<xsl:if test="description">
<h2><xsl:value-of select="description"/></h2>
</xsl:if>
<blockquote>
<xsl:apply-templates select="item" mode="people"/>
</blockquote>
</xsl:template>
<xsl:template match="item" mode="people">
<h3><xsl:value-of select="name"/></h3>
<xsl:apply-templates select="list"/>
</xsl:template>
<xsl:template match="list[@type = 'documents']">
<xsl:if test="description"><h2><xsl:value-of select="description"/></h2></xsl:if>
<ul>
<xsl:apply-templates select="item" mode="document"/>
</ul>
</xsl:template>
<xsl:template match="item" mode="document">
<xsl:variable name="documentFile"><xsl:value-of select="$rootDir"/><xsl:value-of select="@ref"/></xsl:variable>
<xsl:apply-templates select="document($documentFile)/document">
<xsl:with-param name="itemRef" select="@ref"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="document">
<xsl:param name="itemRef"/>
<li>
<xsl:call-template name="documentSummary"><xsl:with-param name="itemRef" select="$itemRef"/></xsl:call-template>
</li>
</xsl:template>
<xsl:template match="document" mode="withDate">
<xsl:param name="itemRef"/>
<h3><xsl:call-template name="formatDate"><xsl:with-param name="date" select="date"/><xsl:with-param name="format" select="MY"/></xsl:call-template></h3>
<blockquote>
<p>
<xsl:call-template name="documentSummary"><xsl:with-param name="itemRef" select="$itemRef"/><xsl:with-param name="multiLine" select="'true'"/></xsl:call-template>
</p>
</blockquote>
</xsl:template>
<xsl:template name="documentSummary">
<xsl:param name="itemRef"/>
<xsl:param name="multiLine">false</xsl:param>
<xsl:choose>
<xsl:when test="content|include">
<a href="{$itemRef}"><xsl:value-of select="title"/></a>
<xsl:if test="@ref">
<span class="small">
<xsl:text> [</xsl:text><a href="{@ref}">Original</a><xsl:text>]</xsl:text>
</span>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<a href="{$itemRef}"><xsl:value-of select="title"/></a>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="copy">
<span class="small">
<xsl:text> [</xsl:text><a href="{copy/@ref}"><xsl:value-of select="copy"/></a><xsl:text>]</xsl:text>
</span>
</xsl:if>
<xsl:if test="author"><xsl:if test="$multiLine = 'true'"><br/></xsl:if><span class="medium"><xsl:text> by </xsl:text><xsl:call-template name="authors"/></span></xsl:if>
<xsl:if test="source">
<span class="small">
<br/>
<xsl:text>[Source: </xsl:text>
<xsl:if test="site">
<a href="{site/@url}"><xsl:value-of select="site"/></a>
</xsl:if>
<xsl:if test="not(site)">
<a href="{source/@url}"><xsl:value-of select="source"/></a>
</xsl:if>
<xsl:text>]</xsl:text>
</span>
</xsl:if>
</xsl:template>
<xsl:template match="list[@type = 'resources']">
<xsl:if test="not(description)">
<h2>Resources</h2>
</xsl:if>
<xsl:if test="description">
<h2><xsl:value-of select="description"/></h2>
</xsl:if>
<blockquote>
<xsl:apply-templates select="item" mode="resources"/>
</blockquote>
</xsl:template>
<xsl:template match="item" mode="resources">
<h3><xsl:value-of select="description"/></h3>
<xsl:apply-templates select="list"/>
</xsl:template>
<xsl:template match="list[@type = 'links']">
<xsl:if test="description">
<h4><xsl:value-of select="description"/></h4>
</xsl:if>
<ul>
<xsl:apply-templates select="item" mode="links"/>
</ul>
</xsl:template>
<xsl:template match="item" mode="links">
<li><a href="{@ref}"><xsl:value-of select="."/></a></li>
</xsl:template>
<xsl:template match="list[not(@type)]">
<xsl:if test="description">
<h2><xsl:value-of select="description"/></h2>
</xsl:if>
<blockquote>
<xsl:apply-templates select="item|tag" mode="outer"/>
</blockquote>
</xsl:template>
<xsl:template match="item" mode="outer">
<xsl:if test="description">
<h3><xsl:value-of select="description"/></h3>
</xsl:if>
<xsl:apply-templates select="list|item|tag" mode="inner"/>
</xsl:template>
<xsl:template match="list" mode="inner">
<xsl:if test="description">
<h4><xsl:value-of select="description"/></h4>
</xsl:if>
<ul>
<xsl:apply-templates select="list|item|para|tag" mode="inner"/>
</ul>
</xsl:template>
<xsl:template name="innerlist">
<xsl:if test="description">
<xsl:value-of select="description"/>
</xsl:if>
<ul>
<xsl:apply-templates select="list|item|para|tag" mode="inner"/>
</ul>
</xsl:template>
<xsl:template match="item" mode="inner">
<xsl:choose>
<xsl:when test="@ref">
<li><a href="{@ref}"><xsl:apply-templates/></a></li>
</xsl:when>
<xsl:when test="description">
<li><xsl:call-template name="innerlist"/></li>
</xsl:when>
<xsl:otherwise>
<li><xsl:apply-templates/></li>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="para" mode="inner">
<li class="para"><xsl:apply-templates/></li>
</xsl:template>
<xsl:template match="tag" mode="outer">
<xsl:call-template name="tag"/>
</xsl:template>
<xsl:template match="tag" mode="inner">
<xsl:call-template name="tag"/>
</xsl:template>
<xsl:template name="tag">
<blockquote class="tag">
<xsl:text>&lt;</xsl:text><xsl:if test="@href"><a href="{@href}"><xsl:value-of select="@name"/></a></xsl:if><xsl:if test="not(@href)"><xsl:value-of select="@name"/></xsl:if><xsl:for-each select="attr"><xsl:text> </xsl:text><xsl:value-of select="@name"/><xsl:text>="</xsl:text><xsl:value-of select="@value"/><xsl:text>"</xsl:text></xsl:for-each>
<xsl:choose>
<xsl:when test="tag"><xsl:text>&gt;</xsl:text><xsl:apply-templates mode="inner"/><xsl:text>&lt;/</xsl:text><xsl:value-of select="@name"/><xsl:text>&gt;</xsl:text></xsl:when>
<xsl:when test="normalize-space(.) != ''"><xsl:text>&gt;</xsl:text><xsl:value-of select="."/><xsl:text>&lt;/</xsl:text><xsl:value-of select="@name"/><xsl:text>&gt;</xsl:text></xsl:when>
<xsl:otherwise><xsl:text>/&gt;</xsl:text></xsl:otherwise>
</xsl:choose>
</blockquote>
</xsl:template>
</xsl:stylesheet>

View file

@ -0,0 +1,15 @@
<!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2012-05-05" modified="2014-02-23" license="http://www.gnu.org/licenses/gpl.html" -->
<!-- XSLT understands these entities only: lt, gt, apos, quot, and amp. Other useful entities are defined below. -->
<!-- Alas, Firefox doesn't support loading external entities, so the contents of this file must be pasted into every primary XSL file. -->
<!ENTITY nbsp "&#160;">
<!ENTITY sect "&#167;"> <!-- OSX: option 6 -->
<!ENTITY copy "&#169;"> <!-- OSX: option g -->
<!ENTITY para "&#182;"> <!-- OSX: option 7 -->
<!ENTITY ndash "&#8211;"> <!-- &#x2013; UTF-8: 0xE2 0x80 0x93; OSX: option - -->
<!ENTITY mdash "&#8212;"> <!-- &#x2014; UTF-8: 0xE2 0x80 0x94; OSX: shift option - -->
<!ENTITY lsquo "&#8216;"> <!-- OSX: option ] -->
<!ENTITY rsquo "&#8217;"> <!-- OSX: shift option ] -->
<!ENTITY ldquo "&#8220;"> <!-- &#x201C; UTF-8: 0xE2 0x80 0x9C; OSX: option [ -->
<!ENTITY rdquo "&#8221;"> <!-- &#x201D; UTF-8: 0xE2 0x80 0x9D; OSX: shift option [ -->
<!ENTITY dagger "&#8224;"> <!-- OSX: option t -->
<!ENTITY Dagger "&#8225;"> <!-- OSX: shift option 7 -->

View file

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2012-05-05" modified="2014-02-23" license="http://www.gnu.org/licenses/gpl.html" -->
<!DOCTYPE xsl:stylesheet [
<!-- XSLT understands these entities only: lt, gt, apos, quot, and amp. Other useful entities are defined below (see entities.dtd). -->
<!ENTITY nbsp "&#160;"> <!ENTITY sect "&#167;"> <!ENTITY copy "&#169;"> <!ENTITY para "&#182;"> <!ENTITY ndash "&#8211;"> <!ENTITY mdash "&#8212;">
<!ENTITY lsquo "&#8216;"> <!ENTITY rsquo "&#8217;"> <!ENTITY ldquo "&#8220;"> <!ENTITY rdquo "&#8221;"> <!ENTITY dagger "&#8224;"> <!ENTITY Dagger "&#8225;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output doctype-system="about:legacy-compat"/>
<xsl:include href="common.xsl"/>
<!-- There is no "shared" components.xsl, so we just pick one to eliminate IDE inspection warnings -->
<xsl:include href="../../pcjs-client/templates/components.xsl"/>
<xsl:template match="/machine">
<html lang="en">
<head>
<title><xsl:value-of select="$SITEHOST"/></title>
<xsl:call-template name="commonStyles"/>
<xsl:call-template name="componentStyles"/>
</head>
<body>
<div class="common">
<xsl:call-template name="commonTop"/>
<div class="common-middle">
<p></p>
<div id="{@id}" class="machine {@class}js">
<xsl:call-template name="component">
<xsl:with-param name="machine" select="@id"/>
<xsl:with-param name="component" select="'machine'"/>
<xsl:with-param name="class"><xsl:value-of select="@class"/>js</xsl:with-param>
<xsl:with-param name="parms"><xsl:if test="@parms">,<xsl:value-of select="@parms"/></xsl:if></xsl:with-param>
</xsl:call-template>
</div>
</div>
<xsl:call-template name="commonBottom"/>
</div>
<xsl:call-template name="componentScripts">
<xsl:with-param name="component">
<xsl:choose>
<xsl:when test="debugger"><xsl:value-of select="@class"/>-dbg</xsl:when>
<xsl:otherwise><xsl:value-of select="@class"/></xsl:otherwise>
</xsl:choose>
</xsl:with-param>
</xsl:call-template>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

View file

@ -0,0 +1,251 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2014-04-10" modified="2014-04-10" license="http://www.gnu.org/licenses/gpl.html" -->
<!DOCTYPE xsl:stylesheet [
<!-- XSLT understands these entities only: lt, gt, apos, quot, and amp. Other useful entities are defined below (see entities.dtd). -->
<!ENTITY nbsp "&#160;"> <!ENTITY sect "&#167;"> <!ENTITY copy "&#169;"> <!ENTITY para "&#182;"> <!ENTITY ndash "&#8211;"> <!ENTITY mdash "&#8212;">
<!ENTITY lsquo "&#8216;"> <!ENTITY rsquo "&#8217;"> <!ENTITY ldquo "&#8220;"> <!ENTITY rdquo "&#8221;"> <!ENTITY dagger "&#8224;"> <!ENTITY Dagger "&#8225;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output doctype-system="about:legacy-compat"/>
<xsl:include href="common.xsl"/>
<!-- There is no "shared" components.xsl, so we just pick one to eliminate IDE inspection warnings -->
<xsl:include href="../../pcjs-client/templates/components.xsl"/>
<xsl:template match="/manifest[@type = 'document']">
<html lang="en">
<head>
<title><xsl:value-of select="$SITEHOST"/></title>
<xsl:call-template name="commonStyles"/>
<xsl:call-template name="componentStyles"/>
</head>
<body>
<div class="common">
<xsl:call-template name="commonTop"/>
<div class="common-middle">
<h4>Document Manifest</h4>
<div class="common-sidebar">
<ul class="common-list-data">
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Title'"/>
<xsl:with-param name="node" select="title"/>
<xsl:with-param name="default">None</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Version'"/>
<xsl:with-param name="node" select="version"/>
<xsl:with-param name="default" select="''"/>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Source'"/>
<xsl:with-param name="node" select="source"/>
<xsl:with-param name="default" select="''"/>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Documents'"/>
<xsl:with-param name="node" select="document"/>
<xsl:with-param name="default"><xsl:value-of select="title"/> <xsl:if test="version != ''"><xsl:text> </xsl:text><xsl:value-of select="version"/></xsl:if></xsl:with-param>
</xsl:call-template>
</ul>
</div>
<div class="common-main">
<!-- TODO: Enumerate cover elements within document elements -->
<p><xsl:value-of select="desc"/></p>
<xsl:call-template name="commonBottom"/>
</div>
</div>
</div>
</body>
</html>
</xsl:template>
<xsl:template match="/manifest[@type = 'software' or not(@type)]">
<xsl:variable name="machineClass">
<xsl:choose>
<xsl:when test="machine/@class"><xsl:value-of select="machine/@class"/></xsl:when>
<xsl:otherwise><xsl:value-of select="$MACHINECLASS"/></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<html lang="en">
<head>
<title><xsl:value-of select="$SITEHOST"/></title>
<xsl:call-template name="commonStyles"/>
<xsl:call-template name="componentStyles"/>
</head>
<body>
<div class="common">
<xsl:call-template name="commonTop"/>
<div class="common-middle">
<h4>Software Manifest</h4>
<div class="common-sidebar">
<ul class="common-list-data">
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Title'"/>
<xsl:with-param name="node" select="title"/>
<xsl:with-param name="default">None</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Version'"/>
<xsl:with-param name="node" select="version"/>
<xsl:with-param name="default">Unknown</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Type'"/>
<xsl:with-param name="node" select="type"/>
<xsl:with-param name="default">None</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Category'"/>
<xsl:with-param name="node" select="category"/>
<xsl:with-param name="default">None</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Created'"/>
<xsl:with-param name="node" select="creationDate"/>
<xsl:with-param name="default" select="''"/>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Creators'"/>
<xsl:with-param name="node" select="creator"/>
<xsl:with-param name="default" select="''"/>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label"><xsl:if test="creationDate">Updated</xsl:if><xsl:if test="not(creationDate)">Released</xsl:if></xsl:with-param>
<xsl:with-param name="node" select="releaseDate"/>
<xsl:with-param name="default">Unknown</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Company'"/>
<xsl:with-param name="node" select="company"/>
<xsl:with-param name="default" select="''"/>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Authors'"/>
<xsl:with-param name="node" select="author"/>
<xsl:with-param name="default" select="''"/>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Contributors'"/>
<xsl:with-param name="node" select="contributor"/>
<xsl:with-param name="default" select="''"/>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Publisher'"/>
<xsl:with-param name="node" select="publisher"/>
<xsl:with-param name="default" select="''"/>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'License'"/>
<xsl:with-param name="node" select="license"/>
<xsl:with-param name="default" select="''"/>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Source'"/>
<xsl:with-param name="node" select="source"/>
<xsl:with-param name="default" select="''"/>
</xsl:call-template>
<xsl:call-template name="listItem">
<xsl:with-param name="label" select="'Disks'"/>
<xsl:with-param name="node" select="disk"/>
<xsl:with-param name="default"><xsl:value-of select="title"/> <xsl:if test="version != ''"><xsl:text> </xsl:text><xsl:value-of select="version"/></xsl:if></xsl:with-param>
</xsl:call-template>
</ul>
</div>
<div class="common-main">
<xsl:for-each select="machine[not(@type) or @type = 'default']">
<xsl:call-template name="machine">
<xsl:with-param name="href" select="@href"/>
<xsl:with-param name="state" select="@state"/>
</xsl:call-template>
</xsl:for-each>
<xsl:if test="not(machine[not(@type) or @type = 'default'])">
<p>No default machine specified for '<xsl:value-of select="title"/>' in manifest.xml</p>
</xsl:if>
<xsl:call-template name="commonBottom"/>
</div>
</div>
</div>
<xsl:call-template name="componentScripts">
<xsl:with-param name="component">
<xsl:choose>
<xsl:when test="machine/@debugger"><xsl:value-of select="$machineClass"/>-dbg</xsl:when>
<xsl:otherwise><xsl:value-of select="$machineClass"/></xsl:otherwise>
</xsl:choose>
</xsl:with-param>
</xsl:call-template>
</body>
</html>
</xsl:template>
<xsl:template name="listItem">
<xsl:param name="label"/>
<xsl:param name="node"/>
<xsl:param name="default">Unknown</xsl:param>
<xsl:if test="$node != '' or $default != ''">
<li><xsl:value-of select="$label"/>
<ul class="common-list-data-items">
<xsl:for-each select="$node">
<xsl:variable name="desc">
<xsl:choose>
<xsl:when test="desc"><xsl:value-of select="desc"/></xsl:when>
<xsl:when test="org"><xsl:value-of select="org"/></xsl:when>
<xsl:otherwise/>
</xsl:choose>
</xsl:variable>
<li title="{$desc}">
<xsl:variable name="value">
<xsl:choose>
<xsl:when test="name">
<xsl:value-of select="name"/>
</xsl:when>
<xsl:when test="normalize-space(./text()) != ''">
<xsl:value-of select="normalize-space(./text())"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$default"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="href">
<xsl:if test="@href"><xsl:value-of select="@href"/></xsl:if>
</xsl:variable>
<xsl:choose>
<xsl:when test="$href != ''">
<a href="{$href}"><xsl:value-of select="$value"/></a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$value"/>
</xsl:otherwise>
</xsl:choose>
<!-- Page elements are to document manifests what file elements are to software manifests, except that we don't enumerate file elements -->
<xsl:if test="page">
<ul class="common-list-data-subitems">
<xsl:for-each select="page">
<li>
<xsl:if test="@href">
<a href="{$href}{@href}"><xsl:value-of select="."/></a>
</xsl:if>
<xsl:if test="not(@href)">
<xsl:value-of select="."/>
</xsl:if>
</li>
</xsl:for-each>
</ul>
</xsl:if>
</li>
</xsl:for-each>
<xsl:if test="not($node)">
<xsl:if test="@href">
<a href="{@href}"><xsl:value-of select="$default"/></a>
</xsl:if>
<xsl:if test="not(@href)">
<xsl:value-of select="$default"/>
</xsl:if>
</xsl:if>
</ul>
</li>
</xsl:if>
</xsl:template>
</xsl:stylesheet>

View file

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- author="Jeff Parsons (@jeffpar)" website="http://www.pcjs.org/" created="2012-05-05" modified="2014-02-23" license="http://www.gnu.org/licenses/gpl.html" -->
<!DOCTYPE xsl:stylesheet [
<!-- XSLT understands these entities only: lt, gt, apos, quot, and amp. Other useful entities are defined below (see entities.dtd). -->
<!ENTITY nbsp "&#160;"> <!ENTITY sect "&#167;"> <!ENTITY copy "&#169;"> <!ENTITY para "&#182;"> <!ENTITY ndash "&#8211;"> <!ENTITY mdash "&#8212;">
<!ENTITY lsquo "&#8216;"> <!ENTITY rsquo "&#8217;"> <!ENTITY ldquo "&#8220;"> <!ENTITY rdquo "&#8221;"> <!ENTITY dagger "&#8224;"> <!ENTITY Dagger "&#8225;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output doctype-system="about:legacy-compat"/>
<xsl:include href="common.xsl"/>
<xsl:include href="document.xsl"/>
<!-- There is no "shared" components.xsl, so we just pick one to eliminate IDE inspection warnings -->
<xsl:include href="../../pcjs-client/templates/components.xsl"/>
<xsl:template match="/outline">
<xsl:variable name="machineClass">
<xsl:choose>
<xsl:when test="machine/@class"><xsl:value-of select="machine/@class"/></xsl:when>
<xsl:otherwise><xsl:value-of select="$MACHINECLASS"/></xsl:otherwise>
</xsl:choose>
</xsl:variable>
<html lang="en">
<head>
<title><xsl:value-of select="title"/><xsl:text> | </xsl:text><xsl:value-of select="$SITEHOST"/></title>
<xsl:call-template name="commonStyles"/>
<xsl:call-template name="documentStyles"/>
<xsl:call-template name="componentStyles"/>
</head>
<body>
<div class="common">
<div class="page justified">
<xsl:apply-templates/>
</div>
</div>
<xsl:call-template name="componentScripts">
<xsl:with-param name="component">
<xsl:choose>
<xsl:when test="debugger"><xsl:value-of select="$machineClass"/>-dbg</xsl:when>
<xsl:otherwise><xsl:value-of select="$machineClass"/></xsl:otherwise>
</xsl:choose>
</xsl:with-param>
</xsl:call-template>
</body>
</html>
</xsl:template>
</xsl:stylesheet>