Skip to content

always use media-type-package if provided #33

Description

@lueck

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions