Suggesting file path display base to viewers #396
Labels
design-approved
The TC approved the design and I can write the change draft
enhancement
impact-non-breaking-change
merged
Changes merged into provisional draft.
resolved-fixed
From @kupsch:
Jim: In accordance with @michaelcfanning's feedback not to give "SHOULD" guidance to viewers, I weakened it to MAY when I transcribed your proposal here.
NOTE: This was the original proposal. See the REVISED PROPOSAL below.
PROPOSAL
Specify a distinguished property name such as
DISPLAYBASE
inrun.originalUriBaseIds
that guides viewers in displaying path names. If the value is set, consumers MAY interpret it as a hint to display URIs relative to to theDISPLAYBASE
uriBaseId
. Checking if the path is contained inDISPLAYBASE
should be done after resolving and normalizing both theDISPLAYBASE
uri
and theuri
being displayed using the algorithm in §3.14.14. If the displayed URI's scheme, authority and initial path segments matchDISPLAYBASE
, only display the remaining path segments (or '.' if there are no remaining segments). If only the scheme and authority match, display the entire absolute path. Otherwise, display the URI as an absolute URI (or in some other appropriate form such as a <uriBaseId, uri> pair).Producers SHOULD NOT use
DISPLAYBASE
as auriBaseId
inartifactLocation
s to enable a result management system, or translator to set or change the value after the fact without having to change all uses ofDISPLAYBASE
.We could reserve all
uriBaseIds
that start withSARIF_
for future use, and useSARIF_DISPLAYBASE
for the name. That allows us to define other distinguisheduriBaseId
values in future without conflicting with producer uses.EXAMPLE
Given the following
originalUriBaseIds
:All these equivalent locations below would display as
src/f.c
because the scheme, authority, and path segments prefix match:All these equivalent locations below would display as
/usr/include/stdio.h
because the scheme and authority match, but not the path:All these equivalent locations below would display as
http://www.example.com/hello
because the scheme and authority do not match:If
DISPLAYBASE
was changed toand no other changes were made, the only change to the above display URIs would be
src/f.c
would be displayed asmySoftware/src/f.c
. All other display values would be unchanged.The text was updated successfully, but these errors were encountered: