netfrag.org > TWiki > MetaDataDefinition (r1.1 vs. r1.7)
TWiki . { Home? | Welcome | Register | Changes | Index | Search | Go }

 <<O>>  Difference Topic MetaDataDefinition (r1.7 - 07 Sep 2001 - MikeMannix?)
Line: 1 3 to 1 3
Changed:
<
<

TWiki Meta Data

What is Meta Data in TWiki?

What, indeed!

Defining Meta Data Variables

See Meta Data Rendering for variables used to display meta data.

Current version: 1.0

Syntax

  • Format is as for [[TWikiDocumentation#TWiki_Variables, except all fields have a key.
    • %META:<type>{key1="value1" [key2="value2" [...]]}%
  • Order of fields within the meta variables is not defined, except that if there is a field with key name, this appears first for easier searching (note the order of the variables themselves is defined)
  • Each meta variable is on one line
  • '\n' is represented in values by %_N_ and '"' by %_Q_%

Example of Format
%<nop>META:TOPICINFO{version="1.6" date="976762663" author="PeterThoeny" format="1.0"}%
   text of the topic
%<nop>META:TOPICMOVED{from="Codev.OldName" to="CoDev.NewName"
   by="JohnTalintyre" date="976762680"}%
%<nop>META:TOPICPARENT{name="NavigationByTopicContext"}%
%<nop>META:FILEATTACHMENT{name="Sample.txt" version="1.3" ... }%
%<nop>META:FILEATTACHMENT{name="Smile.gif" version="1.1" ... }%
%<nop>META:FORM{name="WebFormTemplate"}%
%<nop>META:FIELD{name="OperatingSystem" value="OsWin"}%
%<nop>META:FIELD{name="TopicClassification" value="PublicFAQ"}%

Specifications

TOPICINFO

Key Comment
version Same as RCS version
date integer, unx time, seconds since start 1970
author last to change topic, is the REMOTE_USER
format Format of this topic, will be used for automatic format conversion

TOPICMOVED

This is optional, exists if topic has ever been moved. If a topic is moved more than once, only the most recent TOPICMOVED meta variable exists in the topic, older ones are to be found in the rcs history.

%META:TOPICMOVED{from="Codev.OldName" to="CoDev.NewName" by="talintj" date="976762680"}%

Key Comment up
by Who did it, is the REMOTE_USER, not WikiName
date integer, unx time, seconds since start 1970
from Full name i.e. web.topic
to Full name i.e. web.topic

Notes:

  • at present version number is not supported directly, it can be inferred from the RCS history.
  • there is only one META:TOPICMOVED in a topic, older move information can be found in the RCS history.

TOPICPARENT

Key Comment
name The topic from which this was created, WebHome if done from Go, othewise topic where ? or form used. Normally just topic, but is full web.topic format if parent is in a different Web. Renaming a Web will then only break a few of these references or they can be scanned and fixed.

FILEATTACHMENT

Key Comment
name Name of file, no path. Must be unique within topic
version Same as RCS revision
path Full path file was loaded from
size In bytes
date integer, unx time, seconds since start 1970
user the REMOTE_USER, not WikiName
comment As supplied when file uploaded
attr h if hidden, optional

Extra field that are added if an attachment is moved:

movedfrom full topic name - web.topic
movedby the REMOTE_USER, not WikiName
movedto full topic name - web.topic
moveddate integer, unx time, seconds since start 1970

FORM

Key Comment
name A topic name - the topic is a Form Template. Can optionally include the web name i.e. web.topic, but doesn't normally

FIELD

Should only be present if there is a FORM entry. Note that this data is used when viewing a topic, the form template definition is not read.

Key Name
name Ties to entry in Form Template, is title with all bar alphanumerics and . removed
title Full text from Form Template
value Value user has supplied via form

Recommended Sequence

There no absolute need for meta data variables to be in a specific order, however, it does for the following reasons:

  • Keep (form) fields in the order they are defined
  • Allow diff command to give output in a logically sensible order

These could be done in other ways, but this adds complexity

  • Order fields - definition could be read on each rendering (expensive)
  • Diff - render data before doing diff, has something to offer, but not likely to be available for next TWiki release

So the order is:

  • TOPICINFO
  • text of topic
  • TOPICMOVED - optional
  • TOPICPARENT - optional
  • FILEATTACHMENT - 0 or more entries
  • FORM - optional
  • FIELD - 0 or more entries (FORM required)

Viewing Meta Data in Page Source

When viewing a topic the Raw Text link can be clicked to show the text of a topic (ie: as seen when editing). This is done by adding raw=on to URL. raw=debug shows the meta data as well as the topic data, ex: debug view for this topic

Future Support for Plugins

There is currently no support for meta data for Plugins. However, the format is readily extendable and the Meta.pm code that supports the format needs only minor alteration.

Rendering Meta Data

Various types of meta data can be stored in topics. The data is rendered using the %META% variable. This is mostly used in the view, preview and edit scripts.

Current support is fairly basic:

Variable usage: Comment:
%META{"form"}% Show form data, see Form Templates
%META{"attachments"}% Show attachments, exclude hidden
options for attachments:
all="on" Show ALL attachments (including hidden)
%META{"moved"}% Details of any topic moves
%META{"parent [options]"}% Show topic parent
options for parent:
dontrecurse="on" By default recurses up tree, at some cost
prefix="..." Prefix for parents, only if there are parents; default ""
suffix="..." Suffix, only appears if there are parents; default ""
seperator="..." Separator between parents, default is " > "

  • Future Development: There are numerous development directions and specific features to consider. A couple of obvious possibilities:
    • Rendering to formats other than tables: bullet lists, formatted body text;
    • Specifying templates to be used for rendering.

-- JohnTalintyre - 29 Aug 2001

>
>

Merged into TWikiMetaData - this topic to be rolled back.


 <<O>>  Difference Topic MetaDataDefinition (r1.6 - 07 Sep 2001 - MikeMannix?)
Line: 1 6 to 1 6
Changed:
<
<

TWiki Meta Data

>
>

TWiki Meta Data

Line: 8 to 8
Changed:
<
<

What is Meta Data in TWiki?

>
>

What is Meta Data in TWiki?

Line: 18 to 18
Changed:
<
<

Syntax

>
>

Syntax

Line: 42 to 42
Changed:
<
<

Specifications

>
>

Specifications

Line: 44 to 44
Changed:
<
<
TOPICINFO
>
>

TOPICINFO

Line: 52 to 52
Changed:
<
<
TOPICMOVED
>
>

TOPICMOVED

Line: 68 to 68
Changed:
<
<
TOPICPARENT
>
>

TOPICPARENT

Line: 73 to 73
Changed:
<
<
FILEATTACHMENT
>
>

FILEATTACHMENT

Line: 92 to 92
Changed:
<
<
FORM
>
>

FORM

Line: 97 to 97
Changed:
<
<
FIELD
>
>

FIELD

Line: 106 to 106
Changed:
<
<

Recommended Sequence

>
>

Recommended Sequence

Line: 125 to 125
Changed:
<
<

Viewing Meta Data in Page Source

>
>

Viewing Meta Data in Page Source

Line: 129 to 129
Changed:
<
<

Future Support for Plugins

>
>

Future Support for Plugins

Line: 134 to 134
Changed:
<
<

Rendering Meta Data

>
>

Rendering Meta Data


 <<O>>  Difference Topic MetaDataDefinition (r1.5 - 31 Aug 2001 - MikeMannix?)
Line: 1 8 to 1 8
Changed:
<
<

Meta Data Definition

>
>

What is Meta Data in TWiki?

What, indeed!

Defining Meta Data Variables

Line: 14 to 18
Changed:
<
<

Example of format

>
>

Syntax

Line: 15 to 20
Added:
>
>
  • Format is as for [[TWikiDocumentation#TWiki_Variables, except all fields have a key.
    • %META:<type>{key1="value1" [key2="value2" [...]]}%
  • Order of fields within the meta variables is not defined, except that if there is a field with key name, this appears first for easier searching (note the order of the variables themselves is defined)
  • Each meta variable is on one line
  • '\n' is represented in values by %_N_ and '"' by %_Q_%

Example of Format
Line: 19 to 31
Changed:
<
<
%META:TOPICMOVED{from="Codev.OldName" to="CoDev.NewName" by="JohnTalintyre" date="976762680"}%
>
>
%META:TOPICMOVED{from="Codev.OldName" to="CoDev.NewName" by="JohnTalintyre" date="976762680"}%
Line: 26 to 40
Added:
>
>
Line: 28 to 42
Changed:
<
<

General notes

  • Format is as for [[TWikiDocumentation#TWiki_Variables, except all fields have a key.
    • %META:<type>{key1="value1" [key2="value2" [...]]}%
  • Order of fields within the meta variables is not defined, except that if there is a field with key name, this appears first for easier searching (note the order of the variables themselves is defined)
  • Each meta variable is on one line
  • '\n' is represented in values by %_N_ and '"' by %_Q_%

Logical order

There no absolute need for meta data to be in a specific order, however, it does for the following reasons:

  • Keep (form) fields in the order they are defined
  • Allow diff command to give output in a logically sensible order

These could be done in other ways, but this adds complexity

  • Order fields - definition could be read on each rendering (expensive)
  • Diff - render data before doing diff, has something to offer, but not likely to be available for next TWiki release

So the order is:

  • TOPICINFO
  • text of topic
  • TOPICMOVED - optional
  • TOPICPARENT - optional
  • FILEATTACHMENT - 0 or more entries
  • FORM - optional
  • FIELD - 0 or more entries (FORM required)

Specification

>
>

Specifications

Line: 119 to 106
Changed:
<
<

Viewing meta data

>
>

Recommended Sequence

There no absolute need for meta data variables to be in a specific order, however, it does for the following reasons:

  • Keep (form) fields in the order they are defined
  • Allow diff command to give output in a logically sensible order

These could be done in other ways, but this adds complexity

  • Order fields - definition could be read on each rendering (expensive)
  • Diff - render data before doing diff, has something to offer, but not likely to be available for next TWiki release

So the order is:

  • TOPICINFO
  • text of topic
  • TOPICMOVED - optional
  • TOPICPARENT - optional
  • FILEATTACHMENT - 0 or more entries
  • FORM - optional
  • FIELD - 0 or more entries (FORM required)

Viewing Meta Data in Page Source

Line: 123 to 129
Changed:
<
<

Future Plugins support

>
>

Future Support for Plugins

Line: 128 to 134
Changed:
<
<

Meta Data Rendering

>
>

Rendering Meta Data

Line: 130 to 136
Changed:
<
<
Various meta data can be stored in topics. The data is rendered using the %META% variable. This is mostly used in the view, preview and edit scripts.
>
>
Various types of meta data can be stored in topics. The data is rendered using the %META% variable. This is mostly used in the view, preview and edit scripts.
Line: 147 to 153
Changed:
<
<
  • Possible future additions:
    • Rendering of form data to alternate formats, ex: bullet lists
    • Specify a template to be used for rendering
>
>
  • Future Development: There are numerous development directions and specific features to consider. A couple of obvious possibilities:
    • Rendering to formats other than tables: bullet lists, formatted body text;
    • Specifying templates to be used for rendering.

 <<O>>  Difference Topic MetaDataDefinition (r1.4 - 30 Aug 2001 - MikeMannix?)
Line: 1 5 to 1 5
Changed:
<
<

Meta Data Definition

>
>

TWiki Meta Data

Line: 7 to 8
Changed:
<
<
See Meta Data Rendering for variables used to display meta data.
>
>

Meta Data Definition

See Meta Data Rendering for variables used to display meta data.

Line: 11 to 14
Changed:
<
<

Example of format

>
>

Example of format

Line: 25 to 28
Changed:
<
<

General notes

>
>

General notes

Line: 33 to 36
Changed:
<
<

Logical order

>
>

Logical order

Line: 52 to 55
Changed:
<
<

Specification

>
>

Specification

Line: 54 to 57
Changed:
<
<

TOPICINFO

>
>
TOPICINFO
Line: 62 to 65
Changed:
<
<

TOPICMOVED

>
>
TOPICMOVED
Line: 78 to 81
Changed:
<
<

TOPICPARENT

>
>
TOPICPARENT
Line: 83 to 86
Changed:
<
<

FILEATTACHMENT

>
>
FILEATTACHMENT
Line: 102 to 105
Changed:
<
<

FORM

>
>
FORM
Line: 107 to 110
Changed:
<
<

FIELD

>
>
FIELD
Line: 116 to 119
Changed:
<
<

Viewing meta data

>
>

Viewing meta data

When viewing a topic the Raw Text link can be clicked to show the text of a topic (ie: as seen when editing). This is done by adding raw=on to URL. raw=debug shows the meta data as well as the topic data, ex: debug view for this topic

Future Plugins support

There is currently no support for meta data for Plugins. However, the format is readily extendable and the Meta.pm code that supports the format needs only minor alteration.

Meta Data Rendering

Line: 118 to 130
Changed:
<
<
When viewing a topic the Raw Text link can be clicked to show the text of a topic (i.e. as is seen when editing). This is done by adding raw=on to URL. raw=debug shows the meta data as well as the topic data e.g. for this topic
>
>
Various meta data can be stored in topics. The data is rendered using the %META% variable. This is mostly used in the view, preview and edit scripts.
Line: 120 to 132
Changed:
<
<

Other

>
>
Current support is fairly basic:
Line: 122 to 134
Changed:
<
<
There is currently no support for meta data for Plugins. However, the format is readily extendable and the Meta.pm code that supports the format only needs minor alteration.
>
>
Variable usage: Comment:
%META{"form"}% Show form data, see Form Templates
%META{"attachments"}% Show attachments, exclude hidden
options for attachments:
all="on" Show ALL attachments (including hidden)
%META{"moved"}% Details of any topic moves
%META{"parent [options]"}% Show topic parent
options for parent:
dontrecurse="on" By default recurses up tree, at some cost
prefix="..." Prefix for parents, only if there are parents; default ""
suffix="..." Suffix, only appears if there are parents; default ""
seperator="..." Separator between parents, default is " > "
Line: 124 to 147
Changed:
<
<

Meta Data Rendering

Various meta data can be stored in topics - MetaDataDefinition

This is rendered using the %META% variable. This is mostly used in the view, preview and edit scripts.

At present support is fairly basic:

Variable usage: Comment:
%META{"form"}% Show form data, see Form Templates
%META{"attachments"}% Show attachments, excluding hidden ones
options for attachments:
all="on" Show all attachments i.e. including hidden ones
%META{"moved"}% Details of any topic moves
%META{"parent [options]"}% Show topic parent
options for parent:
dontrecurse="on" By default recurses up tree, this has some cost
prefix="..." Prefix that goes before parents, but only if there are parents, default ""
suffix="..." Suffix, only appears if there are parents, default ""
seperator="..." Seperator between parents, default is " > "

Possible future additions:

  • Rendering of form data to alternate formats e.g. bullet lists
  • Specify a template to be used for rendering
>
>
  • Possible future additions:
    • Rendering of form data to alternate formats, ex: bullet lists
    • Specify a template to be used for rendering
Line: 126 to 151
Changed:
<
<
-- JohnTalintyre - 16 Aug 2001
>
>
-- JohnTalintyre - 29 Aug 2001

 <<O>>  Difference Topic MetaDataDefinition (r1.3 - 30 Aug 2001 - MikeMannix?)
Line: 1 122 to 1 123
Added:
>
>

Meta Data Rendering

Various meta data can be stored in topics - MetaDataDefinition

This is rendered using the %META% variable. This is mostly used in the view, preview and edit scripts.

At present support is fairly basic:

Variable usage: Comment:
%META{"form"}% Show form data, see Form Templates
%META{"attachments"}% Show attachments, excluding hidden ones
options for attachments:
all="on" Show all attachments i.e. including hidden ones
%META{"moved"}% Details of any topic moves
%META{"parent [options]"}% Show topic parent
options for parent:
dontrecurse="on" By default recurses up tree, this has some cost
prefix="..." Prefix that goes before parents, but only if there are parents, default ""
suffix="..." Suffix, only appears if there are parents, default ""
seperator="..." Seperator between parents, default is " > "

Possible future additions:

  • Rendering of form data to alternate formats e.g. bullet lists
  • Specify a template to be used for rendering

 <<O>>  Difference Topic MetaDataDefinition (r1.2 - 29 Aug 2001 - JohnTalintyre?)
Line: 1 2 to 1 3
Added:
>
>
TOC: No TOC in "TWiki.MetaDataDefinition"
Line: 5 to 7
Changed:
<
<
See MetaDataRendering for display of meta data
>
>
See Meta Data Rendering for variables used to display meta data.
Line: 9 to 10
Deleted:
<
<
Table of contents: TOC: No TOC in "TWiki.MetaDataDefinition"
Line: 14 to 13
Changed:
<
<


>
>

Line: 24 to 23
Changed:
<
<
>
>
Line: 28 to 27
Changed:
<
<
>
>
  • Format is as for [[TWikiDocumentation#TWiki_Variables, except all fields have a key.
Line: 106 to 105
Changed:
<
<
name A topic name - the topic is a TWikiFormTemplate?. Can optionally include the web name i.e. web.topic, but doesn't normally
>
>
name A topic name - the topic is a Form Template. Can optionally include the web name i.e. web.topic, but doesn't normally
Line: 113 to 112
Changed:
<
<
name Ties to entry in TWikiFormTemplate?, is title with all bar alphanumerics and . removed
title Full text from TWikiFormTemplate?
>
>
name Ties to entry in Form Template, is title with all bar alphanumerics and . removed
title Full text from Form Template
Line: 125 to 124
Changed:
<
<
-- JohnTalintyre? - 16 Aug 2001
>
>
-- JohnTalintyre - 16 Aug 2001

 <<O>>  Difference Topic MetaDataDefinition (r1.1 - 16 Aug 2001 - JohnTalintyre?)
Line: 1 to 1
Added:
>
>
META TOPICPARENT WebHome

Meta Data Definition

See MetaDataRendering for display of meta data

Current version: 1.0

Table of contents:

Example of format

%META:TOPICINFO{version="1.6" date="976762663" author="PeterThoeny" format="1.0"}%
   text of the topic
%META:TOPICMOVED{from="Codev.OldName" to="CoDev.NewName" by="JohnTalintyre" date="976762680"}%
%META:TOPICPARENT{name="NavigationByTopicContext"}%
%META:FILEATTACHMENT{name="Sample.txt" version="1.3" ... }%
%META:FILEATTACHMENT{name="Smile.gif" version="1.1" ... }%
%META:FORM{name="WebFormTemplate"}%
%META:FIELD{name="OperatingSystem" value="OsWin"}%
%META:FIELD{name="TopicClassification" value="PublicFAQ"}%

General notes

  • Format is as for TWikiVariables, except all fields have a key.
    • %META:<type>{key1="value1" [key2="value2" [...]]}%
  • Order of fields within the meta variables is not defined, except that if there is a field with key name, this appears first for easier searching (note the order of the variables themselves is defined)
  • Each meta variable is on one line
  • '\n' is represented in values by %_N_ and '"' by %_Q_%

Logical order

There no absolute need for meta data to be in a specific order, however, it does for the following reasons:

  • Keep (form) fields in the order they are defined
  • Allow diff command to give output in a logically sensible order

These could be done in other ways, but this adds complexity

  • Order fields - definition could be read on each rendering (expensive)
  • Diff - render data before doing diff, has something to offer, but not likely to be available for next TWiki release

So the order is:

  • TOPICINFO
  • text of topic
  • TOPICMOVED - optional
  • TOPICPARENT - optional
  • FILEATTACHMENT - 0 or more entries
  • FORM - optional
  • FIELD - 0 or more entries (FORM required)

Specification

TOPICINFO

Key Comment
version Same as RCS version
date integer, unx time, seconds since start 1970
author last to change topic, is the REMOTE_USER
format Format of this topic, will be used for automatic format conversion

TOPICMOVED

This is optional, exists if topic has ever been moved. If a topic is moved more than once, only the most recent TOPICMOVED meta variable exists in the topic, older ones are to be found in the rcs history.

%META:TOPICMOVED{from="Codev.OldName" to="CoDev.NewName" by="talintj" date="976762680"}%

Key Comment
from Full name i.e. web.topic
to Full name i.e. web.topic
by Who did it, is the REMOTE_USER, not WikiName
date integer, unx time, seconds since start 1970

Notes:

  • at present version number is not supported directly, it can be inferred from the RCS history.
  • there is only one META:TOPICMOVED in a topic, older move information can be found in the RCS history.

TOPICPARENT

Key Comment
name The topic from which this was created, WebHome if done from Go, othewise topic where ? or form used. Normally just topic, but is full web.topic format if parent is in a different Web. Renaming a Web will then only break a few of these references or they can be scanned and fixed.

FILEATTACHMENT

Key Comment
name Name of file, no path. Must be unique within topic
version Same as RCS revision
path Full path file was loaded from
size In bytes
date integer, unx time, seconds since start 1970
user the REMOTE_USER, not WikiName
comment As supplied when file uploaded
attr h if hidden, optional

Extra field that are added if an attachment is moved:

movedfrom full topic name - web.topic
movedby the REMOTE_USER, not WikiName
movedto full topic name - web.topic
moveddate integer, unx time, seconds since start 1970

FORM

Key Comment
name A topic name - the topic is a TWikiFormTemplate?. Can optionally include the web name i.e. web.topic, but doesn't normally

FIELD

Should only be present if there is a FORM entry. Note that this data is used when viewing a topic, the form template definition is not read.

Key Name
name Ties to entry in TWikiFormTemplate?, is title with all bar alphanumerics and . removed
title Full text from TWikiFormTemplate?
value Value user has supplied via form

Viewing meta data

When viewing a topic the Raw Text link can be clicked to show the text of a topic (i.e. as is seen when editing). This is done by adding raw=on to URL. raw=debug shows the meta data as well as the topic data e.g. for this topic

Other

There is currently no support for meta data for Plugins. However, the format is readily extendable and the Meta.pm code that supports the format only needs minor alteration.

-- JohnTalintyre? - 16 Aug 2001


Topic MetaDataDefinition . { View | Diffs | r1.7 | > | r1.6 | > | r1.5 | More }    output as: { }
Revision r1.1 - 16 Aug 2001 - 17:09 - JohnTalintyre?
Revision r1.7 - 07 Sep 2001 - 12:43 - MikeMannix?