##
##  wml::imp::csmap - Import External Server-Side Map as Inlined Client-Side Map
##  Copyright (c) 1997-2001 Ralf S. Engelschall, All Rights Reserved. 
##

#  The <preserve>/<restore> tags with multiple arguments require WML 2.0.3
#use wml::mod::version
<require 2.0.3 />

#use wml::std::tags

<define-tag csmap>
<preserve from type name />
<set-var %attributes />
<perl>
    $from = '<get-var from />';
    $type = '<get-var type />';
    $name = '<get-var name />';

    $type = 'ncsa' if $type eq '';
    $name = $from  if $name eq '';

    open(FP, "$(WML_LOC_LIBEXECDIR)/wml_aux_map2html -t $type -n $name $from |");
    while (<*FP>) {
        <perl:print: $_ />
    }
    close(FP);
</perl>
<restore  from type name />
</define-tag>

##EOF##
