queryAttrib :: (RDFRep r) => Text -> (Text -> a) -> r -> NMLReader (Maybe a)
queryAttrib attrib wrap n = liftM listToMaybe $
    baseQueryWrap (id,toRDF,id) pack Object (Just $ toRDF n)
                                            (Just attrib)
                                             Nothing
    where
        pack = return . wrap . unpackUNode
queryAttrib :: (RDFRep r) => Text -> (Text -> a) -> r -> NMLReader (Maybe a)
queryAttrib attrib wrap n = liftM listToMaybe $
    baseQueryWrap (id,toRDF,id) pack Object (Just $ toRDF n)
                                            (Just attrib)
                                             Nothing
    where
        pack = return . wrap . unpackUNode
queryAttrib attrib wrap n = liftM listToMaybe $
    baseQueryWrap (id,toRDF,id) pack Object (Just $ toRDF n)
                                            (Just attrib)
                                             Nothing
    where
        pack = return . wrap . unpackUNode