<namespace-alias stylesheet-prefix="xslt" result-prefix="#default"/>
<param name="METADATA" select="'about:blank'"/>
<template match="/">
+ <variable name="ids">
+ <for-each select="//catalog:uri[@name]">
+ <书社:id>
+ <value-of select="@name"/>
+ </书社:id>
+ </for-each>
+ </variable>
+ <variable name="unique-ids">
+ <for-each select="exsl:node-set($ids)/*">
+ <if test="not(preceding-sibling::*[string(.)=string(current())])">
+ <copy-of select="."/>
+ </if>
+ </for-each>
+ </variable>
<xslt:transform exclude-result-prefixes="nie nfo" extension-element-prefixes="exsl exslstr" version="1.0">
<xslt:param name="BUILDTIME" select="'1972-12-31T00:00:00Z'"/>
<xslt:param name="IDENTIFIER" select="false()"/>
</xslt:variable>
<for-each select="//catalog:uri">
<xslt:include href="{@uri}">
- <if test="contains(@name, ':')">
- <attribute name="书社:id">
- <value-of select="@name"/>
- </attribute>
- </if>
+ <attribute name="书社:id">
+ <value-of select="@name"/>
+ </attribute>
</xslt:include>
</for-each>
<xslt:template name="书社:apply-attributes">
<xslt:param name="nodes" select="/.."/>
<xslt:variable name="modalinput-fragment">
<xslt:copy-of select="$nodes"/>
- <xslt:copy-of select="document('')/xslt:transform/xslt:include"/>
+ <apply-templates select="exsl:node-set($unique-ids)" mode="书社:literally"/>
</xslt:variable>
<xslt:variable name="modalinput" select="exsl:node-set($modalinput-fragment)"/>
<xslt:variable name="metadata-fragment">