« HS-CMS documentation home

Tags table

Columns

Column: id

Tag ID, unique and automatically created

Column: match_as

Used internally for comparing typed-in tags to existing tags. Tags should be all lowercase, but otherwise as would be displayed on the page.

Column: link_as

Follows the guidelines in the rel-tag microformat, meaning tags use + for spaces and irregular/Unicode characters are formatted per RFC 3986 section 2.1 (percent-encoding).

Because most tagspace URL implementations are lowercase, or at least do not penalize users for entering tags in lowercase (even if the tag should be capitalized, e.g. "Intel", "XML"), this field should be in lowercase (except, ideally, for percent-encoded octects).

This does make the assumption that "apple" and "Apple" are the same tag. This is somewhat limiting but is the de facto standard on the Web and is less confusing for users.

In PHP-like pseudocode, this field can be generated from tags as such:

$link_as = percent_encode_special_chars(lowercase($tag_as_displayed));

Column: display_as

Simply how the tag should be displayed. Unicode, no special encodings... if the tag is "<abbr>" than this field should say "<abbr>". HS-CMS or rendering engines need to convert the special characters properly (in this case, to "&<abbr&>" for HTML/XHTML pages).

Interaction with other tables

Interaction with pages

The pages table is mapped to this one via tags_pages.