diff --git a/RDFSharp/Model/Serializers/RDFXml.cs b/RDFSharp/Model/Serializers/RDFXml.cs index cd7c5277..b17f9bf5 100644 --- a/RDFSharp/Model/Serializers/RDFXml.cs +++ b/RDFSharp/Model/Serializers/RDFXml.cs @@ -939,6 +939,11 @@ private static void ParseCollectionElements(Uri xmlBase, XmlNode predNode, RDFRe //Sanitize eventual blank node or relative value, depending on attribute found elemUri.Value = ResolveRelativeNode(elemUri, xmlBase); + //Detect implicit typing of elements (node is different from rdf:Description) + if (!elem.Name.Equals(RDFVocabulary.RDF.PREFIX + ":Description", StringComparison.OrdinalIgnoreCase)) + // res -> rdf:type -> elem + result.AddTriple(new RDFTriple(new RDFResource(elemUri.Value), RDFVocabulary.RDF.TYPE, new RDFResource(elem.NamespaceURI + elem.LocalName))); + // obj -> rdf:type -> rdf:list result.AddTriple(new RDFTriple(obj, RDFVocabulary.RDF.TYPE, RDFVocabulary.RDF.LIST));