[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]



Consider de following file:

lazlo:~/devel/web/www.bcnartdirecte.com/practice$ cat file-she.wml 
#!wml -oESuUNDEF:file.es -oENuUNDEF:file.en

[EN:Hello, world!:][ES:Hola, mundo!:]

It has a shebang line and issuing a wml command on it I get:

lazlo:~/devel/web/www.bcnartdirecte.com/practice$ wml file-she.wml 

And as expected I get a file for each slice:

lazlo:~/devel/web/www.bcnartdirecte.com/practice$ ls
file-emb.wml  file-she.wml  file.en       file.es

OK, so far. BUT, I have this other file:

lazlo:~/devel/web/www.bcnartdirecte.com/practice$ cat file-emb.wml 
[EN:Hello, world!:][ES:Hola, mundo!:]
        print "\%\!slice -oENuUNDEF:file.en\n";
        print "\%\!slice -oESuUNDEF:file.es\n";

Which is supposed to generate the output options in pass 3 and I get:

lazlo:~/devel/web/www.bcnartdirecte.com/practice$ wml file-emb.wml 
Hello, world!Hola, mundo!

That is, it outputs to STDOUT all slices. Up to now I have been using the
shebang line to put the filenames for each language but I would like
to overcome this with something like <page languages="es,en,de"> and
have Perl generate de "%!slice -o..." lines. I think wml should behave
the same in both situations and not "pollute" STDIN.

I have tracked down the ¿problem? to wml-1.6.4/wml_frontend/wml.src
line 759. 

When the shebang is used, wml_p9_slice receives the shebang
output files in $opt and any %!slice commands inside the file will be
appended to them *by wml_p9_slice itself*. But, in the second case,
i.e. using only %!slice commands, $opt contains a temporary file which
is the one I think finally gets piped to STDOUT.

Should wml_frontend detect in pass9 that the source file (now in
$from) has %!slice options and reset $opt ????

Thanks for your time!

Best regards,

Rafa C. Marcos
BCN Art Directe (Promotora d'Art)

Visit Internet Virtual Studios at: http://www.bcnartdirecte.com/studios

Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com