Skip to content
This repository was archived by the owner on Aug 17, 2020. It is now read-only.
This repository was archived by the owner on Aug 17, 2020. It is now read-only.

XPATH expression to filter out correct UTC Timestamp from node date (if value exists) #14

@hwidmann

Description

@hwidmann

What I want :
Convert node date to UTC timestamp 👍

  • if date is empty don't map any thing (tries with if (//dc:date[1]/[text()]), but doesn't work)
  • elif it's already in UTC format (e.g. 2007-01-12T11:09:59Z ) let it as it is (don't know how to do ?)
  • elif it contains '-' take part before and attach '-07-01T11:59:59Z' (implemented and working)
    (better would be : elif first 4 characters are of year format YYYY, take it and append ...
  • else : just take it as it is (but maybe better let it out, because datepicker works only with UTC format ...

All in all : convert date/text() to UTC format and , if not possible, let it empty (= no mapping)

Current implemetation in oai_dc.xml is like :

if (//dc:date[1]/[text()]) then ( if(contains(//dc:date[1]/text(), '-')) then concat(substring-before(//dc:date[1]/text(), '-'),'-07-01T11:59:59Z') else concat(//dc:date[1]/text(),'-07-01T11:59:59Z') )

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions