This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 20762 - Enhance DTD based code completion
Summary: Enhance DTD based code completion
Status: NEW
Alias: None
Product: xml
Classification: Unclassified
Component: Text-Edit (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: issues@xml
Depends on: 30095
Blocks: 32047
  Show dependency tree
Reported: 2002-02-22 00:22 UTC by gthb
Modified: 2007-09-25 01:33 UTC (History)
1 user (show)

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description gthb 2002-02-22 00:22:17 UTC
A nice feature to have: autocompletion when editing an attribute
of type IDREF. The set of possible completions would be the set
of values of attributes of type ID in the same document, restricted
to those that start with the current value of the IDREF attribute
being edited. Of course this should also catch IDs in parsed entities
referenced in the docment.

Does that make sense?
Comment 1 _ pkuzel 2002-02-22 10:35:09 UTC
Generally, it makes sence. Could you explicitly say what document type
you are editing? Does it heavily uses ID - IDREFS? Is it a widely used

The use case will determine priority.

Thanks a lot
Comment 2 gthb 2002-02-22 11:39:38 UTC
Sure: I'm using DocBook. That's probably a pretty general use case
(and increasingly so) ... in any case we use it for all of our
documentation here. When you enter an <xref linkend="req.func"/>
cross-reference, the linkend attribute is an IDREF and refers to the
id attribute (of type ID) of some <section> or <figure> or such.
Project documentation (such as requirements specifications and
design documents) as well as technically-oriented user documentation
tends to be heavily loaded with cross-references ... I probably write
an <xref> every two minutes or so when I'm in the doc mode.
Comment 3 _ pkuzel 2002-02-22 13:10:02 UTC
Thanks, it is definitelly worth to implement it. DocBook is widely
Comment 4 _ pkuzel 2002-06-03 12:27:25 UTC
Let these are considered while planning next release.
Comment 5 Marek Grummich 2002-07-19 16:13:27 UTC
Target milestone was changed from not determined to TBD
Comment 6 _ pkuzel 2002-08-13 17:47:54 UTC
Another dTD features worth to support are: 
  - complete enumerated attribute value 
  - support sequence content models 
Comment 7 _ pkuzel 2003-02-06 16:26:28 UTC
For 3.5 I accepted following bug #30095. It's the same as your
original and it is the first step while implementing this enhancement.
Comment 8 Jesse Glick 2003-02-24 15:59:05 UTC
BTW I think all of these things would be useful for Ant code
completion too:

1. <classpath refid="@

[@ = cursor at time of Ctrl-Spc]

should offer the IDs of <path> elements in the script.

2. <zip whenempty="@

should offer "skip", "create", "fail" according to the

Not sure if these things would be implemented completely independently
in the Ant grammar module, or whether the XML module would provide a
foundation for doing this that would also be used by DTD completion.
Comment 9 _ pkuzel 2003-02-24 16:21:25 UTC
I guess standalone solution (similar to XSLTGrammar) should be used in

Regarding IDs I plan to add hook at Check and Validate actions so a
grammar could hook itself and rescan declared IDs once document is
well-formed. Another possible, better and long-term solution is to add
support for model listeners so grammars could listen on new
attributes, removed attributes, etc.
Comment 10 _ pkuzel 2003-09-03 11:10:36 UTC
Unscheduling from my todo list. New owner is gladly welcome. Meanwhile assigning
to abstract owner.