2012-06-08 26 views
1

我正在嘗試使用Jena框架來處理RDF的工具(Elda)。Xpointer是一個無效的IRI?

我得到這個錯誤:

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.

它說,下面的網址是不是一個有效的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)))

我知道這是醜陋的,但據我瞭解它遵循的XPointer規範...... 而且我成功地用它在其它環境中(例如芝麻triplestore)。

有人得到它有什麼問題嗎?

謝謝

基督教

回答

6

根據rfc2732[]應僅用於編碼IPv6地址

  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.

由於您的網址不編碼[]秒鐘內IPv6地址,這被視爲非法URL

+0

Exaclty,並在[rfc3986](http:// www .ietf.org/rfc/rfc3986.txt)(當前的URI規範)'[]'與':/? #@'。 RDF使用IRI([rfc3987](http://www.ietf.org/rfc/rfc3987.txt)),但限制依然存在。 – user205512

+0

請注意,XPointer框架建議[沒有討論轉義](http://www.w3.org/TR/xptr-framework/#escapingModel)。 – user205512

相關問題