man XTM::AsTMa::Converter () - # use like this use XTM::AsTMa::Converter; my CW$buffer = ''; use IO::String; my CW$output = IO::String->new ($buffer); my CW$writer = new XML::Writer(OUTPUT => CW$output, NAMESPACES => 1, FORCED_NS_DECLS => [ CW$XTM::Namespaces::xlink_ns, CW$XTM::Namespaces::topicmap_ns ], DATA_MODE => CW$format ? 1 : 0, DATA_INDENT => 2, PREFIX_MAP => {$XTM::Namespaces::xlink_ns => 'xlink', CW$XTM::Namespaces::topicmap_ns => '' }); eval { my CW$fo = new XTM::AsTMa::Converter ($writer); CW$atmcode =~ s/\r//g; CW$fo->handle_astma (text => CW$atmcode, log_level => CW$log_level, auto_complete => CW$auto_complete); CW$xtmcode = CW$buffer; }; if ($@) { warn Converter problem: $@; }

SYNOPSIS

# use like this use XTM::AsTMa::Converter; my CW$buffer = ''; use IO::String; my CW$output = IO::String->new ($buffer); my CW$writer = new XML::Writer(OUTPUT => CW$output, NAMESPACES => 1, FORCED_NS_DECLS => [ CW$XTM::Namespaces::xlink_ns, CW$XTM::Namespaces::topicmap_ns ], DATA_MODE => CW$format ? 1 : 0, DATA_INDENT => 2, PREFIX_MAP => {$XTM::Namespaces::xlink_ns => 'xlink', CW$XTM::Namespaces::topicmap_ns => '' }); eval { my CW$fo = new XTM::AsTMa::Converter ($writer); CW$atmcode =~ s/\r//g; CW$fo->handle_astma (text => CW$atmcode, log_level => CW$log_level, auto_complete => CW$auto_complete); CW$xtmcode = CW$buffer; }; if ($@) { warn Converter problem: $@; }

NAME

astma2xtm.pl - an AsTMa to XTM converter

SYNOPSIS

  cat map.atm | astma2xtm.pl <command line switch>... > map.xtm

DESCRIPTION

This filter consumes on STDIN a topic map written in AsTMa syntax as described at

 http://topicmaps.bond.edu.au/astma/

and produces on STDOUT an XTM representation of this map. All conversion problems and warnings will go to STDERR.

OPTIONS

Following command line switches are understood by the program:

help
...does hopefully what you would expect.
undefined-topics (default: auto-complete)
This directive controls how the parser will react on topics which are mentioned but never defined in this AsTMa instance:
auto-complete will cause the topics to be created with some reasonable default baseName,
warn will create a warning for each use on STDERR,
ignore will do just this
copy-ids (default: off)
If on, then the converter will copy all IDs, not only those of the topics into the XTM code. Currently not implemented.
basename-generation (default: make-blanks)
This feature will allow to customize how the basename is derived from the topic information. Currently, all dashes will be converted into blanks.
copy-default-psi (default: on)
By default, the PSIs of default type and default scope are copied into the XTM code. As any XTM processor should automatically add them when reading an XTM instance, they can be suppressed without any loss of information.
log-level (default: 0)
The log level determines the verbosity of the program for the STDERR output. This is for debugging mainly.
about (default: off)
The program will print out some information about the software itself, (version) and will terminate thereafter.

AsTMa (Asymptotic Topic Map), the Notation

Please refer to the online documentation

   http://topicmaps.bond.edu.au/astma/

AUTHOR INFORMATION

Copyright 200[1-2], Robert Barta <rho@telecoma.net>, All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. http://www.perl.com/perl/misc/Artistic.html