Java 重命名XSD文件时xjc.exe的奇怪行为
我有一组XSD文件:Java 重命名XSD文件时xjc.exe的奇怪行为,java,xml,xsd,xjc,Java,Xml,Xsd,Xjc,我有一组XSD文件: 635949212012288836_input.xml.xsd 635949212012288836_input.xml_app1.xsd 635949212012288836_input.xml_app2.xsd 635949212012288836_input.xml_app3.xsd 635949212012288836_input.xml_app4.xsd xml.xsd 第一个文件(主文件)635949212012288836_input.xml.xsd包含其
635949212012288836_input.xml.xsd
635949212012288836_input.xml_app1.xsd
635949212012288836_input.xml_app2.xsd
635949212012288836_input.xml_app3.xsd
635949212012288836_input.xml_app4.xsd
xml.xsd
第一个文件(主文件)635949212012288836_input.xml.xsd包含其他五个文件的导入:
<xs:import namespace="http://schemas.xxxx.com/soa/emf/GLHR-MLM-CURD/envelope/" schemaLocation="635949212012288836_input.xml_app2.xsd"/>
<xs:import namespace="http://schemas.xxxx.com/soa/emf/common/header" schemaLocation="635949212012288836_input.xml_app1.xsd"/>
<xs:import namespace="http://schemas.xxxx.com/soa/emf/service/GLHR-MLM-CURD" schemaLocation="635949212012288836_input.xml_app3.xsd"/>
<xs:import namespace="http://schemas.xxxx.com/soa/emf/common/body" schemaLocation="635949212012288836_input.xml_app4.xsd"/>
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd"/>
它运行成功
如果我将第一个文件635949212012288836_input.xml.xsd重命名为以下任意名称(在名称中添加一个额外的“x”)
然后再次运行xjc.exe,我会在文件635949212012288836_input.xml_app2.xsd中遇到一些无法解析的名称错误
但是,如果我将第一个文件重命名为以下名称(改为另加一个“I”):
并再次运行xjc.exe,它将成功运行
这种异常行为的原因可能是什么
请注意,其他文件没有对第一个文件的引用
谢谢。再次生成之前是否删除了生成的文件?是的,我在重新生成之前删除了。
xjc.exe -d generated *.xsd
635949212012288836_xinput.xml.xsd
635949212012288836_ixnput.xml.xsd
635949212012288836_inputx.xml.xsd
635949212012288836_iinput.xml.xsd