如何解决此错误:src-resolve:无法将名称 'j2ee:descriptionType' 解析为 a(n) 'type definition' 组件.? [英] How to solve this error : src-resolve: Cannot resolve the name 'j2ee:descriptionType' to a(n) 'type definition' component.?

查看:41
本文介绍了如何解决此错误:src-resolve:无法将名称 'j2ee:descriptionType' 解析为 a(n) 'type definition' 组件.?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到了

"src-resolve: 无法将名称 'j2ee:descriptionType' 解析为 a(n) 'type definition'组件."

"src-resolve: Cannot resolve the name 'j2ee:descriptionType' to a(n) 'type definition' component."

我的 xsd 文件中出现此错误.

this error in my xsd file.

请帮我解决这个问题.

推荐答案

该错误意味着 descriptionType 是 XSD 中引用的 XML 架构类型(简单或复杂),类似于 type="j2ee:descriptionType".您的 XSD 需要引用(使用导入包含)包含此定义的 XSD 文件.

The error means that the descriptionType is an XML Schema type (simple or complex) that is being referenced in your XSD, something like type="j2ee:descriptionType". Your XSD needs to reference (using an import or include) the XSD file which contains this definition.

要找出可能是哪个,您可以使用通过 j2ee 映射的 URI,这将为您提供所需架构的目标命名空间.如果这与您的 XSD 不同,那么您需要使用类似 <xsd:import namespace="j2ee uris go here" schemaLocation="where is it?"/>;否则,是

To find out which might be, you use the URI mapped with j2ee which will give you the target namespace of the schema you need. If that is different than of your XSD's, then you need to use something like <xsd:import namespace="j2ee uris goes here" schemaLocation="where is it?"/>; otherwise, is an <xsd:include schemaLocation="where is it?"/>

如果您的 XSD 中已经有该导入/包含,那么架构位置就是您的问题;检查它是否解决了某些问题.这就是事情可能变得棘手的地方,因为这取决于您如何得到错误,而您什么也没说.

If you already have that import/include in your XSD, then the schema location is your problem; check that it resolves to something. This is where things might get tricky, since it depends on how you're getting the error, of which you said nothing.

如果是编辑器,那就看情况了;也许您需要配置一些解析命名空间引用的目录,也许您只是将文件复制到您的文件系统等.

If it's an editor, then it depends; maybe you need to configure some catalog that resolves namespace references, maybe you just copy the file over to your file system, etc.

这篇关于如何解决此错误:src-resolve:无法将名称 'j2ee:descriptionType' 解析为 a(n) 'type definition' 组件.?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆