Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I have a very similar if not the same issue. Could you find any workaround? Tested with <code>jaxb-ri-2.2.7</code>, <code>xjc 2.2.4-2 (OpenJDK 7u25)</code> and <code>jaxb-ri-2.2.1.1-4 of GlassFish</code>.</p> <p>The most interesting thing is that when using an import without a schemaLocation in combination with a <code>public</code> catalog entry everything works. Unfortunately I am not able to adjust the schemas.</p> <p>Here's a little example.</p> <p>Failing:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;schema xmlns:test="http://www.test.com/1.0" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xlink="http://www.w3.org/1999/xlink" targetNamespace="http://www.test.com/1.0" elementFormDefault="qualified" attributeFormDefault="unqualified"&gt; &lt;import namespace="http://www.w3.org/1999/xlink" schemaLocation="http://www.w3.org/1999/xlink.xsd"/&gt; &lt;element name="TestElement" type="test:TestType"/&gt; &lt;complexType name="TestType"&gt; &lt;sequence&gt; &lt;element name="name" type="string"/&gt; &lt;/sequence&gt; &lt;attribute ref="xlink:title" use="required"/&gt; &lt;/complexType&gt; &lt;/schema&gt; </code></pre> <p>Working:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;schema xmlns:test="http://www.test.com/1.0" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xlink="http://www.w3.org/1999/xlink" targetNamespace="http://www.test.com/1.0" elementFormDefault="qualified" attributeFormDefault="unqualified"&gt; &lt;import namespace="http://www.w3.org/1999/xlink"/&gt; &lt;element name="TestElement" type="test:TestType"/&gt; &lt;complexType name="TestType"&gt; &lt;sequence&gt; &lt;element name="name" type="string"/&gt; &lt;/sequence&gt; &lt;attribute ref="xlink:title" use="required"/&gt; &lt;/complexType&gt; &lt;/schema&gt; </code></pre> <p>Catalog file (for both):</p> <pre><code>&lt;!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"&gt; &lt;catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"&gt; &lt;system systemId="http://www.w3.org/1999/xlink.xsd" uri="../schemas/xlink/1.0.0/xlinks.xsd"/&gt; &lt;public publicId="http://www.w3.org/1999/xlink" uri="../schemas/xlink/1.0.0/xlinks.xsd"/&gt; &lt;/catalog&gt; </code></pre> <p>Execution (for both):</p> <p><code>xjc schemas/xlink/1.0.0/xlinks.xsd schemas/test.xsd -b xjb/xlink.xjb -extension -d .build -catalog catalog/catalog.xml</code></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload