0

XML ファイルを XSD ファイルで検証しようとしていますが、うまくいきません。理由がわかりません。

その例を使用して端末で実行できることがわかりました:

xmllint --noout --schema owl2-xml.xsd camera.owl

しかし、それは私が特に理解していないエラーを生成します。

regexp error : failed to compile: expecting a branch after |
owl2-xml.xsd:30: element pattern: Schemas parser error : Element '{http://www.w3.org/2001/XMLSchema}pattern': The value '([A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-῿]|[-]|[⁰-↏]|[Ⰰ-⿯]|[、-퟿]|[豈-﷏]|[ﷰ-�]|[-])(([A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-῿]|[-]|[⁰-↏]|[Ⰰ-⿯]|[、-퟿]|[豈-﷏]|[ﷰ-�]|[-]|_|\-|[0-9]|·|[̀-ͯ]|[‿-⁀]|\.)*([A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-῿]|[-]|[⁰-↏]|[Ⰰ-⿯]|[、-퟿]|[豈-﷏]|[ﷰ-�]|[-]|_|\-|[0-9]|·|[̀-ͯ]|[‿-⁀]  ))?|' of the facet 'pattern' is not a valid regular expression.
WXS schema owl2-xml.xsd failed to compile

しかし、バリデータxmlファイルを選択した場合(これhttp://mowl-power.cs.man.ac.uk:8080/validator/:)

XML ファイルが検証されました。

理由がわかりません。これが機能していません... 選択している XML スキーマがバリデータ リンクと同じである必要がある場合。

XML スキーマはそこからのものです: http://www.w3.org/2009/09/owl2-xml.xsd(owl2) そして、バリデーターも owl2 構造を使用します。だから...私は何が欠けていますか?

フクロウファイルの例

これは、camera.owlを使用して検証しようとしている例です。

4

4 に答える 4

2

mowl-power のバリデーターは、ファイルを XML ではなく owl 2 オントロジーとして検証します。通常、DTD と xsd の解決は、使用する OWLAPI パーサーではオフになっていると思います。

于 2014-06-02T08:28:22.917 に答える
1

xmllint's regular-expression parser appears to be in error. As the error message makes clear, it's expecting that the branch separator | will be followed by some non-empty branch; the XSD spec, however, is clear that the empty string counts as a branch. If you want to validate your XML against this XSD schema, you will need to use a validator with a more reliable implementation of XSD.

于 2014-06-01T22:01:55.443 に答える