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 248983 - Auto-completion does not offer elements from other namespaces when using XML schemas
Summary: Auto-completion does not offer elements from other namespaces when using XML ...
Status: NEW
Alias: None
Product: xml
Classification: Unclassified
Component: Text-Edit (show other bugs)
Version: 8.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Svata Dedic
Depends on:
Reported: 2014-11-28 14:36 UTC by pkerling
Modified: 2015-09-04 11:50 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description pkerling 2014-11-28 14:36:26 UTC
Consider for example the following XML element:

Then inside the div, no elements from the namespace v are available for autocompletion at all.
I can't quote the XML specification on the correct behaviour in this case, but I think there should be an option to make the v: elements available for better user experience if not for the spec. Or even better, show them by default.
Comment 1 Svata Dedic 2015-09-04 11:48:55 UTC
Oops :)
because of the top-level element namespace, the entire text is recognized as XHTML;  while schema completion provider is registered against text/xml, it is not available for XHTML files.

This is not easily solvable. It could be possible to register the XML provider with some minor code tweaks, but the XML provider works XML lexical elements and expects them from the file's lexer. But, in this case, the lexer provides XHTML tokens.

The lexer infrastructure (IMHO) does not allow to produce different lexical streams for the same document, so the text cannot be reinterpreted as XML.

It isn't feasible to duplicate all the XML completion in XHTML module either.