+ path, Some (T.Inline (b, k, Filename.concat in_base_uri s, p, f))
+ | T.Include s ->
+ begin
+ try path, Some (T.Include (List.assoc s st.requires))
+ with Not_found -> path, None
+ end
+ | T.Coercion (b, obj) ->
+ let str = get_coercion st obj in
+ if str <> "" then path, Some (T.Coercion (b, str)) else
+ let base_uri = if b then out_base_uri else in_base_uri in
+ let s = obj ^ G.string_of_inline_kind T.Con in
+ path, Some (T.Coercion (b, Filename.concat base_uri s))
+ | T.Section (b, id, _) as item ->
+ let path = if b then id :: path else List.tl path in
+ path, Some item
+ | item -> path, Some item
+ in
+ let set_includes st name =
+ try require st name (List.assoc name st.includes)
+ with Not_found -> ()