MI-DPLA / combine

Combine /kämˌbīn/ - Metadata Aggregator Platform
MIT License
26 stars 11 forks source link

pyjxslt cannot handle XSL stylesheets with imports #161

Closed ghukill closed 6 years ago

ghukill commented 6 years ago

Perhaps alternate XSLT transformation approaches will obviate this.

ghukill commented 6 years ago

This would apply to pyjxslt or a C++ call to Saxon wrapped:

Before transformation scenario is run, read through XSLT, download stylesheets and cache locally, rewriting the imports to be local imports.

ghukill commented 6 years ago

Another alternative: allow users to upload supporting XSLT stylesheets that would be deposited in /home/combine/data/combine/transformations/.

Then, rewrite includes as local to match this location, e.g.:

 <xsl:include href="/home/combine/data/combine/transformations/dcmiType.xsl"/>
    <xsl:include href="/home/combine/data/combine/transformations/mimeType.xsl"/>
    <xsl:include href="/home/combine/data/combine/transformations/csdgm.xsl"/>
    <xsl:include href="/home/combine/data/combine/transformations/forms.xsl"/>
    <xsl:include href="/home/combine/data/combine/transformations/iso3166-1.xsl"/>
    <xsl:include href="/home/combine/data/combine/transformations/iso639-2.xsl"/>

Will also need to update documentation about transformations about this...

ghukill commented 6 years ago

Local includes can be handled by creating a new Transformation Scenario, then rewriting main transform to use those local filesystem filepaths.

For HTTP imports, consder downloading and rewriting? would be prohibitively slow otherwise, unless pyjxslt handles this (which it might, but it still can't see "outside")

ghukill commented 6 years ago

Closing.