Previous: , Up: Symbol Types   [Contents][Index]


C.2.3 Program Metadata Symbols

A basic key-value system allows for compiling static metadata into the program. These metadata can be referenced externally without having to run the program.

match: preproc:symtable on lv:meta

Produce a meta symbol for each lv:meta/lv:prop with the following attributes:

name

The metavalue name as provided by lv:prop/@name, prefixed with ‘:meta:’ to avoid conflicts with other symbols.

desc

Generic description including name.

keep

Always ‘true’.

The name prefix enforces separation between the two compilation stages by preventing conflicts.

<template mode="preproc:symtable"  priority="5"  match="lv:meta">
  <for-each select="lv:prop">
    <preproc:sym type="meta"  name=":meta:{@name}"  desc="Metavalue {@name}"  pollute="true"  no-deps="true" />
  </for-each>
</template>