From: Colin P. A. <co...@co...> - 2007-09-01 17:46:43
|
I have just written a class XM_STDIN_URI_RESOLVER, which resolves URIs of the form stdin:[#fragment-identifier] to the standard input stream. The source for the `resolve' routine looks like this: resolve (a_uri: UT_URI) is -- Resolve file URI. do if not a_uri.is_absolute then last_error := STRING_.concat (Valid_uri_message, a_uri.full_reference) elseif a_uri.has_authority then last_error := STRING_.concat (Valid_uri_message, a_uri.full_reference) -- commented out as it fails: elseif not a_uri.has_absolute_path then -- last_error := STRING_.concat (Valid_uri_message, a_uri.full_reference) elseif not a_uri.path_items.is_empty then last_error := STRING_.concat (Valid_uri_message, a_uri.full_reference) elseif a_uri.has_query then last_error := STRING_.concat (Valid_uri_message, a_uri.full_reference) else last_stream := std.input if last_stream.is_open_read then last_error := Void else last_error := "Standard input is closed" end end end The reason for the commented out lines is that has_absolute_path is a postcondition of {UT_URI}.make_absolute, but gexslt is calling {UT_URI}.make_resolve (or make_resolve_uri) with an argument of "stdin:" (which ought to be equivalent to call make_absolute ("stdin"), and this fails, so I commented it out. Franck, can you explain the inconsistency? -- Colin Adams Preston Lancashire |