On 15/08/2019 13:02, Claude Warren wrote:
Learn something new every day...

On Wed, Aug 14, 2019 at 5:44 PM Andy Seaborne <a...@apache.org> wrote:




(and it is technically wrong to have a # in the base)


so as a base "http://example.com/myfile.txt#"; is incorrect but "
http://example.com/myfile.txt/"; is correct?

Legal.

They are completely different URIs. "/" means something in http URIs.

Fragments are within the document named.
Base URIs are like HTTP requests which also do not have a fragement,

Resolving <one> against base URIs:

  http://example/dir/
  http://example/dir/file

and it's the same outcome.

http://example/dir/one

https://twitter.com/AndySeaborne/status/1156227576257482754

RFC 3986, section 5.2

5.2.3 - "Base.fragment" is not mentioned.

Jena does cope with # in the base - it drops it as per 5.2, 5.2.3

The only assignment is

T.fragment = R.fragment

(R being the relative URI being resolved, T the output)

Relative <#one> gives:

  http://example/dir/#one
  http://example/dir/file#'one



or technically does the last segment of the base need to be an NCName[1]?

"need" - no.

NCName is an XML-ism.

For RDF/XML it is a good idea - classes and properties can end up as XML qnames.



in which case "http://example.com/myfile.txt"; but not "
http://example.com/myfile.txt#"; or "http://example.com/myfile.txt/";

How does one create a technically correct base that will convert
<one>
to

<one> can't become <http://example.com/myfile.txt#one>

Resolution can't introduce a fragment that isn't in the relative URI to start with. <#one> works.

<http://example.com/myfile.txt#one>
or
<http://example.com/myfile.txt/one>

?  Or is that just not possible?

Thx,
Claude


[1] https://www.w3.org/TR/xml-names/#NT-NCName


Reply via email to