2012-05-10 13 views
1

私は2つの最も単純なxsdファイルを持っています。XJC複数のXSD - > "エピソード"を使用したクラス生成

a.xsd:

<?xml version="1.0" encoding="UTF-8"?> 
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:a="A" targetNamespace="A"> 
    <complexType name="myType"/> 
    <element name="root" type="a:myType"/> 
</schema> 

がb.xsd:

<?xml version="1.0" encoding="UTF-8"?> 

<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="B" xmlns:a="A"> 
    <import namespace="A"/> 
    <complexType name="extendedType"> 
    <complexContent> 
     <extension base="a:myType"/> 
    </complexContent> 
    </complexType> 
</schema> 

我々はa.xsdで定義されているb.xsdでmyTypeを使用しています。生成プロセスは、「エピソード」機能を使用する2つのステップで構成されています。

> xjc -episode a.episode a.xsd 
parsing a schema... 
compiling a schema... 
a\MyType.java 
a\ObjectFactory.java 
a\package-info.java 

> xjc b.xsd -b a.episode 
parsing a schema... 
[ERROR] src-resolve: Cannot resolve the name 'a:myType' to a(n) 'type definition' component. 
    line 7 of file:/b.xsd 

Failed to parse a schema. 

第一世代は、有効なa.episodeファイルで成功しますが、二つ目は失敗します。ここで何が間違っていますか?

答えて

1

私は、ApacheのXMLBeans 2.5.0であなたの例を試してみましたが、それは、このコマンドで働いていた:

scomp -srconly a.xsd b.xsd 
関連する問題