<?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=Talk%3AMilestoneXSLT</id>
	<title>Talk:MilestoneXSLT - 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=Talk%3AMilestoneXSLT"/>
	<link rel="alternate" type="text/html" href="https://wiki.tei-c.org/index.php?title=Talk:MilestoneXSLT&amp;action=history"/>
	<updated>2026-04-21T19:10:49Z</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=Talk:MilestoneXSLT&amp;diff=16201&amp;oldid=prev</id>
		<title>Martin de la Iglesia: /* Script 2: suggestions for improvement */ code optimisation</title>
		<link rel="alternate" type="text/html" href="https://wiki.tei-c.org/index.php?title=Talk:MilestoneXSLT&amp;diff=16201&amp;oldid=prev"/>
		<updated>2018-04-19T09:22:18Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Script 2: suggestions for improvement: &lt;/span&gt; code optimisation&lt;/span&gt;&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 09:22, 19 April 2018&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-l8&quot; &gt;Line 8:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 8:&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;#Just a minor point, but I think the line &amp;lt;code&amp;gt;&amp;lt;xsl:variable name=&amp;quot;cur-p&amp;quot; select=&amp;quot;generate-id(.)&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt; is unnecessary, because this variable isn't used anywhere. I assume it's a relict from the XSLT 1.0 version.&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;#Just a minor point, but I think the line &amp;lt;code&amp;gt;&amp;lt;xsl:variable name=&amp;quot;cur-p&amp;quot; select=&amp;quot;generate-id(.)&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt; is unnecessary, because this variable isn't used anywhere. I assume it's a relict from the XSLT 1.0 version.&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;#The line &amp;lt;code&amp;gt;&amp;lt;xsl:sequence select=&amp;quot;current()/ancestor::p[1]/lb/@*&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt; doesn't seem entirely correct; more precisely, it only works for the particular example input provided, but not when there are multiple lb elements, in which case only the attribute value of the last lb is applied to each lb element.&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;#The line &amp;lt;code&amp;gt;&amp;lt;xsl:sequence select=&amp;quot;current()/ancestor::p[1]/lb/@*&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt; doesn't seem entirely correct; more precisely, it only works for the particular example input provided, but not when there are multiple lb elements, in which case only the attribute value of the last lb is applied to each lb element.&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;#Instead, in order to copy the attributes, I suggest to add &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;xsl:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;for&lt;/del&gt;-&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;each &lt;/del&gt;select=&amp;quot;@*&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;quot;&amp;gt;&amp;lt;xsl:copy-of select=&amp;quot;.&lt;/del&gt;&amp;quot;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt;&amp;lt;/xsl:for-each&lt;/del&gt;&amp;gt;&amp;lt;/source&amp;gt; after each of the tags inserted in step2 (p, lb, del), e.g. &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;p xmlns=&amp;quot;http://www.tei-c.org/ns/1.0&amp;quot;&amp;gt;&amp;lt;xsl:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;for&lt;/del&gt;-&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;each &lt;/del&gt;select=&amp;quot;@*&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;quot;&amp;gt;&amp;lt;xsl:copy-of select=&amp;quot;.&lt;/del&gt;&amp;quot;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;gt;&amp;lt;/xsl:for-each&lt;/del&gt;&amp;gt;&amp;lt;/source&amp;gt; etc. Note, however, that this might add unwanted default attributes to the output - see https://listserv.brown.edu/archives/cgi-bin/wa?A2=TEI-L;42710be0.1404 for solutions to this problem.&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;#Instead, in order to copy the attributes, I suggest to add &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;xsl:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;copy&lt;/ins&gt;-&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;of &lt;/ins&gt;select=&amp;quot;@*&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt; after each of the tags inserted in step2 (p, lb, del), e.g. &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;p xmlns=&amp;quot;http://www.tei-c.org/ns/1.0&amp;quot;&amp;gt;&amp;lt;xsl:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;copy&lt;/ins&gt;-&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;of &lt;/ins&gt;select=&amp;quot;@*&amp;quot;/&amp;gt;&amp;lt;/source&amp;gt; etc. Note, however, that this might add unwanted default attributes to the output - see https://listserv.brown.edu/archives/cgi-bin/wa?A2=TEI-L;42710be0.1404 for solutions to this problem.&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;--[[User:Martin de la Iglesia|Martin de la Iglesia]] 12:23, 18 April 2018 (CEST)&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;--[[User:Martin de la Iglesia|Martin de la Iglesia]] 12:23, 18 April 2018 (CEST)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Martin de la Iglesia</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.tei-c.org/index.php?title=Talk:MilestoneXSLT&amp;diff=16196&amp;oldid=prev</id>
		<title>Martin de la Iglesia: /* Script 2: suggestions for improvement */ new section</title>
		<link rel="alternate" type="text/html" href="https://wiki.tei-c.org/index.php?title=Talk:MilestoneXSLT&amp;diff=16196&amp;oldid=prev"/>
		<updated>2018-04-18T10:23:07Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Script 2: suggestions for improvement: &lt;/span&gt; new section&lt;/span&gt;&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 10:23, 18 April 2018&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-l2&quot; &gt;Line 2:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 2:&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;I found these pieces of code highly useful, but (despite having worked with XSLT before) it took me very long to understand how they actually work, i.e. what some of the expressions actually do. Maybe future readers would benefit from some comments added to the code.&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;I found these pieces of code highly useful, but (despite having worked with XSLT before) it took me very long to understand how they actually work, i.e. what some of the expressions actually do. Maybe future readers would benefit from some comments added to the code.&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;--[[User:Martin de la Iglesia|Martin de la Iglesia]] 05:57, 6 August 2012 (EDT)&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;--[[User:Martin de la Iglesia|Martin de la Iglesia]] 05:57, 6 August 2012 (EDT)&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;== Script 2: suggestions for improvement ==&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;regarding the 2nd of the XSLT 2.0 stylesheets:&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;#Just a minor point, but I think the line &amp;lt;code&amp;gt;&amp;lt;xsl:variable name=&amp;quot;cur-p&amp;quot; select=&amp;quot;generate-id(.)&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt; is unnecessary, because this variable isn't used anywhere. I assume it's a relict from the XSLT 1.0 version.&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;#The line &amp;lt;code&amp;gt;&amp;lt;xsl:sequence select=&amp;quot;current()/ancestor::p[1]/lb/@*&amp;quot;/&amp;gt;&amp;lt;/code&amp;gt; doesn't seem entirely correct; more precisely, it only works for the particular example input provided, but not when there are multiple lb elements, in which case only the attribute value of the last lb is applied to each lb element.&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;#Instead, in order to copy the attributes, I suggest to add &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;xsl:for-each select=&amp;quot;@*&amp;quot;&amp;gt;&amp;lt;xsl:copy-of select=&amp;quot;.&amp;quot;/&amp;gt;&amp;lt;/xsl:for-each&amp;gt;&amp;lt;/source&amp;gt; after each of the tags inserted in step2 (p, lb, del), e.g. &amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&amp;lt;p xmlns=&amp;quot;http://www.tei-c.org/ns/1.0&amp;quot;&amp;gt;&amp;lt;xsl:for-each select=&amp;quot;@*&amp;quot;&amp;gt;&amp;lt;xsl:copy-of select=&amp;quot;.&amp;quot;/&amp;gt;&amp;lt;/xsl:for-each&amp;gt;&amp;lt;/source&amp;gt; etc. Note, however, that this might add unwanted default attributes to the output - see https://listserv.brown.edu/archives/cgi-bin/wa?A2=TEI-L;42710be0.1404 for solutions to this problem.&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;--[[User:Martin de la Iglesia|Martin de la Iglesia]] 12:23, 18 April 2018 (CEST)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Martin de la Iglesia</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.tei-c.org/index.php?title=Talk:MilestoneXSLT&amp;diff=11167&amp;oldid=prev</id>
		<title>Martin de la Iglesia: Created page with &quot;== More comments, please == I found these pieces of code highly useful, but (despite having worked with XSLT before) it took me very long to understand how they actually work, i....&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.tei-c.org/index.php?title=Talk:MilestoneXSLT&amp;diff=11167&amp;oldid=prev"/>
		<updated>2012-08-06T09:57:49Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== More comments, please == I found these pieces of code highly useful, but (despite having worked with XSLT before) it took me very long to understand how they actually work, i....&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== More comments, please ==&lt;br /&gt;
I found these pieces of code highly useful, but (despite having worked with XSLT before) it took me very long to understand how they actually work, i.e. what some of the expressions actually do. Maybe future readers would benefit from some comments added to the code.&lt;br /&gt;
--[[User:Martin de la Iglesia|Martin de la Iglesia]] 05:57, 6 August 2012 (EDT)&lt;/div&gt;</summary>
		<author><name>Martin de la Iglesia</name></author>
		
	</entry>
</feed>