So this is the template snipped that works well:

            <@ldpath path="^ont:requestedEntity">
                    <li class="LoggedRequest">
                        Date: <@ldpath path="dc:date"/><br/>
                        Agent: <@ldpath path="ont:userAgent"/>
                    </li>
            </@ldpath>

The only issue with the above is, that the list isn't sorted.

This was my first attempt sorting things by date:

            <@ldpath path="^ont:requestedEntity">
                <@ldpath path="fn:sort(dc:date)">
                    <li class="LoggedRequest">
                        Date: <@ldpath path="dc:date"/><br/>
                        Agent: <@ldpath path="ont:userAgent"/>
                    </li>
                </@ldpath>
            </@ldpath>

Unfortunately this created the list items but the actual values where
missing.

I figured this was because the sort would expand the path to the literal
value

            <@ldpath path="^ont:requestedEntity">
                <@ldpath path="fn:sort(dc:date)">
                    <li class="LoggedRequest">
                        Date: <@ldpath path="."/><br/>
                        Agent: <@ldpath path="^dc:date/ont:userAgent"/>
                    </li>
                </@ldpath>
            </@ldpath>

With that it shows the value for the date but not for the agent.

My questions:
- How to sort the resource correcty by the dc:date property?
- How do I set the order?
- Given that the values are xsd:date literals, will  this sort them
correctly in (reverse) chronological order?

Cheers,
Reto

Reply via email to