如果您正在运行 XMLUI,您可以覆盖 ds:body 的模板。请参阅下面的xsl:otherwise块。
<xsl:template match="dri:body">
<div id="ds-body">
<xsl:if test="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='alert'][@qualifier='message']">
<div id="ds-system-wide-alert">
<p>
<xsl:copy-of select="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='alert'][@qualifier='message']/node()"/>
</p>
</div>
</xsl:if>
<!-- Check for the custom pages -->
<xsl:choose>
<xsl:when test="starts-with($request-uri, 'page/about')">
<div>
<h1>About This Repository</h1>
<p>To add your own content to this page, edit webapps/xmlui/themes/dri2xhtml/structural.xsl and
add your own content to the title, trail, and body. If you wish to add additional pages, you
will need to create an additional xsl:when block and match the request-uri to whatever page
you are adding. Currently, static pages created through altering XSL are only available
under the URI prefix of page/.</p>
</div>
</xsl:when>
<!-- Otherwise use default handling of body -->
<xsl:otherwise>
<xsl:apply-templates select="*[@n='item-related-container']"/>
<xsl:apply-templates select="*[not(@n='item-related-container')]"/>
</xsl:otherwise>
</xsl:choose>
<xsl:copy-of select="$SFXLink"/>
</div>
</xsl:template>