Incorrect DTD for wstcref-Files
- Dominant language
- Java
- Stars
- 3.1k
- Forks
- 935
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 17
Description
### Apache NetBeans version
Apache NetBeans 23
### What happened
The DTD for wstcref-Files of version 2.2 (https://github.com/apache/netbeans/blob/master/platform/core.windows/src/org/netbeans/core/windows/resources/tc-ref2_2.dtd) contains two errors:
1. The previousMode tag is required by the DTD, but not in the application runtime
2. The previousMode attribute list is not formed well according to the W3C Recommendation (see https://www.w3.org/TR/2006/REC-xml11-20060816/): The name attribute has no so called Attribute Default (#REQUIRED, #IMPLIED or definition)
### Language / Project Type / NetBeans Component
NetBeans Platform DTDs
### How to reproduce
To reproduce the first problem mentioned above simple try to validate the persistance files generated by the NetBeans platform (can be found in the ProgramData folder), e.g.:
```
```
As you can see, even the generated files do not contain a previousMode-tag, cause it is only needed for docking/sliding operations.
The second problem occurs if you want to validate any wstcref-File of version 2.2 using the ant xmlvalidate task, cause it cannot parse the DTD referenced due to the wong formed attribute list of the previousMode tag.
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
Windows 10
### JDK
17
### Apache NetBeans packaging
Apache NetBeans platform
### Anything else
_No response_
### Are you willing to submit a pull request?
Yes
Contributor guide
Research direction
Start with platform/core.windows/src/org/netbeans/core/windows/resources/tc-ref2_2.dtd, linked in the issue, and compare its previousMode declaration with the generated tc-ref version 2.2 example. Validate the corrected DTD and sample persistence file with the ant xmlvalidate task; done means the generated file validates and the DTD parses according to the XML recommendation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- xml
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100