Formal metadata: information and software
option resulting action -------------------------------------------------------- -l code use language indicated by code (en,es,id,fr) -c cfile obtain configuration information from cfile -e efile direct syntax errors to efile -t tfile create text output in tfile -h hfile create html output in hfile -f ffile create FAQ-style html in ffile -s sfile create sgml output in sfile -d dfile create DIF output in dfileThe name of the input file that contains formal metadata is given on the command line but is not preceded by a switch. The input file name must not begin with a hyphen.
mp -c config.dat foo -e foo.err -t foo.txt -h foo.html -f foo.faq.html -s foo.sgml -d foo.difThis command causes mp to read options from the file config.dat and metadata from the file foo. Errors are directed to the file foo.err, and output is directed to the following files:
foo.txt ASCII, using the input format foo.html Hypertext Markup Language foo.faq.html FAQ-style Hypertext Markup Language foo.sgml Standard Generalized Markup Language foo.xml Extensible Markup Language foo.dif Directory Interchange FormatNames of output files may be omitted if the corresponding information is included in the configuration file, which is described in section 3 below.
Citation Identification_Information Data_Set_G-Polygon_Outer_G-Ring Range_of_Dates/Timesvalue := A text string associated with an element by the originator of the metadata.
Citation_Information: Originator: Publication_Date: Publication_Time: Title: Type_of_Map: Serial_Information: Serial_Name: Issue_Identification: Publication_Information: Publication_Place: Publisher: Other_Citation_Details: Online_Linkage: Larger_Work_Citation:3. Configuration file format
local: name <element name> sgml <tag name> parent <element name> child <element name>Compound types:
local = name + (sgml) + 1{parent}n + 1{child}nScalar types:
Biological Data Profile FGDC-STD-001.1-1999 Shoreline Data Profile FGDC-STD-001.2-2001 Remote-sensing Extensions FGDC-STD-012-2002In addition the following extension is included by default:
Extension_Information: Extended_Element_Name: Metadata_Language Short_Name: metalang Parent: Metadata_Reference_InformationLocal extensions to the standard are permitted and a mechanism is provided that allows these extensions to be described to the compiler.
ALBERSCEA AZIMUTHAL EQUIDISTC EQUIRECT GENERALVNP GNOMONIC LAMBERTAZ LAMBERTCC MERCATOR MILLER MODSALASKA OBMERCATOR ORTHO POLYCONIC PSTEREO ROBINSON SINUSOIDAL SPOBLMERC STEREO TM VANDERGExcised sgml tags from sgml.c; transferred the eight- character tags to a new file called ps8.c. Choice of tags to use in generating SGML output is governed by a local variable called do_astm in sgml.c; currently this is always set to 1, causing the astm tags to be used.
A: B: C: D:Here the parser assumes that D is a member of A, not of B. But the user might have intended D to be a member of B. The parser cannot tell, so it issues a warning.
void deallocate_item (struct item *p); struct item *insert_item_after (struct item *r); struct item *insert_item_before (struct item *q); struct item *add_child (struct item *p);and added comments explaining these functions.
tempkeyt -> tempkt accscons -> accconst accsinst -> accinstr columns -> colcount vertcnt -> vrtcountRebuilt makedtd and rebuilt ps8.dtd.
output html element name prefix <html code> suffix <html code> value prefix <html code> suffix <html code>This allows specific html code to precede and follow both the element name and the element value. Created a new file called deluxe.cfg in doc that shows how this new syntax can be used to link every element name back to the correct section of my hypertext rendition of the standard.
output errors %s.err html file %s.htmland process the input file "stuff.txt", the errors will be put into a file called "stuff.err" and the html output will be put into a file called "stuff.html". The file option can be specified for html, sgml, xml, text, and dif output, and has the same effect in each case.
.txt .sgml .sgm .xml .text .met .bin
output text wrap 72in the config file causes all text in the text output file to be wrapped in paragraphs so that it fits in the first 72 characters of the page. This all assumes 2-space indentation in the text output, which is the default. I also had to modify mp.c to call write_text() last among the output formats so as not to muck up any of the other formats. (2.4.34)
output html # this is a comment; note that it is indented less than the # element immediately above it. file %s.html faq %.faq.htmlThen the "file" and "faq" elements will now be properly recognized as children of the "html" element. I think it used to consider them children of the comment, and thus were silently ignored. I bumped all minor version numbers by one for this fix. (2.4.40)
read_config <config_file> parse_text <input_file> find_first <element_name> find_in <address> <element_name> find_next <address> <element_name> value_of <address> forgetfind_first returns the address of an element in hex. This should not be modified, but should only be used as input to find_in, find_next, and value_of. forget causes the entire metadata record to be removed from memory, so you can read another record. (mq 1.0.0)
read_config config_fileThis command reads a standard config file, which will apply to all metadata read in this Tcl session. You can read only one config file, and you have to do it before you read any metadata.
metadata m -parse input_fileHere m is a Tcl variable name. On output it is given a unique value that allows mq to keep track of it. This command returns 1 if the parsing was successful, 0 otherwise.
$m find_first element_nameHere m is a Tcl variable previously passed to the metadata command above, and element_name is a standard or extended element name. This command returns the address of a matching element in hex, or zero. Use the address in subsequent commands.
$m find_in address element_nameHere address is the value returned from the find_first subcommand above or a similar subcommand below. If the given address is an element whose name matches the target element_name, the same address is returned. Otherwise it returns the address of the first child, grandchild, or more distant descendant node whose name matches the target element_name.
$m value_of ?-nonewline? addressIf the address given matches a data element, this returns its value as a string. If you specify -nonewline, then it comes as one line, with each line separated by a single blank space. Otherwise each line is separated by the newline character (ASCII 10).
$m contains addressThis returns 1 if the address corresponds to one of the elements in the tree, 0 otherwise.
$m name addressThis returns the name of the element at the given address.
$m next address $m prev address $m parent address $m child addressThese subcommands return the address of the next, previous, parent, or child node in the tree, relative to the given address. Zero is returned if there is no corresponding element. These provide a way to walk through the tree manually.
$m forgetThis frees all of the memory used for a metadata record. I cannot recommend using the Tcl command unset; it seems to take a long time to complete.
config read config_filereads the named config file, returns 1 if successful, 0 if not
config find_first optionreturns the address of the named option in the config tree. This is something you use in other config commands.
config find_next address ?option?returns the address of the next option after the one whose address is given as the address argument. If no option name is specified, it looks for an option with the same name as the one whose address is given.
config find_in address optionreturns the address of the first option of the given name that is within the subtree headed by the node at the address given.
config value_of addressreturns the value of the option at the address given.
value_set <address> <text>This assigns the given text to the element at the address given if that element can contain a value. An error is reported if the address is that of a compound element.
insert ?-before | -after | -child? <address> ?<element>?An element of the specified type is added to the tree before, after, or as a child of the element whose address is specified. If no placement is specified (that is, neither -before, nor -after, nor -child is given), the element is added as a child of the node whose address is specified. This function does NOT check to see whether the element so inserted is permitted to be there by the FGDC metadata standard.
delete <address>The element at the specified address is removed from the tree and cannot be recovered.
copy <address>A copy of the element at the specified address is made and its address is returned as the result of this operation. The copy has no links upward, forward, or back, and can thus be attached to any other metadata record using the paste function.
paste ?-before | after | -child? <address> <subtree>The subtree given as the final argument is attached to the current metadata record before, after, or as the last child of the element at the address given. This works only if the address argument is a compound element in the tree.
write ?-format text | sgml | xml? <filename>The metadata record is written out to the disk file whose name is specified as the final argument. If no format is specified using "-format <format>", then the format is text unless the output file ends with ".sgml" or ".sgm" or ".xml" in which cases the file will be written as SGML or XML.
is_compound <address>This function returns 1 if the element at the address given is a compound element, and 0 if the element is not compound. (mq 2.3.1)
input language esReplace es with id for Indonesian; en would be for English, but if the value is unrecognized or missing the software will use English element names.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<http://www.w3.org/TR/html4/loose.dtd>">Thanks to Florence Wong (USGS) for pointing out the need to make some fixes in the code to achieve better conformance. (mp 2.8.5)
Luis Cavalcanti Bahiana Pesquisador em Informações Geográficas IBGE- Coordenação de Geografia Av. República do Chile 500-12 andar Brazil(mp 2.9.7) (cns 2.8.4) (xtme 2.7.18) (tkme 2.9.23) (mq 2.6.22) (err2html 2.1.9)