I'm trying to compile an xsd using JAXB 2.1.2. I have an element defined that has a reference attribute of xml:base (I do this for Xinclude). I get a src-resolve error when attemting to compile. Below is an example XSD that demonstrates my problem.
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:foobar="foobar" targetNamespace="foobar" elementFormDefault="qualified" version="1.0" id="foobar.xsd"
xsi:schemaLocation="foobar foobar.xsd">
<import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2005/08/xml.xsd"/>
<element name="Foo" type="foobar:Bar"/>
<complexType name="Bar">
<attribute ref="xml:base"/>
</complexType>
</schema>
This is the error I get:
[ERROR] src-resolve: Cannot resolve the name 'xml:base' to a(n) 'attribute declaration' component.
Why am I getting this error?