Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Incorrect DTD for wstcref-Files

Open Beginner friendly
#7,876 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
xml
Domain
tooling

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.

Description

kind:bug needs:triage
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.:

<?xml version="1.0" encoding="UTF-8"?>

<tc-ref version="2.2">
    <tc-id id="XXTopComponent" />
    <state opened="false" />
</tc-ref>

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

Dominant language
Java
Stars
3.1k
Forks
939
Avg merge
5d 15h
Merged PRs (30d)
24

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/netbeans

All issues in apache/netbeans

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.