summaryrefslogtreecommitdiff
path: root/src/raptor_general.c
diff options
context:
space:
mode:
authorDave Beckett <dave@dajobe.org>2004-05-30 21:40:15 +0000
committerDave Beckett <dave@dajobe.org>2004-05-30 21:40:15 +0000
commit197e85f899576b499bda97ed5fb5a4af648fdfa9 (patch)
tree4ae2aa71b22063fcaa9bfb77f006f33708d9700f /src/raptor_general.c
parentbacfd4fc00128bba1e3c9f07d234ae84090c5453 (diff)
downloadraptor-197e85f899576b499bda97ed5fb5a4af648fdfa9.tar.gz
Added feature warn_other_parseTypes, default true in lax mode.
Diffstat (limited to 'src/raptor_general.c')
-rw-r--r--src/raptor_general.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/raptor_general.c b/src/raptor_general.c
index 7f77ccf0..9bd18abe 100644
--- a/src/raptor_general.c
+++ b/src/raptor_general.c
@@ -1007,7 +1007,8 @@ static struct
{ RAPTOR_FEATURE_ALLOW_BAGID ,"allowBagID", "Allow rdf:bagID" },
{ RAPTOR_FEATURE_ALLOW_RDF_TYPE_RDF_LIST ,"allowRDFtypeRDFlist", "Generate the collection rdf:type rdf:List triple" },
{ RAPTOR_FEATURE_NORMALIZE_LANGUAGE ,"normalizeLanguage", "Normalize xml:lang values to lowercase" },
- { RAPTOR_FEATURE_NON_NFC_FATAL ,"nonNFCfatal", "Make non-NFC literals cause a fatal error" }
+ { RAPTOR_FEATURE_NON_NFC_FATAL ,"nonNFCfatal", "Make non-NFC literals cause a fatal error" },
+ { RAPTOR_FEATURE_WARN_OTHER_PARSETYPES ,"warnOtherParseTypes", "Warn about unknown rdf:parseType values" }
};
@@ -1105,7 +1106,11 @@ raptor_set_feature(raptor_parser *parser, raptor_feature feature, int value)
case RAPTOR_FEATURE_NON_NFC_FATAL:
parser->feature_non_nfc_fatal=value;
break;
-
+
+ case RAPTOR_FEATURE_WARN_OTHER_PARSETYPES:
+ parser->feature_warn_other_parseTypes=value;
+ break;
+
default:
return -1;
break;
@@ -1163,6 +1168,10 @@ raptor_get_feature(raptor_parser *parser, raptor_feature feature)
result=(parser->feature_non_nfc_fatal != 0);
break;
+ case RAPTOR_FEATURE_WARN_OTHER_PARSETYPES:
+ result=(parser->feature_warn_other_parseTypes != 0);
+ break;
+
default:
break;
}
@@ -1227,6 +1236,7 @@ raptor_set_parser_strict(raptor_parser* rdf_parser, int is_strict)
rdf_parser->feature_allow_rdf_type_rdf_List=0;
rdf_parser->feature_normalize_language=1;
rdf_parser->feature_non_nfc_fatal=is_strict;
+ rdf_parser->feature_warn_other_parseTypes=!is_strict;
}