[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: RE: [xri] iquery, ifragment and xref
I’m confused now. Section 2.3.2 says “To avoid this type of misinterpretation, certain characters in a cross-reference must be percent-encoded when transforming an XRI reference into IRI-normal form.” This seems to be about the rules for an XRI reference in IRI-normal form.
I’m talking about an XRI reference in XRI normal form. If I would like to embed an XRI “xri://=foo/bar#baz” in a cross reference to become:
That is legal according to the XRI syntax, but the parser (or rather the lexer component of) has a hard time recognizing the final “)” as belonging to the enclosing cross reference because when it encounters the “#”, it is consuming “ifragment” characters, which expands out to *(ipchar / “/” / “?”) in the syntax. Since “)” is part of “ipchar”, it could belong to the fragment.
The workaround I’m doing right now is to use xri-pchar instead of pchar in in iquery and ifragment, essentially creating two new productions: xri-query and xri-fragment, which is at odds with 2.2.4 and 2.2.5.