summaryrefslogtreecommitdiffstats
path: root/Redland/Util.hs
diff options
context:
space:
mode:
authordefanor <defanor@uberspace.net>2018-02-23 18:32:30 +0300
committerdefanor <defanor@uberspace.net>2018-02-23 18:32:30 +0300
commitd7c6f1d025cb7b03a7d44625827a7e852df23e0e (patch)
treeda5d5ea583dccf69a58e6ba0e86ebc3866d61945 /Redland/Util.hs
parentc249c4d8a8e6dbc4c95f656973126ab5ec07df49 (diff)
downloadredland-d7c6f1d025cb7b03a7d44625827a7e852df23e0e.zip
redland-d7c6f1d025cb7b03a7d44625827a7e852df23e0e.tar.gz
redland-d7c6f1d025cb7b03a7d44625827a7e852df23e0e.tar.bz2
Fix Literal value datatype URI handling
It should be an URI, not a string.
Diffstat (limited to 'Redland/Util.hs')
-rw-r--r--Redland/Util.hs8
1 files changed, 4 insertions, 4 deletions
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)