Nokogiri XSD架构验证与远程包括,可能吗?

时间:2017-02-02 19:22:54

标签: ruby xsd nokogiri

我有这个schema.xsd文件:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:include schemaLocation="http://raw.githubusercontent.com/zerocracy/datum/0.16/xsd/pmo/types.xsd"/>
</xs:schema>

我正在加载Nokogiri:

require 'nokogiri'
Nokogiri::XML::Schema(File.open('schema.xsd'))

我得到了:

Nokogiri::XML::SyntaxError: Element '{http://www.w3.org/2001/XMLSchema}include': 
Failed to load the document 'http://raw.githubusercontent.com/zerocracy/datum/0.16/xsd/pmo/types.xsd' for inclusion.

是否有任何改变才能使其有效?

0 个答案:

没有答案