Recent

Author Topic: Lpi file project - XML schema definition  (Read 551 times)

simone

  • Full Member
  • ***
  • Posts: 200
Lpi file project - XML schema definition
« on: April 25, 2019, 11:48:08 pm »
I know that .lpi files are XML files. Where can I find their schema definition?
 
Thanks.
« Last Edit: April 25, 2019, 11:51:04 pm by simone »

dsiders

  • Full Member
  • ***
  • Posts: 215
Re: Lpi file project - XML schema definition
« Reply #1 on: April 26, 2019, 01:06:47 am »
I know that .lpi files are XML files. Where can I find their schema definition?
 
Thanks.

I've seen neither documentation nor schema for .lpi files.

You could ferret it out by looking at the ide/compileroptions.pp source code. Look at TBaseCompilerOptions.LoadFromXMLConfig and TBaseCompilerOptions.SaveToXMLConfig. That'll tell you what elements they read/write and their hierarchy.
Lazarus 2.0.2 / FPC 3.0.4 / Windows 8.1 64-bit

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 5524
    • wiki
Re: Lpi file project - XML schema definition
« Reply #2 on: April 26, 2019, 01:18:45 am »
There is no schema. Why do you need it?

lucamar

  • Hero Member
  • *****
  • Posts: 1960
Re: Lpi file project - XML schema definition
« Reply #3 on: April 26, 2019, 01:28:32 am »
There is no schema. Why do you need it?

I don't know why the OP wants it but I wold love to have them to make some of my tools a little more robust. Even just a simple list of nodes with a line explaining what each is for and what values/childs are allowed for it.

And not just for the .lpi but for all the XML files Lazarus uses: .lps, the .xml's in the config dir, ...

Yea, I know: I'm dreaming :)
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 2.0.2/2.0.4  - FPC 3.0.4 on:
(K|L)Ubuntu 12..16, Windows XP SP3, various DOSes.

simone

  • Full Member
  • ***
  • Posts: 200
Re: Lpi file project - XML schema definition
« Reply #4 on: April 26, 2019, 08:01:31 am »
There is no schema. Why do you need it?

In my code generator, I'm evaluating the feasibility to create also the lpi file in order to
compile the created source code with lazbuild. In general, without the schema definition I'm not able
to read/write xml file in a sound way. However, now I will study the TBaseCompilerOptions
class, as suggested.

Thanks for hints.


 

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3611
  • I like bugs.
Re: Lpi file project - XML schema definition
« Reply #5 on: April 26, 2019, 05:31:29 pm »
I don't know why the OP wants it but I wold love to have them to make some of my tools a little more robust. Even just a simple list of nodes with a line explaining what each is for and what values/childs are allowed for it.
And not just for the .lpi but for all the XML files Lazarus uses: .lps, the .xml's in the config dir, ...
This is a volunteer open source project. Maybe you could work on the schema and documentation for the project and package info files.
Please remember that the XML file format has changed but the work is not finished yet. If you can work on that, too, it would be great.
In any case the schema should be made for the new file format only.
See:
 https://bugs.freepascal.org/view.php?id=22752
« Last Edit: April 26, 2019, 05:33:05 pm by JuhaManninen »

lucamar

  • Hero Member
  • *****
  • Posts: 1960
Re: Lpi file project - XML schema definition
« Reply #6 on: April 26, 2019, 06:47:46 pm »
This is a volunteer open source project. Maybe you could work on the schema and documentation for the project and package info files.

I fear I know the bare basics of XML, and almost nothing of "schemas". But I'm willing to learn, time permiting. Maybe in those long summer evenings ...
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 2.0.2/2.0.4  - FPC 3.0.4 on:
(K|L)Ubuntu 12..16, Windows XP SP3, various DOSes.