メタデータ スキーマを持たない xml ドキュメントで次の式を使用して、「pbcoreRightsSummary」タグを「notes」に正常に変更できました。
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml"/>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="pbcoreRightsSummary">
<notes>
<xsl:apply-templates select="node()|@*"/>
</notes>
</xsl:template>
</xsl:stylesheet>
しかし、これらの仕様を持つドキュメントに適用すると:
xmlns="http://www.pbcore.org/PBCore/PBCoreNamespace.html"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.pbcore.org/PBCore/PBCoreNamespace.html
http://pbcore.org/xsd/pbcore-2.0.xsd"
私は何も得ません。お知らせ下さい?
UPDATE:
そこで、以下に示すように、名前空間を XSLT に追加しました。
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns="http://www.pbcore.org/PBCore/PBCoreNamespace.html"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.pbcore.org/PBCore/PBCoreNamespace.html http://pbcore.org/xsd/pbcore-2.0.xsd">
<xsl:output method="xml"/>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="pbcoreRightsSummary">
<notes>
<xsl:copy-of select="node()|@*"/>
</notes>
</xsl:template>
</xsl:stylesheet>
しかし、私はまだこのドキュメントを変更できないようです (私は Oxygen XML Editor 14.0 を使用しています):
<?xml version="1.0" encoding="utf-8"?>
<pbcoreCollection xmlns="http://www.pbcore.org/PBCore/PBCoreNamespace.html"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.pbcore.org/PBCore/PBCoreNamespace.html http://pbcore.org/xsd/pbcore-2.0.xsd">
<pbcoreDescriptionDocument>
<pbcoreAssetType>Media Object</pbcoreAssetType>
<pbcoreAssetDate dateType="Created">1970</pbcoreAssetDate>
<pbcoreIdentifier source="CAVPP" annotation="Object Identifier">000028</pbcoreIdentifier>
<pbcoreTitle titleType="Main">Case for Population Control</pbcoreTitle>
<pbcoreTitle titleType="Series"/>
<pbcoreDescription/>
<pbcoreRightsSummary>
<rightsSummary annotation="Copyright Statement">Digital recordings from this collection may be accessed freely. </rightsSummary>
</pbcoreRightsSummary>
</pbcoreDescriptionDocument>
</pbcoreCollection>