Skip to content

[BUG] OAI-PMH does not work with custom stylesheet #1481

Open

Description

@stweil

Description

A custom transformation stylesheet can be configured, but is not entered correctly into the OAI-PMH answer. Therefore it is not found and an error is shown: "Fehler beim Laden des Stylesheets: Das Parsen eines XSLT-Stylesheets ist fehlgeschlagen."

Here is the generated XML code:

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="https://HOSTNAME/"?>
<OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd">
  <responseDate>2025-02-07T21:29:33Z</responseDate>
[...]

Reproduction

Steps to reproduce the behaviour:

  1. Configure a TYPO3 page for OAI-PMH.
  2. Select a custom stylesheet in the configuration "Transformation Stylesheet".
  3. Open OAI-PMH URL in web browser.
  4. See error.

Expected Behavior

The custom stylesheet should be used by providing the correct URL in the XML output.

Environment

  • Latest main branch with TYPO3 v12 on Debian GNU Linux stable

Activity

  1. stweil commented on Feb 7, 2025

    @stweil
    MemberAuthor

    The default stylesheet does not display dc:description while the latest stylesheet for EPrints supports it. Therefore I wanted to configure this newer stylesheet.

  2. stweil commented on Feb 7, 2025

    @stweil
    MemberAuthor

    Another reason for an updated stylesheet are some issues with the HTML output of the current one (reported by W3C validator):

    • Warning: Consider adding a lang attribute to the html start tag to declare the language of this document.
    • Error: Start tag seen without seeing a doctype first. Expected <!DOCTYPE html>.
    • Error: Element li not allowed as child of element body in this context. (Suppressing further errors from this subtree.)
    • Warning: The name attribute is obsolete. Consider putting an id attribute on the nearest container instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ☇ bugA non-security related bug.

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions