When a media-type-package is provided to the document.xsl stylesheet, this media-type-package should always be responsible for the output after cutting out the requested parts of the resource.
Currently, the media-type-package is only used, if a mediaType is requested and if it is not among the media types document.xsl can return. However, user may want to customize the output even when a whole TEI document is requested.
Current responsible template in document.xsl:
<xsl:template mode="document" match="document-node(element(TEI))" use-when="$media-type-package">
<xsl:choose>
<xsl:when test="not($mediaType) or ($mediaType and $mediaType = $default-media-types)">
<xsl:call-template name="document"/>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="transform"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
The branching should be dropped in favor of a simple call of transform. Users then have to care of adding a root element and a <dts:wrapper> if required.
The other dts parameters should also be passed to the media type processors.
When a
media-type-packageis provided to thedocument.xslstylesheet, this media-type-package should always be responsible for the output after cutting out the requested parts of the resource.Currently, the
media-type-packageis only used, if amediaTypeis requested and if it is not among the media typesdocument.xslcan return. However, user may want to customize the output even when a whole TEI document is requested.Current responsible template in
document.xsl:The branching should be dropped in favor of a simple call of
transform. Users then have to care of adding a root element and a<dts:wrapper>if required.The other dts parameters should also be passed to the media type processors.