core-wg / href

Other
2 stars 0 forks source link

Reference resolution section: instructions may be incorrect? #31

Closed thomas-fossati closed 2 years ago

thomas-fossati commented 2 years ago

Given the following:

the resolved reference would be [-2, ["a"]], right?

If so, I am not sure how following 1-5 in Section 5.3 this can be achieved. In particular, what would prompt us to drop path, query and fragment from the base?

(See also how my code attempts at translating the prose from Section 5.3.)

chrysn commented 2 years ago

The discard value, even though not serialized when there is a scheme and/or authority, is implicitly DISCARD-ALL (true) in item 3 of 5.3. This is due to section 5.1 ("which in CRI references never carry a discard section (the value of discard defaults to true)."), but could be made a bit more explicit there, eg. with

If the value of discard is true in the CRI reference (which is implicitly the case when scheme and authority are present in the reference), ..."

thomas-fossati commented 2 years ago

The discard value, even though not serialized when there is a scheme and/or authority, is implicitly DISCARD-ALL (true) in item 3 of 5.3. This is due to section 5.1 ("which in CRI references never carry a discard section (the value of discard defaults to true)."), but could be made a bit more explicit there, eg. with

If the value of discard is true in the CRI reference (which is implicitly the case when scheme and authority are present in the reference), ..."

Thanks @chrysn for the clarification. I reckon the text you proposed would be a useful addition.