Glud documentation
Help to the GLU record fields
Version: 1.06 - 8th, June 1998
NAME
%DataType.Revconv (or %<) - Reverse data type conversion
SYNOPSIS
%DataType.Revconv data_type_identifier [: resolver_treatement ]
DESCRIPTION
Specify an manner to convert a value in a data type
in another data type.
This field is used by reverse conversion.
The GLU has the capability to convert the query parameters
if their data types aren't the data types required
by the action. For example, a GLU tag can specify an identifier
of an astronomical object instead of their coordinates. And if it
exists a way of conversion from the data type "identifier" to the
data type "coordinates", the GLU applies this conversion way
and inserts the result in the generating anchor.
To specify a data type conversion, use this field in the following
manner :
- the fist word is the SOURCE data type ; the target data type
is the record data type itself.
- after the delimiter ":", the end of field specify the conversion
(or resolver) treatement.
The resolver treatement is specified by a set of functions working
as filters (pipe method - see examples)
The reserved parameter $1 will be replaced by the original value.
of the parameter
The GLU has the following internal functions:
.GetHttp(Url): HTTP call
.GluFilter(string with glu tags): Internal glu resolution
.Regex(pattern[,rewrite string]): Pattern matching by regular expr
.Echo(string): basic display
.Trim(string): Squeeze blanks before and after the parameter
.Astropos(syst_in,fmt_in,syst_out,fmt_out,coord): coordinate conversion
if the last parameter is missing, the std input of the function
is taken into account for it.
EXAMPLES
%DataType.Revconv smbmgr'I : GetHttp("http://simbad/sim-id.pl?Ident=$1")\n | Trim
%DataType.Revconv J2000 : Astropos("B1950","%Coo","J2000","%Coo",$1)
%DataType.Revconv 'Prenom : GluFilter("<&StarHeads,rb $1>")\n | Regex("^[^ ]+ +([^ ]+)","\1")
%DataType.Revconv CDS'bibmgr'R