<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.tei-c.org/index.php?action=history&amp;feed=atom&amp;title=NotesToRefs.xsl</id>
	<title>NotesToRefs.xsl - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.tei-c.org/index.php?action=history&amp;feed=atom&amp;title=NotesToRefs.xsl"/>
	<link rel="alternate" type="text/html" href="https://wiki.tei-c.org/index.php?title=NotesToRefs.xsl&amp;action=history"/>
	<updated>2026-04-21T14:21:19Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.32.0</generator>
	<entry>
		<id>https://wiki.tei-c.org/index.php?title=NotesToRefs.xsl&amp;diff=8831&amp;oldid=prev</id>
		<title>Filologanoga: summaries</title>
		<link rel="alternate" type="text/html" href="https://wiki.tei-c.org/index.php?title=NotesToRefs.xsl&amp;diff=8831&amp;oldid=prev"/>
		<updated>2011-02-12T23:21:11Z</updated>

		<summary type="html">&lt;p&gt;summaries&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 23:21, 12 February 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==Summary==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is a stylesheet from the Croatiae auctores Latini TEI XML collection. For publishing under PhiloLogic, the TEI XML should conform to [http://sites.google.com/site/philologic3/encoding PhiloLogic specifications]; this stylesheet reformats  notes in the text, adding (empty) ref elements, creating attributes both for ref and note as required, and moving all note elements to a separate div in the back.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is a stylesheet from the Croatiae auctores Latini TEI XML collection. For publishing under PhiloLogic, the TEI XML should conform to [http://sites.google.com/site/philologic3/encoding PhiloLogic specifications]; this stylesheet reformats  notes in the text, adding (empty) ref elements, creating attributes both for ref and note as required, and moving all note elements to a separate div in the back.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==Required input==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;TEI XML file with note and pb elements (pb is used by PhiloLogic for backlinks).&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== Expected output ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;TEI XML file conforming to PhiloLogic specification.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== Known restrictions ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Resp element is hardwired to auctor; ref type set to &amp;quot;nota&amp;quot;, specific for CroALa.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;  &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l16&quot; &gt;Line 16:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 32:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     &amp;lt;!-- required input: tei xml file, using a CroALa subset (or similar), with notes and pbs (for linking back) --&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     &amp;lt;!-- required input: tei xml file, using a CroALa subset (or similar), with notes and pbs (for linking back) --&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     &amp;lt;!-- expected output: tei xml file according to PhiloLogic specification --&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     &amp;lt;!-- expected output: tei xml file according to PhiloLogic specification --&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     &amp;lt;!-- known restrictions: resp hardwired to auctor; ref type &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;should be changed &lt;/del&gt;to &amp;quot;nota&amp;quot; for CroALa --&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     &amp;lt;!-- known restrictions: resp hardwired to auctor; ref type &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;set &lt;/ins&gt;to &amp;quot;nota&amp;quot; for CroALa --&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     &amp;lt;!-- movingnotes.xsl --&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     &amp;lt;!-- movingnotes.xsl --&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Filologanoga</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.tei-c.org/index.php?title=NotesToRefs.xsl&amp;diff=8830&amp;oldid=prev</id>
		<title>Filologanoga: New page: This is a stylesheet from the Croatiae auctores Latini TEI XML collection. For publishing under PhiloLogic, the TEI XML should conform to [http://sites.google.com/site/philologic3/encoding...</title>
		<link rel="alternate" type="text/html" href="https://wiki.tei-c.org/index.php?title=NotesToRefs.xsl&amp;diff=8830&amp;oldid=prev"/>
		<updated>2011-02-12T23:16:07Z</updated>

		<summary type="html">&lt;p&gt;New page: This is a stylesheet from the Croatiae auctores Latini TEI XML collection. For publishing under PhiloLogic, the TEI XML should conform to [http://sites.google.com/site/philologic3/encoding...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This is a stylesheet from the Croatiae auctores Latini TEI XML collection. For publishing under PhiloLogic, the TEI XML should conform to [http://sites.google.com/site/philologic3/encoding PhiloLogic specifications]; this stylesheet reformats  notes in the text, adding (empty) ref elements, creating attributes both for ref and note as required, and moving all note elements to a separate div in the back.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt; &lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;xsl:stylesheet xmlns:tei=&amp;quot;http://www.tei-c.org/ns/1.0&amp;quot;&lt;br /&gt;
    xmlns:xsl=&amp;quot;http://www.w3.org/1999/XSL/Transform&amp;quot; version=&amp;quot;1.0&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!-- title: ref for notes, moves notes to back div --&amp;gt;&lt;br /&gt;
    &amp;lt;!-- author: Neven Jovanović, Croatiae auctores Latini --&amp;gt;&lt;br /&gt;
    &amp;lt;!-- description: adds ref elements in front of notes elements --&amp;gt;&lt;br /&gt;
    &amp;lt;!-- description: adds xml:id, target and resp attributes to notes --&amp;gt;&lt;br /&gt;
    &amp;lt;!-- description: adds type, xml:id, target and n attributes to refs --&amp;gt;&lt;br /&gt;
    &amp;lt;!-- description: moves notes to a separate div in the back --&amp;gt;&lt;br /&gt;
    &amp;lt;!-- description: makes possible linking from refs to notes and vice versa --&amp;gt;&lt;br /&gt;
    &amp;lt;!-- filename: movingnotes.xsl --&amp;gt;&lt;br /&gt;
    &amp;lt;!-- modified: 2011-02-12 --&amp;gt;&lt;br /&gt;
    &amp;lt;!-- required input: tei xml file, using a CroALa subset (or similar), with notes and pbs (for linking back) --&amp;gt;&lt;br /&gt;
    &amp;lt;!-- expected output: tei xml file according to PhiloLogic specification --&amp;gt;&lt;br /&gt;
    &amp;lt;!-- known restrictions: resp hardwired to auctor; ref type should be changed to &amp;quot;nota&amp;quot; for CroALa --&amp;gt;&lt;br /&gt;
    &amp;lt;!-- movingnotes.xsl --&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
    &amp;lt;!-- copy all... --&amp;gt;&lt;br /&gt;
    &amp;lt;xsl:template match=&amp;quot;@*|node()&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;xsl:copy&amp;gt;&lt;br /&gt;
            &amp;lt;xsl:apply-templates select=&amp;quot;@*|node()&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/xsl:copy&amp;gt;&lt;br /&gt;
    &amp;lt;/xsl:template&amp;gt;&lt;br /&gt;
    &amp;lt;!-- ... but the note elements, for which call the scribrefs template to edit --&amp;gt;&lt;br /&gt;
    &amp;lt;xsl:template match=&amp;quot;//tei:note&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;xsl:call-template name=&amp;quot;scribrefs&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/xsl:template&amp;gt;&lt;br /&gt;
    &amp;lt;!-- test if the last child is named &amp;quot;back&amp;quot; --&amp;gt;&lt;br /&gt;
        &amp;lt;xsl:template match=&amp;quot;//tei:text/*[last()]&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;xsl:choose&amp;gt;&lt;br /&gt;
                &amp;lt;xsl:when test=&amp;quot;tei:back&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;xsl:call-template name=&amp;quot;backref&amp;quot;/&amp;gt;&lt;br /&gt;
                    &lt;br /&gt;
                &amp;lt;/xsl:when&amp;gt;&lt;br /&gt;
                &amp;lt;xsl:otherwise&amp;gt;&lt;br /&gt;
                    &lt;br /&gt;
                    &amp;lt;xsl:copy&amp;gt;&lt;br /&gt;
                        &amp;lt;xsl:apply-templates select=&amp;quot;@*|node()&amp;quot;/&amp;gt;&lt;br /&gt;
                        &amp;lt;!-- create a back element --&amp;gt;&lt;br /&gt;
                        &amp;lt;xsl:element namespace=&amp;quot;http://www.tei-c.org/ns/1.0&amp;quot; name=&amp;quot;back&amp;quot;&amp;gt;&lt;br /&gt;
                            &amp;lt;!-- create a div with a type atrribute = notes --&amp;gt;&lt;br /&gt;
                            &amp;lt;xsl:element name=&amp;quot;div&amp;quot; namespace=&amp;quot;http://www.tei-c.org/ns/1.0&amp;quot;&amp;gt;&lt;br /&gt;
                                &amp;lt;xsl:attribute name=&amp;quot;type&amp;quot;&amp;gt;notes&amp;lt;/xsl:attribute&amp;gt;&lt;br /&gt;
                                &amp;lt;!-- give it a Latin heading  --&amp;gt;&lt;br /&gt;
                                &amp;lt;xsl:element name=&amp;quot;head&amp;quot; namespace=&amp;quot;http://www.tei-c.org/ns/1.0&amp;quot;&amp;gt;&lt;br /&gt;
                                    &amp;lt;xsl:text&amp;gt;Notae&amp;lt;/xsl:text&amp;gt;&lt;br /&gt;
                                &amp;lt;/xsl:element&amp;gt;&lt;br /&gt;
                                &amp;lt;!-- Philologic says a pb element should be here --&amp;gt;&lt;br /&gt;
                                &amp;lt;xsl:element name=&amp;quot;pb&amp;quot; namespace=&amp;quot;http://www.tei-c.org/ns/1.0&amp;quot;&amp;gt;&lt;br /&gt;
                                    &amp;lt;xsl:attribute name=&amp;quot;n&amp;quot;&amp;gt;nts&amp;lt;/xsl:attribute&amp;gt;&lt;br /&gt;
                                &amp;lt;/xsl:element&amp;gt;&lt;br /&gt;
                                &amp;lt;!-- put inside it all notes from the document --&amp;gt;&lt;br /&gt;
                                &amp;lt;xsl:for-each select=&amp;quot;//tei:note&amp;quot;&amp;gt;&lt;br /&gt;
                                    &amp;lt;xsl:call-template name=&amp;quot;scribnot&amp;quot;/&amp;gt;&lt;br /&gt;
                                &amp;lt;/xsl:for-each&amp;gt;&lt;br /&gt;
                            &amp;lt;/xsl:element&amp;gt;&lt;br /&gt;
                        &amp;lt;/xsl:element&amp;gt;&lt;br /&gt;
                    &amp;lt;/xsl:copy&amp;gt;&lt;br /&gt;
                &amp;lt;/xsl:otherwise&amp;gt;&lt;br /&gt;
            &amp;lt;/xsl:choose&amp;gt;&lt;br /&gt;
        &amp;lt;/xsl:template&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
    &lt;br /&gt;
&amp;lt;xsl:template name=&amp;quot;scribrefs&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;!--  which we replace with empty refs, citing carefully the TEI namespace --&amp;gt;&lt;br /&gt;
    &amp;lt;xsl:element name=&amp;quot;ref&amp;quot; namespace=&amp;quot;http://www.tei-c.org/ns/1.0&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;!-- structure: typed as notae (Latin), have ids (beginning with ref),  --&amp;gt;&lt;br /&gt;
        &amp;lt;!--  have targets (beginning with n); --&amp;gt;&lt;br /&gt;
        &amp;lt;!--  notes will have ids and targets the other way around --&amp;gt;&lt;br /&gt;
        &amp;lt;!-- the attributes should really have xml:id; --&amp;gt;&lt;br /&gt;
        &amp;lt;!-- have to check if this agrees with the philosubs.pl of PhiloLogic.  --&amp;gt;&lt;br /&gt;
        &amp;lt;xsl:attribute name=&amp;quot;type&amp;quot;&amp;gt;nota&amp;lt;/xsl:attribute&amp;gt;&lt;br /&gt;
        &amp;lt;xsl:attribute name=&amp;quot;xml:id&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;!-- ids begin with ref --&amp;gt;&lt;br /&gt;
            &amp;lt;xsl:text&amp;gt;r&amp;lt;/xsl:text&amp;gt;&lt;br /&gt;
            &amp;lt;!-- Here we generate an identifier --&amp;gt;&lt;br /&gt;
            &amp;lt;!-- &amp;quot;if you call generate-id() more than once in one run with the same &lt;br /&gt;
                node as an argument, the processor generates the same ID value each &lt;br /&gt;
                time for that node.&amp;quot; DuCharme, XML Quickly, p. 244-245. --&amp;gt;&lt;br /&gt;
            &amp;lt;!-- Without this feature it would be tough connecting refs with their respective notes.  --&amp;gt;&lt;br /&gt;
            &amp;lt;xsl:value-of select=&amp;quot;generate-id(.)&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/xsl:attribute&amp;gt;&lt;br /&gt;
        &amp;lt;xsl:attribute name=&amp;quot;target&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;xsl:text&amp;gt;n&amp;lt;/xsl:text&amp;gt;&lt;br /&gt;
            &amp;lt;xsl:value-of select=&amp;quot;generate-id(.)&amp;quot;/&amp;gt;&lt;br /&gt;
        &amp;lt;/xsl:attribute&amp;gt;&lt;br /&gt;
        &amp;lt;xsl:attribute name=&amp;quot;n&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;xsl:number/&amp;gt;&lt;br /&gt;
        &amp;lt;/xsl:attribute&amp;gt;&lt;br /&gt;
    &amp;lt;/xsl:element&amp;gt;&lt;br /&gt;
&amp;lt;/xsl:template&amp;gt;&lt;br /&gt;
&amp;lt;xsl:template name=&amp;quot;backref&amp;quot; match=&amp;quot;//tei:back&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;xsl:copy&amp;gt;&lt;br /&gt;
        &amp;lt;xsl:apply-templates select=&amp;quot;@*|node()&amp;quot;/&amp;gt;&lt;br /&gt;
        &lt;br /&gt;
        &lt;br /&gt;
        &amp;lt;!-- we introduce a new div, typed as notes --&amp;gt;&lt;br /&gt;
        &amp;lt;xsl:element name=&amp;quot;div&amp;quot; namespace=&amp;quot;http://www.tei-c.org/ns/1.0&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;xsl:attribute name=&amp;quot;type&amp;quot;&amp;gt;notes&amp;lt;/xsl:attribute&amp;gt;&lt;br /&gt;
            &amp;lt;!-- with a Latin heading  --&amp;gt;&lt;br /&gt;
            &amp;lt;xsl:element name=&amp;quot;head&amp;quot; namespace=&amp;quot;http://www.tei-c.org/ns/1.0&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;xsl:text&amp;gt;Notae&amp;lt;/xsl:text&amp;gt;&lt;br /&gt;
            &amp;lt;/xsl:element&amp;gt;&lt;br /&gt;
            &amp;lt;!-- inside it go all notes from the document --&amp;gt;&lt;br /&gt;
            &amp;lt;xsl:for-each select=&amp;quot;//tei:note&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;xsl:call-template name=&amp;quot;scribnot&amp;quot;/&amp;gt;&lt;br /&gt;
            &amp;lt;/xsl:for-each&amp;gt;&lt;br /&gt;
        &amp;lt;/xsl:element&amp;gt;&lt;br /&gt;
    &amp;lt;/xsl:copy&amp;gt;&lt;br /&gt;
&amp;lt;/xsl:template&amp;gt;&lt;br /&gt;
    &amp;lt;xsl:template name=&amp;quot;scribnot&amp;quot;&amp;gt;&lt;br /&gt;
        &amp;lt;xsl:copy&amp;gt;&lt;br /&gt;
            &amp;lt;!-- their id begins with n, their targets with ref --&amp;gt;&lt;br /&gt;
            &amp;lt;!--  (vice versa compared to refs inside text) --&amp;gt;&lt;br /&gt;
            &amp;lt;xsl:attribute name=&amp;quot;place&amp;quot;&amp;gt;foot&amp;lt;/xsl:attribute&amp;gt;&lt;br /&gt;
            &amp;lt;!-- otherwise, almost the same as with ref elements (except notes are not empty) --&amp;gt;&lt;br /&gt;
            &amp;lt;xsl:attribute name=&amp;quot;xml:id&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;xsl:text&amp;gt;n&amp;lt;/xsl:text&amp;gt;&lt;br /&gt;
                &amp;lt;xsl:value-of select=&amp;quot;generate-id(.)&amp;quot;/&amp;gt;&lt;br /&gt;
            &amp;lt;/xsl:attribute&amp;gt;&lt;br /&gt;
            &amp;lt;xsl:attribute name=&amp;quot;target&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;xsl:text&amp;gt;r&amp;lt;/xsl:text&amp;gt;&lt;br /&gt;
                &amp;lt;xsl:value-of select=&amp;quot;generate-id(.)&amp;quot;/&amp;gt;&lt;br /&gt;
            &amp;lt;/xsl:attribute&amp;gt;&lt;br /&gt;
            &amp;lt;!-- after we select and copy everything enclosed in note, --&amp;gt;&lt;br /&gt;
            &amp;lt;xsl:apply-templates select=&amp;quot;@*|node()&amp;quot;/&amp;gt;&lt;br /&gt;
            &amp;lt;!-- add a carriage return, for tidiness --&amp;gt;&lt;br /&gt;
        &amp;lt;/xsl:copy&amp;gt;&amp;lt;xsl:text&amp;gt;&lt;br /&gt;
        &amp;lt;/xsl:text&amp;gt;&lt;br /&gt;
    &amp;lt;/xsl:template&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
&amp;lt;/xsl:stylesheet&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:XSLT]]&lt;/div&gt;</summary>
		<author><name>Filologanoga</name></author>
		
	</entry>
</feed>