Expand my Community achievements bar.

SOLVED

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

Avatar

Level 4

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

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi,

 

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

 

Thanks,

Tulika

View solution in original post

2 Replies

Avatar

Correct answer by
Employee

Hi,

 

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

 

Thanks,

Tulika