PARSER ERROR CODES

src-resolve: the schema reference cannot be resolved

XSDHub · Tested 5 November 2026 · How we test guides

src-resolve is a schema-compilation diagnostic. The XSD names a component such as a type, element or group that the validator cannot resolve. Instance data cannot repair a missing definition inside the schema set.

What the message literally means

The amount element refers to MoneyTypo while the same schema defines Money. The complete corrected pair leaves the XML value 12.50 unchanged and changes only the type reference in the XSD. This separates a schema symbol error from an invalid decimal amount.

Three common causes to check first

  1. A QName reference is misspelled or points to the wrong component kind. A named element is not interchangeable with a named simple type merely because their local names match.
  2. The reference prefix resolves to the wrong namespace, or a needed import is absent. QName-valued attributes must resolve to the namespace containing the component.
  3. A dependency was not loaded or the wrong schema entry file was selected. An include or import chain can be syntactically correct while its required document is unavailable.

Repair and retest

Compile the XSD first and identify the unresolved QName in the first src-resolve diagnostic. Find a declaration of the correct kind and compare namespace URI plus local name. For the same target namespace, inspect includes; for another target namespace, inspect imports and their namespace attributes. Load dependencies as a complete local project rather than relying on remote retrieval. Only then validate the instance XML.

When this is a namespace problem

This particular typo is not a namespace mismatch: both Money and its corrected reference are in the schema’s no-namespace component space. In namespaced schemas, bind a prefix to targetNamespace and use it consistently in type or ref. A prefix declaration supplies a QName binding but does not import that namespace’s component definitions.

Reading equivalent reports

The workbench’s corrected button loads a different XSD as well as the XML. Comparing only the visible amount would miss the actual repair. Avoid creating an empty placeholder type to satisfy lookup, since it can accidentally weaken validation while leaving the intended money constraints unloaded.

Complete tested XML and XSD pairs

Open either variant in the workbench, then choose Validate XML. Loading an example does not run validation or send documents; server checks require the existing permission checkbox.

These transcripts were captured on 5 November 2026 from the exact files shown below. Download all measured results and SHA-256 hashes.

Unknown schema type / src-resolve

Broken XML

<amount>12.50</amount>
Broken complete XSD
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="amount" type="MoneyTypo"/>
  <xs:simpleType name="Money">
    <xs:restriction base="xs:decimal"/>
  </xs:simpleType>
</xs:schema>

Download XML · Download XSD

Open broken pair →

Corrected XML

<amount>12.50</amount>
Corrected complete XSD
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="amount" type="Money"/>
  <xs:simpleType name="Money">
    <xs:restriction base="xs:decimal"/>
  </xs:simpleType>
</xs:schema>

Download XML · Download XSD

Open corrected pair →

Same specimen across engines

EngineBroken: actual reportCorrected
Apache Xerces-J 2.12.2
XSD
src-resolve: Cannot resolve the name 'MoneyTypo' to a(n) 'type definition' component.
PASS
.NET 8.0.33 · System.Xml.Schema
XSD
Type 'MoneyTypo' is not declared.
PASS (no warnings)
XSDHub libxml2/WASM 0.7.2
XSD
element decl. 'amount', attribute 'type': The QName value 'MoneyTypo' does not resolve to a(n) type definition.
PASS
XSDHub xmlschema 4.3.1 · XSD 1.0
XSD
unknown type 'MoneyTypo':

Schema component:

  <xs:element xmlns:xs="http://www.w3.org/2001/XMLSchema" name="amount" type="MoneyTypo" />

Path: /xs:schema/xs:element

Schema URL: schema.xsd
PASS
SaxonEE comparison: src-resolve describes the corresponding XSD constraint. No Saxon-EE run or wording is claimed; an EE licence is unavailable in this test environment. Saxon-HE does not provide XSD validation.Not run

Saxon comparison and test scope

Saxonica documents XSD processing as an Enterprise Edition feature. The Saxon rows map the named constraint, rather than presenting an invented message. The four measured rows are Xerces, .NET, the shipped workbench engine and XSDHub’s second engine.

The corrected results apply to these self-contained XSD 1.0 specimens. They do not establish business-rule acceptance for a different document or schema version.

Continue the diagnosis

All parser error codes · XML and XSD validator

Primary references