I should have included my stylesheet so far. (flaws3.xml is the second file)
Sorry:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs"
version="2.0">
<xsl:include href="copy-indent.xsl"/>
<xsl:variable name="flawlist" select="document('../work/flaws3.xml')"/>
<xsl:template match="Stamp">
<Stamp>
<xsl:copy-of select="@*"/>
<xsl:copy-of select="child::*"/>
</Stamp>
</xsl:template>
</xsl:stylesheet>
On 12/17/2016 8:19 AM, Mark Wilson mark(_at_)knihtisk(_dot_)org wrote:
I want to select elements from the second file to add to the first
file when their @pofis-number match (in this instance 2966 has a
match, 2967 does not.
Any help appreciated.
Mark
-----
File to Merge to (simplified: the element <Stamp> is much further from
the root)
<List>
.....
<Stamp>
<CatNumbers scott-number="2816" pofis-number="2966"/>
<Value kc-value="3"/>
<Inscriptions czech="ČS. skauting, 1911-1991"
eng="Czechoslovak Scouting, 1911-1991"/>
<Inscriptions czech="A. B. Svojsík, 1876-1938" eng="*"/>
<Location denomination="-6"/>
</Stamp>
<Stamp>
<CatNumbers scott-number="2815" pofis-number="2967"/>
<Value kc-value="1"/>
<Inscriptions czech="Mistrovství evropy v judo, Praha 1991"
eng="European Judo Championships, Prague 1991"/>
<Location denomination="-6"/>
</Stamp>
.....
</List>
-------
File to merge from:
<List>
<Flaws pofis-number="2966">
<Known plate="2" position="37" file-name="2966-DV37-2.jpg"/>
<Known plate="2" position="38" file-name="2966-DV38-2.jpg"/>
<Unknown number="1" file-name="2966-mn1.jpg"/>
</Flaws>
</List>
------
Merged file:
<List>
<Stamp>
<CatNumbers scott-number="2816" pofis-number="2966"/>
<Value kc-value="3"/>
<Inscriptions czech="ČS. skauting, 1911-1991"
eng="Czechoslovak Scouting, 1911-1991"/>
<Inscriptions czech="A. B. Svojsík, 1876-1938" eng="*"/>
<Location denomination="-6"/>
<Known plate="2" position="37" file-name="2966-DV37-2.jpg"/>
<Known plate="2" position="38" file-name="2966-DV38-2.jpg"/>
<Unknown number="1" file-name="2966-mn1.jpg"/>
</Stamp>
<Stamp>
<CatNumbers scott-number="2815" pofis-number="2967"/>
<Value kc-value="1"/>
<Inscriptions czech="Mistrovství evropy v judo, Praha 1991"
eng="European Judo Championships, Prague 1991"/>
<Location denomination="-6"/>
</Stamp>
</List>
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--