- <xslt:if test="self::*">
- <xslt:attribute name="书社:cksum">
- <xslt:value-of select="$书社:about//*[@rdf:about=$identifier]/nfo:hasHash[@nfo:hashAlgorithm='CRC32']/@nfo:hashValue"/>
- </xslt:attribute>
- <xslt:attribute name="书社:identifier">
- <xslt:value-of select="$identifier"/>
- </xslt:attribute>
- <xslt:attribute name="书社:mtime">
- <xslt:value-of select="$书社:about//*[@rdf:about=$identifier]/nfo:fileLastModified"/>
- </xslt:attribute>
- </xslt:if>
- <xslt:choose>
- <xslt:when test="self::html:*">
- <xslt:attribute name="itemscope">itemscope</xslt:attribute>
- <xslt:attribute name="itemtype">
- <xslt:text>
- <text>&书社;:document</text>
- </xslt:text>
- <xslt:for-each select="exslstr:tokenize(@itemtype)/token">
- <xslt:text>
- <text> </text>
- </xslt:text>
- <xslt:value-of select="."/>
- </xslt:for-each>
- </xslt:attribute>
- <xslt:apply-templates select="@*[not(namespace-uri()='' and (local-name()='itemscope' or local-name()='itemtype') or namespace-uri()='&书社;' and (local-name()='cksum' or local-name()='identifier' or local-name()='mtime'))]|node()" mode="书社:expand"/>
- </xslt:when>
- <xslt:otherwise>
- <xslt:apply-templates select="@*[not(namespace-uri()='&书社;' and (local-name()='cksum' or local-name()='identifier' or local-name()='mtime'))]|node()" mode="书社:expand"/>
- </xslt:otherwise>
- </xslt:choose>
- </xslt:copy>
- </xslt:template>
- <xslt:template match="@*|node()[not(self::书社:link) or not(@xlink:show='embed')]" mode="书社:expand" priority="-1">
- <xslt:copy>
- <xslt:apply-templates select="@*|node()" mode="书社:expand"/>