我有一个名为a.rnc的架构,看起来像这样
default namespace = "urn:schemas-foo:bar"
include "b.rnc" {
start = A
Links = element link { HidableLinkType }*
}
A = element Bat { AType }
AType = SavedResourceType
& Boundary?
& Baz*
& element link { HidableLinkType }*
我还有一个称为b.rnc的架构,该架构以前看起来像这样
default namespace = "urn:schemas-foo:bar"
include "c.rnc"
include "d.rnc" {
start = Baz
}
Baz = element Z { BType }
BType = SavedResourceType
SavedResourceType &= Boundary?
& element panel-id { text }?
& Annotations?
Boundary = element boundary { "a" | "b" | Bounds }
Bounds = (
attribute from { xsd:date },
attribute to { xsd:date }
)
但是我将最后一位(因为xml结构已更改)更改为
Boundary = element boundary { Bounds }
Bounds = (
attribute from { "a" | "b" | xsd:date },
attribute to { "a" | "b" | xsd:date }
)
我已经生成了rng文件,但是当运行一些针对这些模式进行验证的代码时,出现以下错误
POST <url> 400 (Invalid attribute value is found. Value = 'a' Expected elements are: . line 7, column 13 Validated using schema: b.rng)
我在这里做傻事吗?
您是连接到具有更新架构的本地计算机,还是连接到发出验证请求时已过期的远程服务器?
在更改任何代码之前,您应该停止粘贴正在处理的代码。那只是懒惰。你可能会因此而被解雇。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句