diff options
Diffstat (limited to 'src/Parser.cpp')
-rw-r--r-- | src/Parser.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/Parser.cpp b/src/Parser.cpp index 42dc1bac..376bb97d 100644 --- a/src/Parser.cpp +++ b/src/Parser.cpp @@ -289,12 +289,16 @@ parse_block(Ingen::World* world, std::string type_uri; for (const Sord::URI& prototype : prototype_predicates) { - Sord::Iter i = model.find(subject, prototype, Sord::Node()); - if (!i.end() && i.get_object().type() == Sord::Node::URI) { - type_uri = relative_uri(base_uri, - i.get_object().to_string(), - false); - break; + for (Sord::Iter p = model.find(subject, prototype, Sord::Node()); !p.end(); ++p) { + const std::string prot_uri = relative_uri( + base_uri, p.get_object().to_string(), false); + if (serd_uri_string_has_scheme((const uint8_t*)prot_uri.c_str())) { + /* Ignore prototypes that are relative to this bundle, they are + blocks (probably from copy and paste), but we want files or + LV2 plugins here. */ + type_uri = prot_uri; + break; + } } } |