Recent

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

simone

  • Hero Member
  • *****
  • Posts: 573
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 »
Microsoft Windows 10 64 bit - Lazarus 3.0 FPC 3.2.2 x86_64-win64-win32/win64

dsiders

  • Hero Member
  • *****
  • Posts: 1052
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.
Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9794
  • Debugger - SynEdit - and more
    • 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: 4219
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/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

simone

  • Hero Member
  • *****
  • Posts: 573
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.


 
Microsoft Windows 10 64 bit - Lazarus 3.0 FPC 3.2.2 x86_64-win64-win32/win64

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • 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 »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

lucamar

  • Hero Member
  • *****
  • Posts: 4219
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/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

 

TinyPortal © 2005-2018