openSUSE / suse-xsl

DocBook XSL Stylesheets for SUSE branding
Other
11 stars 10 forks source link

Corrected handling of dateModified & datePublished #624

Closed tomschr closed 6 months ago

tomschr commented 6 months ago

Fix DOCTEAM#1367

This PR contains the following changes:


In simple words, the stylesheet follows this approach:

  1. Retrieve the possible date elements from <revhistory>.
  2. Sanitize different formats into the consistent ISO format YYYY-MM-DDTHH:MMZ
  3. Validate the dates
  4. Compare the dates so it follows datePublished < dateModified
  5. If this is all correct, create the respective JSON-LD structure. If there are invalid dates, skip it.