0
--strictコマンドラインを渡すときに何が起こるか把握するためにJenaのコードを調べました。警告のロギング以外の違いはないようです。 CmdLangParse.javaではstrictモードが設定され、SysRIOT.setStrictMode(true)が呼び出され、StrictXSDLexicialFormsとstrictModeフラグの両方が設定されます。 Jenaコマンドラインと--strict
@Override
protected void exec() {
boolean oldStrictValue = SysRIOT.isStrictMode() ;
if (modLangParse.strictMode())
SysRIOT.setStrictMode(true) ;
try { exec$() ; }
finally { SysRIOT.setStrictMode(oldStrictValue) ; }
}
はその後だけCheckerLiters validateByDatatypeand validateByDatatypeNumericuseにStrictXSDLexicalForms属性と、それは、\ nは、スペースを見つけた場合、または\ rが、それはちょうどそれをログに記録します。以下はvalidateByDatatypeNumeric
// Do a white space check as well for numerics.
if (lexicalForm.contains(" ")) {
handler.warning("Whitespace in numeric XSD literal: '" + lexicalForm + "'", line, col) ;
return false ;
}
if (lexicalForm.contains("\n")) {
handler.warning("Newline in numeric XSD literal: '" + lexicalForm + "'", line, col) ;
return false ;
}
if (lexicalForm.contains("\r")) {
handler.warning("Carriage return in numeric XSD literal: '" + lexicalForm + "'", line, col) ;
return false ;
}
からの抜粋を、私は何かが足りないか、二つのモード(厳密および非厳密)に違いはありませんアムれますか?