我有一个xsd。当我尝试验证它在BizTalk它给这些错误:

error BEC2009: Node "<Schema>" - Schema reference "http://www.w3.org/2001/xml.xsd" is not a valid reference or does not exist in the current project.

error BEC2009: Node "<Schema>" - Schema reference "http://www.w3.org/2001/xml.xsd" is not a valid reference or does not exist in the current project.

warning BEC999: Cannot resolve the 'schemaLocation' attribute.

error BEC3001: The 'http://www.w3.org/XML/1998/namespace:space' attribute is not declared.

warning BEC999: Cannot resolve the 'schemaLocation' attribute.

warning BEC1007: Node "<Schema>" - Target namespace is empty.

我认为这是指其看起来像这样的命名空间:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>

不知道这是足够的信息去......

编辑:结果 我发现,取决于什么节目,我用它来验证XML与它有时工作。例如。如果我创建一些.NET代码来验证该模式的XML似乎读取XSD确定和验证XML。如果我使用记事本中的XML验证++它说,它无法读取架构虽然。在另一映射器(WTX)他们说这也不起作用。

还有其他的事情,我可以尝试缩小可能存在的问题?

编辑2:结果 由于xcut。研究发现,如果我在本地下载的模式,并把它放在BizTalk项目的模式验证确定,但与1警告: 警告BEC1007:节点“” - 目标命名空间是空

有帮助吗?

解决方案

除了它是一个有点奇怪导入命名空间的架构,这可能是因为的BizTalk根本无法通过URL导入架构(而.NET代码即可)。

要排除这是一个问题,从w3.org下载的模式,把它放在你的项目,并从那里,而不是通过HTTP导入。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top