From d7c6f1d025cb7b03a7d44625827a7e852df23e0e Mon Sep 17 00:00:00 2001 From: defanor Date: Fri, 23 Feb 2018 18:32:30 +0300 Subject: Fix Literal value datatype URI handling It should be an URI, not a string. --- Redland/Util.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Redland/Util.hs') diff --git a/Redland/Util.hs b/Redland/Util.hs index 600cc83..e7ac295 100644 --- a/Redland/Util.hs +++ b/Redland/Util.hs @@ -79,10 +79,10 @@ redlandNodeToNode rn = do litVal <- nodeGetLiteralValue rn litLang <- nodeGetLiteralValueLanguage rn litType <- nodeGetLiteralValueDatatypeURI rn - let nType = case (litLang, litType) of - (Just l, _) -> Just $ LanguageTag l - (_, Just t) -> Just $ XMLSchema t - _ -> Nothing + nType <- case (litLang, litType) of + (Just l, _) -> pure $ Just $ LanguageTag l + (_, Just t) -> Just . XMLSchema <$> uriAsString t + _ -> pure Nothing pure $ LiteralNode litVal nType _ -> ResourceNode <$> (nodeGetURI rn >>= uriAsString) -- cgit v1.2.3