Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
stweil opened this issue Feb 7, 2025 · 2 comments
Open

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

stweil opened this issue Feb 7, 2025 · 2 comments
Labels
🐛 bug A non-security related bug.

Comments

@stweil
Copy link
Member

stweil commented Feb 7, 2025

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
@stweil
Copy link
Member Author

stweil commented Feb 7, 2025

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

@stweil
Copy link
Member Author

stweil commented Feb 7, 2025

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.

@sebastian-meyer sebastian-meyer added the 🐛 bug A non-security related bug. label Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug A non-security related bug.
Projects
None yet
Development

No branches or pull requests

2 participants