From 1770ed94a66823c2611947d0cd026429351d6f9a Mon Sep 17 00:00:00 2001 From: Greg Hanson Date: Mon, 20 May 2024 09:50:41 -0400 Subject: [PATCH] Temporary workaround for issue with blank node labels generated by java based rdf2hdt cli. https://github.com/rdfhdt/hdt-java/issues/210 --- lib/oxrdf/src/blank_node.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/oxrdf/src/blank_node.rs b/lib/oxrdf/src/blank_node.rs index 4bf82391..8e888de7 100644 --- a/lib/oxrdf/src/blank_node.rs +++ b/lib/oxrdf/src/blank_node.rs @@ -267,12 +267,17 @@ impl IdStr { fn validate_blank_node_identifier(id: &str) -> Result<(), BlankNodeIdParseError> { let mut chars = id.chars(); let front = chars.next().ok_or(BlankNodeIdParseError)?; + // TODO: blank node issue with label _:@ with java based rdt2hdt conversion + // upstream issue https://github.com/rdfhdt/hdt-java/issues/210 + // List of acceptable char in label found here: https://www.w3.org/TR/turtle/#grammar-production-PN_CHARS_BASE + // temporarily adding 0040 for @ until consensus is reached match front { '0'..='9' | '_' | ':' | 'A'..='Z' | 'a'..='z' + | '\u{0040}' | '\u{00C0}'..='\u{00D6}' | '\u{00D8}'..='\u{00F6}' | '\u{00F8}'..='\u{02FF}'