To res:/ or not to res:/ - that's my question

Poster Content
nk4um Moderator
Posts: 755
July 23, 2010 20:39
Hi Mircea,

There is absolutely no difference - to NK every identifer is an opaque token.  It''s only your application, or the context of your architecture that imparts meaning to the identifiers.

res:/ is used around the place as the "house default" and if it has meaning is "a generic transport neutral resource".

xrl: if you see it would typically indicate that this identifier is probably defined within an XRL execution - but is essentially meaningless.

Hope this helps.

P.
nk4um User
Posts: 26
July 23, 2010 18:44
My sample XML fragment was not included in the posting above since it was not well formed XML. Now I wrapped it in a <dummy-wrapper> tag.

<dummy-wrapper>
  <endpoint>
    <id>index4-content</id>
    <grammar>xrl:part4-content</grammar>
    <request>
      <identifier>res:/tutorial/xrl/part4/content.xml</identifier>
    </request>
  </endpoint>
  <endpoint>
    <id>index4-content-static</id>
    <grammar>res:/xrl-tutorial/part4/content-static</grammar>
    <request>
      <identifier>res:/tutorial/xrl/part4/content-static.xml</identifier>
    </request>
  </endpoint>
</dummy-wrapper>
[/xml]
nk4um User
Posts: 26
July 23, 2010 18:38To res:/ or not to res:/ - that's my question
Hi,

Please have a look at the following config XML fragment taken from a mapper overlay:



Is there any difference in the way a resource request is resolved when request''s identifier is of the form "xrl:part4-content" vs. "res:/xrl-tutorial/part4/content-static"? In other words, is the "res:/" prefix really needed or is just syntactic sugar for uniformity in the structure of resource identifiers?

Thanks,
Mircea