Post Reply 
Display Format Tagging Syntax
18-05-2015, 15:17
Post: #2
RE: Display Format Tagging Syntax
(18-05-2015 13:52)pzyvbv Wrote:  Hi

I've got very confused about the tagging syntax used for format strings. I have read and re-read both the guide and some of the posts on the forum, but it didn't really help.... Sad

In the guide it says:
tag-name.displayFormat={format-string}
where the format-string is a sequence of one or more format items, and a format item is:
$tag-list^prefix^suffix^separator
and each format item includes a tag list....

Later on as an example it gives: Title.displayFormat={$title^$date^ [^]}
This I assume is a format string with a single format item that has a tag list containing 2 tags...?

This string has two format items:
$title^
$date^ [^]

The $ in $date terminates the first format item and applies default values for the omitted suffix and separator. It is equivalent to:

$title^^^, $date^ [^]

Quote:Is this the same as: Title.displayFormat={$title^^^$date^ [^]^}
Again a format string but containing two format items, each with a tag list containing only a single tag?

This string explicitly specifies null strings for the separators, overriding the default value of comma+space.

Quote:When a second tag is referenced is the next caret (^) found associated with the last tag?

Carets are associated with format items, not with tags. Each format item can contain one or more tags. Each caret is associated with the format item that is currently being processed when the caret was encountered.

Quote:And then once three ^'s have been processed for a tag any subsequent ones are associated with the previous tag, i.e. the processing is recursive and is always trying to close off the last tag?

The processing is linear, not recursive. Any $ following a ^ ends the current format item and starts the next format item. If there are more than three ^ characters in a format item, the extra ones are treated as literal characters in the separator string.

Quote:So in the above example is the [ a prefix for $date rather than a suffix for $title?

Yes, it is.

Quote:Hope this makes sense!!
Chris

Thanks for asking! I have added some more explanation to the User guide section in an attempt to clarify this parsing for other users.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Display Format Tagging Syntax - simoncn - 18-05-2015 15:17

Forum Jump:


User(s) browsing this thread: 1 Guest(s)