--Thanks for this. Very helpful I was able to validate that the field available_objects.resource_type is the same as the metadata field learningResourceType in the manifest file.
--Sharing my queries:
select internal_id, object_id,
(xpath('/imscp:manifest/imscp:metadata/lom:lom/lom:educational/lom:learningResourceType/lom:value/text()', manifest::xml, ARRAY[ARRAY['lom', 'http://ltsc.ieee.org/xsd/LOM'],
ARRAY['imscp', 'http://www.imsglobal.org/xsd/imscp_v1p1'] ]))[1]:: text learningResourceType
from available_objects
where (xpath('/imscp:manifest/imscp:metadata/lom:lom/lom:educational/lom:learningResourceType/lom:value/text()', manifest::xml, ARRAY[ARRAY['lom', 'http://ltsc.ieee.org/xsd/LOM'],
ARRAY['imscp', 'http://www.imsglobal.org/xsd/imscp_v1p1'] ]))[1]:: text like '%Sound%'
or
(xpath('/imscp:manifest/imscp:metadata/lom:lom/lom:educational/lom:learningResourceType/lom:value/text()', manifest::xml, ARRAY[ARRAY['lom', 'http://ltsc.ieee.org/xsd/LOM'],
ARRAY['imscp', 'http://www.imsglobal.org/xsd/imscp_v1p1'] ]))[1]:: text like '%Moving%'
Same as
select object_id, name, resource_type, start_file
from available_objects
where (resource_type like '%Moving%' or resource_type like '%Sound%')
select internal_id, object_id,
(xpath('/imscp:manifest/imscp:metadata/lom:lom/lom:classification/lom:taxonPath/lom:taxon/lom:entry[lom:string="Studies of Society and Environment"]/lom:string/text()', manifest::xml, ARRAY[ARRAY['lom', 'http://ltsc.ieee.org/xsd/LOM'],
ARRAY['imscp', 'http://www.imsglobal.org/xsd/imscp_v1p1'] ])) :: text
from available_objects
where object_id like 'S%'
and
(xpath('/imscp:manifest/imscp:metadata/lom:lom/lom:classification/lom:taxonPath/lom:taxon/lom:entry[lom:string="Studies of Society and Environment"]/lom:string/text()', manifest::xml, ARRAY[ARRAY['lom', 'http://ltsc.ieee.org/xsd/LOM'],
ARRAY['imscp', 'http://www.imsglobal.org/xsd/imscp_v1p1'] ])) :: text like '%Studies of Society and Environment%'
order by object_id