Stream: implementers
Topic: Questionnaire versioning with canonical URL
Justin Jones (Aug 05 2021 at 22:15):
I'm trying to figure out how canonical URL's work with versioning. We will have a Questionnaire that has id of PHQ-9 however as the form progresses it will have different versions.
When creating a QuestionnaireResponse and fill out the questionnaire property would it be "Questionnaire/PHQ-9:{VERSION}"?
Just trying to wrap my head around canonical URL's and how they are handled with different versions (multiple Questionnaire's will have the same canonical URL, just different version)
Lloyd McKenzie (Aug 05 2021 at 22:36):
As per this section on canonical references, the syntax would be "http://somewhere.org/Questionnaire/PHQ-9|Someversion". Canonical URLs must always be full URIs, they can't be relative. The separator between URI and version is "|"
Justin Jones (Aug 05 2021 at 22:41):
So Questionnaire.url will be "http://somewhere.org/Questionnaire/PHQ-9"? And then when referencing it from the QuestionnaireResponse.questionnaire that's when we add the |Someversion?
Lloyd McKenzie (Aug 05 2021 at 23:01):
Correct. If you want to reference a specific version (which is a good idea), you concatenate Questionnaire.url and Questionnaire.version with '|' as a separator.
Cooper Thompson (Sep 07 2021 at 19:25):
Is there somewhere in the spec where we call out that canonical URLs can't be relative? I think it make sense to me why they can't be relative, but I couldn't find a spec reference either for or against it. We just point out to xs:anyURI, and that mentions relative URIs but I can't really tell what it is trying to convey there.
Eric Haas (Sep 07 2021 at 19:58):
what is a relative URI, from what I read is everything after the ":"
Lloyd McKenzie (Sep 07 2021 at 20:20):
I'm not sure it's made explicit anywhere. However, the whole point of a canonical URL is that it remains consistent across servers. Anything short of a full URL wouldn't be safe for that purpose. Feel free to submit a change request if you feel it's necessary @Cooper Thompson.
Last updated: Apr 12 2022 at 19:14 UTC