あなたが提供できる提案に感謝します。XMLドキュメントの一部をリストに変換する作業をしています。私は変換の大部分を機能させています。しかし、私は<emph>
子要素に夢中になっています。「」(引用符)に置き換えたいのですが、置き換え戦略を立てることができませんでした。
乾杯!XML:
<ead>
<archdesc>
<dsc>
<head>Container List</head>
<c01 id="ref1251" level="file">
<did>
<unittitle>#464: Dutch. <emph render="doublequote">I know Mary [Frances <emph
render="doublequote">Dutchess</emph> (Watrous) Roth] packed it some
where!</emph>,</unittitle>
<container id="cid4822615" type="Box" label="Mixed Materials">2</container>
<container parent="cid4822615" type="Folder">110</container>
<unitdate>undated</unitdate>
<physdesc id="ref1252" label="General Physical Description note"
>(Negative)</physdesc>
</did>
</c01>
<c01 id="ref1331" level="file">
<did>
<unittitle>#476: Mountain home near Cosby,</unittitle>
<container id="cid4822586" type="Box" label="Mixed Materials">2</container>
<container parent="cid4822586" type="Folder">139</container>
<unitdate>undated</unitdate>
<physdesc id="ref1332" label="General Physical Description note">(6 of
6)</physdesc>
<physdesc id="ref1333" label="General Physical Description note"
>(Print)</physdesc>
</did>
</c01>
</dsc>
</archdesc>
</ead>
XSLT:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="2.0">
<xsl:output method="text"/>
<xsl:strip-space elements="*"/>
<xsl:template match="/">
<xsl:apply-templates select="ead/archdesc/dsc"/>
</xsl:template>
<xsl:template match="dsc">
<xsl:apply-templates select="c01/did"/>
</xsl:template>
<xsl:template match="did">
<xsl:apply-templates select="unittitle"/>
<xsl:text>	</xsl:text>
<xsl:text>Box: </xsl:text><xsl:apply-templates select="container[1]"/>
<xsl:text>	</xsl:text>
<xsl:text>Folder: </xsl:text><xsl:apply-templates select="container[2]"/>
<xsl:text>	</xsl:text>
<xsl:apply-templates select="unitdate"/>
<xsl:text>	</xsl:text>
<xsl:apply-templates select="physdesc"/>
<xsl:text> </xsl:text>
</xsl:template>