架构更改无效

Sac*_*nth -1 xml relaxng

我有一个名为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 }*
Run Code Online (Sandbox Code Playgroud)

我有另一个名为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 }
    )
Run Code Online (Sandbox Code Playgroud)

但我改变了最后一点(因为xml结构已经改变)

Boundary = element boundary { Bounds }

    Bounds = (
            attribute from { "a" | "b" | xsd:date },
            attribute to { "a" | "b" | xsd:date }
        )
Run Code Online (Sandbox Code Playgroud)

我已经生成了rng文件,但是当运行的代码运行验证这些模式时,我得到以下错误

POST <url> 400 (Invalid attribute value is found. Value = 'a' Expected elements are: . line 7, column 13   Validated using schema:   b.rng) 
Run Code Online (Sandbox Code Playgroud)

我在这做傻事吗?

Gar*_*ams 5

您是否已连接到具有更新架构的本地计算机,或者您是否已连接到在进行验证请求时已过期的远程服务器?

在更改任何代码之前,您应该停止粘贴正在处理的代码.那只是懒惰.你可能会被解雇.