@@ -29,18 +29,17 @@ inline auto property_relative_dynamic_context() -> DynamicContext {
2929 true };
3030}
3131
32- inline auto schema_resource_id (const Context &context ,
32+ inline auto schema_resource_id (const std::vector<std::string> &resources ,
3333 const std::string &resource) -> std::size_t {
34- const auto iterator{std::find (context.resources .cbegin (),
35- context.resources .cend (),
34+ const auto iterator{std::find (resources.cbegin (), resources.cend (),
3635 sourcemeta::core::URI::canonicalize (resource))};
37- if (iterator == context. resources .cend ()) {
36+ if (iterator == resources.cend ()) {
3837 assert (resource.empty ());
3938 return 0 ;
4039 }
4140
42- return 1 + static_cast <std:: size_t >(
43- std::distance (context. resources .cbegin (), iterator));
41+ return 1 +
42+ static_cast < std::size_t >( std:: distance (resources.cbegin (), iterator));
4443}
4544
4645// Instantiate a value-oriented step with a custom resource
@@ -58,7 +57,7 @@ inline auto make_with_resource(const InstructionIndex type,
5857 {dynamic_context.keyword }),
5958 dynamic_context.base_instance_location ,
6059 to_uri (schema_context.relative_pointer , schema_context.base ).recompose (),
61- schema_resource_id (context, resource),
60+ schema_resource_id (context. resources , resource),
6261 value,
6362 {}};
6463}
@@ -85,7 +84,7 @@ inline auto make(const InstructionIndex type, const Context &context,
8584 {dynamic_context.keyword }),
8685 dynamic_context.base_instance_location ,
8786 to_uri (schema_context.relative_pointer , schema_context.base ).recompose (),
88- schema_resource_id (context, schema_context.base .recompose ()),
87+ schema_resource_id (context. resources , schema_context.base .recompose ()),
8988 std::move (value),
9089 std::move (children)};
9190}
0 commit comments