Bug 157621 - dialog.dtd Is Outdated or Incomplete
Summary: dialog.dtd Is Outdated or Incomplete
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.6.1.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Dialog Macro
  Show dependency treegraph
 
Reported: 2023-10-05 20:50 UTC by tomekluke
Modified: 2023-10-23 14:35 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
sample dialog exported as XDL, created with LO 24.2 (5.42 KB, application/xml)
2023-10-23 14:31 UTC, Stéphane Guillou (stragu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tomekluke 2023-10-05 20:50:18 UTC
Description:
dialog.dtd and other dtd files (documentation: https://wiki.openoffice.org/wiki/Documentation/DevGuide/Basic/Library_File_Structure) are XML specifications. But for example dialog.dtd (not sure about other DTD files) is incomplete or maybe outdated.

Steps to Reproduce:
1. Tools > Macros > Dialog windows
2. Create any dialog window, for example with some radio buttons or other elements.
3. Export the window to XDL (there is a button for that, see the upper toolbars).
4. Open the XDL in IDE (IDE must be set up, so it can read DTD specifications of XML files and validate XMLs against DTD) (I use VS Code, see https://github.com/redhat-developer/vscode-xml/blob/main/docs/Validation.md)
5. find dialog.dtd on your system (where in LibreOffice it is placed? See: https://wiki.openoffice.org/wiki/Documentation/DevGuide/Basic/Library_File_Structure)
6. place the dialog.dtd in the same folder as your XDL dialog.
7. As you see, IDE validates many XML tags against DTD just right. But some tags are missing. These are not defined in DTD. For example: dlg:radio > dlg:group-name. dlg:text-field > dlg:valign. These are tags that are missing from dialog.dtd, so we can see that dialog.dtd is incomplete or maybe outdated.

Actual Results:
XML tag definitions missing from DTD file.

Expected Results:
In DTD file all used XML tags should be defined.


Reproducible: Always


User Profile Reset: No

Additional Info:
-
Comment 1 Stéphane Guillou (stragu) 2023-10-23 14:31:55 UTC
Created attachment 190391 [details]
sample dialog exported as XDL, created with LO 24.2

Thanks for the report!

- Documentation on TDF wiki: https://wiki.documentfoundation.org/Documentation/DevGuide/LibreOffice_Basic#Library_File_Structure
- dialog.dtd path: https://opengrok.libreoffice.org/xref/core/xmlscript/dtd/dialog.dtd

I exported the attached XDL from a dialog created with the GUI, containing many controls, and changed various properties in some controls.

I found the following issues:

- dlg:bulletinboard contents don't match specifications
- dlg:spinbutton element not declared
- dlg:group-name attribute not declared for dlg:radio

Dialog created with:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: fd69b546ad36452560cb11ccb28e78632d65f045
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

and checking it against the current DTD from master.