Sort subjects and properties in toRDF.