1

I'm trying out a tool (Elda) that uses the Jena framework for handling RDF.

I got this error:

ERROR [qtp1415899750-24] (RouterRestlet.java:332) - Exception: Line 7, column 72: com.hp.hpl.jena.iri.impl.IRIImplException: Code: 0/ILLEGAL_CHARACTER in FRAGMENT: The character violates the grammar rules for URIs/IRIs.

It says the following URL is not a valid IRI.

http://burckhardt.netseven.it/show_annotable_transcription?id=12#xpointer(start-point(string-range(//DIV[@about='http://burckhardt.netseven.it/show_annotable_transcription?id=12']/DIV[1]/BLOCKQUOTE[1]/P[1]/text()[1],'',13))/range-to(string-range(//DIV[@about='http://burckhardt.netseven.it/show_annotable_transcription?id=12']/DIV[1]/BLOCKQUOTE[1]/P[1]/text()[1],'',27)))

I know it is ugly, but as far as I understand it conforms XPointer specification... And I'm using it successfully in other environments (e.g. Sesame triplestore).

Does someone get what is wrong in it?

thank you

Christian

Eduard Florinescu
  • 16,747
  • 28
  • 113
  • 179

1 Answers1

6

According to rfc2732 the [ and ] should only be used for encoding IPv6 addresses

  1. Changes to RFC 2396

    This document updates the generic syntax for Uniform Resource Identifiers defined in RFC 2396 [URL]. It defines a syntax for IPv6 addresses and allows the use of "[" and "]" within a URI explicitly for this reserved purpose.

Since your url does not encode an IPv6 address within the []s, this is deemed an illegal URL

Attila
  • 28,265
  • 3
  • 46
  • 55
  • Exaclty, and in [rfc3986](http://www.ietf.org/rfc/rfc3986.txt) (the current URI spec) `[]` are reserved along with `: / ? # @`. RDF uses IRIs ([rfc3987](http://www.ietf.org/rfc/rfc3987.txt)), but the restriction remains. – user205512 Jun 08 '12 at 22:43
  • Note that the XPointer framework recommendation [does discuss escaping](http://www.w3.org/TR/xptr-framework/#escapingModel). – user205512 Jun 08 '12 at 22:59