[Pas2js] Pas2JS: compiler extension to validate XML/XSLT files

Michael Van Canneyt michael at freepascal.org
Fri Dec 30 23:14:29 CET 2022



On Fri, 30 Dec 2022, Ondrej Pokorny via Pas2js wrote:

>> What we could envision is a preprocessor for the {$R} which can be 
>> specified
>> on the command line, per extension. Something like:
>> -FPxslt=path/to/your/tool.
>> 
>> This handler would receive 2 names:
>> - InputFileName
>> - OutputFileName
>> when it sees the {$R}, the compiler generates an output filename and calls
>> the tool with the 2 filenames. When the tool is done, the compiler includes 
>> the generated file. (you can just copy the file if you don't need 
>> additional processing)
>> 
>> What do you think about that approach ?
>
> I think you are right that this is not a task for Pas2JS.
>
> I will do it as a Lazarus package. This gives me more possibilities (well, I 
> don't know yet how to do it but it is always possible to extend the IDEIntf 
> API).
>
> I will definitely write back about my success.

Please do. 
I did already quite a lot in the pas2jscomponents package for
HTML file support in pas2js, but maybe your additions will inspire 
me even more :)

Michael.



More information about the Pas2js mailing list