Skip to main content
Level 4
Jun 26, 2024 7:35 PM UTC
Solved

How can I call the last metadata tag in AEM Native PDF

Hi there!

 

I'm using the following code to reference the most modified date from a map:

data-subtype="//critdates/revised/@modified"

If the map has more than one revised tag, how can I amend this to call the last revised tag present in critdates?

 

Thanks in advance!

Josh

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
t_a12Accepted solution
Adobe Employee
Jul 8, 2024 4:02 PM UTC

Hi,

 

In order to use last revised tag present in critdates, the xpath can be updated to (//critdates/revised/@modified)[last()].

 

Thanks,

Tulika

2 replies

t_a12Adobe EmployeeAccepted solution
Adobe Employee
Jul 8, 2024 4:02 PM UTC

Hi,

 

In order to use last revised tag present in critdates, the xpath can be updated to (//critdates/revised/@modified)[last()].

 

Thanks,

Tulika

Translate
Level 4
Jul 8, 2024 4:40 PM UTC

Perfect! Thank you!!

Translate