[pmwiki-users] Re: ?action=dc (Dublin Core Metadata)
Patrick R. Michaud
pmichaud at pobox.com
Thu Dec 1 17:56:15 CST 2005
On Thu, Dec 01, 2005 at 10:46:29PM +0100, chr at home.se wrote:
> I suspect I'm going to want some metadata related to when a page was last
> modified, so that pmwiki-mode for emacs can check if the page has changed.
>
> Right now the closest this is the 'date' property, right? It might be very
> convenient if there was some property like:
>
> last-modified:230002020
Just use the <dc:date> property directly. It'll contain the last
modified value in ISO 8601 format:
<dc:date>2005-12-01T17:52Z</dc:date>
and this can be easily compared against any other <dc:date> value
to determine if the page has changed.
> Speaking of parse... can I rely on lines[*] not being broken, or does
> pmwiki-mode actually have to parse the whole XML-stuff?
I think it's relatively safe to assume for this that simple elements
like <dc:date> won't be broken across lines.
I'm still also amenable to providing a custom HTTP header with
?action=source that can contain the date and time.
> [*] Strictly speaking, it'd be enough if I knew only the relevant line
> wasn't broken.
As a regular expression, I would just search the output for
/<dc:date>(.*?)<\/dc:date>/
and not worry about newlines. (But perhaps it's not easy to do
regexps in the environment you're in.)
Pm
More information about the pmwiki-users
mailing list