Re: absolute/relative URIs in PS (was Re: Lexing RIF PS)

I agree with Hassan that IRIs (as opposed to CURIs) should be explicitly 
delimited in the PS to simplify parsing.

I also agree with Sandro that the PS parser should not resolve relative 
IRIs but pass then in the XML.

If you do need an IRI checker/resolver for some reason then Jena 
includes an iri.jar which is available as a separate download and is 
rather more comprehensive and up to date wrt the IRI specs than the Java 
URI code (at least 1.4 code) [*].

Dave

[*] At least according to Jeremy, the author of the IRI package.

Hassan Ait-Kaci wrote:
> Sandro wrote:
> 
>  > (And yes, I would expect every modern language to have a URI parsing
>  > toolkit.  Python certainly does, and I think SWI Prolog does, too.)
> 
> I never argued that URI parsing was hard - that was not my point at all
> - I could use e.g., http://java.sun.com/j2se/1.4.2/docs/api/index.html
> in Java. It is just that the way things are set up in the definition of
> the BLD PS, the tokenizer must *parse* all identifiers in order to
> determine this. While this is potentially envisageable if URI's are
> contained within quotes, the fact is that a tokenizer cannot decide,
> whether reading a ':' or '/' or '.', say, is part of a URI or not when
> not within quotes.
> 
> Personally I don't care one way or the other - it is just that we
> must be aware of the level of complications that we introduce for
> parsing what is after all only a Spartan syntax - i.e., taht of a
> *simple*  bare-bone rule pseudo-language ("pseudo" because it is only
> meant to ease our writing RIF examples - i.e., a far cry from a real RL).
> 
> My CDN $.02...
> 
> -hak
> --
> Hassan Aït-Kaci  *  ILOG, Inc. - Product Division R&D
> http://koala.ilog.fr/wiki/bin/view/Main/HassanAitKaci
> 
> 
> 
> -----Original Message-----
> From: Sandro Hawke [mailto:sandro@w3.org]
> Sent: Tue 9/23/2008 9:20 PM
> To: Axel Polleres
> Cc: Hassan Ait-Kaci; RIF WG
> Subject: absolute/relative URIs in PS (was Re: Lexing RIF PS)
> 
> 
>  >  > This, unfortunately again, requires that any lexical analyzer for the
>  >  > RIF PS include complete IRI parser - which I am not willing to invest
>  >  > any effort in at this nor any near future time.
>  >
>  > Ok, I agree with your assessment that for relative IRI resolution the
>  > relative IRI needs to be parsed. but do you imply any consequences?
>  > Do you suggest we don't support relative IRIs?
>  >
>  > Many other standards do, actually, I would be surprised if not
>  > off-the-shelf libraries were available which support relative IRI/URI
>  > resolution.
>  >
>  > Maybe somebody else in the group from the more XML end can add some=
>  > hints here?
> 
> Where do you need to look inside IRIs, in going between the PS and XML?
> I would consider it incorrect to change the IRIs during this conversion,
> even it was just making IRIs absolute, etc, so I'd think they should be
> considered entirely opaque during this translation.
> 
> In going from XML to native language, you'll need to do conversion to
> absolute URIs, but not in dealing with the PS..... (I think).
> 
> (And yes, I would expect every modern language to have a URI parsing
> toolkit.  Python certainly does, and I think SWI Prolog does, too.)
> 
>     -- Sandro
> 

Received on Wednesday, 24 September 2008 10:36:49 UTC