为什么ShEx常量不匹配数据中的相同术语?

tea*_*tem 4 rdf semantic-web shex

我有一个期待特定类型的ShEx架构:

epri:VariableShape {
  a st:studyVariable ;
  st:subject [tax:~] ;
  st:signal xsd:decimal
}
Run Code Online (Sandbox Code Playgroud)

拒绝该类型的数据

st:envFactorEMF a st:studyVariable ; # << this isn't recognized
  st:subject tax:1758 ;
  st:signal -.00043 .
Run Code Online (Sandbox Code Playgroud)

(演示)为什么会这样?

Jos*_*lor 5

您链接到的演示中的错误消息实际上描述了确切的问题.

http://www.epri.com/studies/3002011786studyVariable验证为{"type":"NodeConstraint","datatype":" http://www.epri.com/studies/3002011786studyVariable "}:错误的数据类型:http ://www.epri.com/studies/3002011786studyVariable不是数据类型的文字http://www.epri.com/studies/3002011786studyVariable

您正在使用数据类型约束,这不是您想要的.

您需要使用a [ st:studyVariable ],因为您要指定一个值集:

epri:VariableShape {
  a [ st:studyVariable ];
  st:subject [tax:~] ;
  st:signal xsd:decimal
}
Run Code Online (Sandbox Code Playgroud)