Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 268029 - Autocompletion fails when the XSD includes another XSD
Autocompletion fails when the XSD includes another XSD
Product: xml
Classification: Unclassified
Component: Schema
PC Windows 7
: P2 (vote)
: Dev
Assigned To: Svata Dedic
Depends on:
  Show dependency treegraph
Reported: 2016-09-14 17:47 UTC by Xenos
Modified: 2017-03-16 02:50 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT

Showcase (746 bytes, application/force-download)
2016-09-14 17:48 UTC, Xenos

Note You need to log in before you can comment on or make changes to this bug.
Description Xenos 2016-09-14 17:47:04 UTC
When a XML uses a schema that includes another schema that defines the root node, then the auto-completion fails

<?xml version="1.0" encoding="utf-8"?>
<rootnode xmlns:xsi="" xsi:noNamespaceSchemaLocation="schema.xsd">
	<!-- NetBeans suggests nothing here -->
	<!-- While it actually validates well -->

<?xml version="1.0"?>
<xs:schema version="1.0" xmlns:xs="" elementFormDefault="qualified">
	<xs:include schemaLocation="included.xsd"/>

<?xml version="1.0"?>
<xs:schema version="1.1" xmlns:xs="" elementFormDefault="qualified">
	<xs:element name="rootnode">
		<xs:complexType mixed="true">
				<xs:element name="subnode" minOccurs="1" maxOccurs="1">
						<xs:restriction base="xs:string">
							<xs:pattern value="[aeiouy]+"/>

If the XML uses directly included.xsd, then the auto-completion works

<?xml version="1.0" encoding="utf-8"?>
<rootnode xmlns:xsi="" xsi:noNamespaceSchemaLocation="included.xsd">
	<!-- These will be suggested by NetBean's autocompletion -->

I'm not sure whether it's a NB bug or a normal XML schema behavior.
Comment 1 Xenos 2016-09-14 17:48:02 UTC
Created attachment 162051 [details]
Comment 2 Svata Dedic 2017-03-13 18:04:26 UTC
Support for xs:include and xs:import was missing from the underlying model. Implemented in jet-main#0e7654675b8b
Comment 3 Quality Engineering 2017-03-16 02:50:42 UTC
Integrated into 'main-silver', will be available in build *201703160002* on (upload may still be in progress)

User: Svata Dedic <>
Log: #268029: Added read support for xs:include/import. Updated completion

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo