Hello.

I am working on a custom RDF writer and encountered a few issues when
using some Jena classes. I wanted to check whether these are bugs or
as-designed.

Here are the issues:

   - PrefixMapAdapter.abbrev(String uriStr) returns a Pair that simply
   holds the two parts of the passed in uriStr, the URI and the local name. It
   should be returning a Pair holding the appropriate prefix and the local
   name.
   - PrefixMapBase.abbreviate(String uriStr) has an extraneous call to
   PrefixLib.abbreviate(PrefixMap prefixes, String uriStr).
   - EscapeStr.stringEsc(AWriter out, String s, char quoteChar, boolean
   singleLineString, CharSpace charSpace) does not escape a quote character
   when it is the last character (and not the third of three consecutive
   quotes) in a "multi-line" string that is being delimited with triple
   quotes. The resulting delimited and escaped string will then end with 4 or
   5 unescaped quotes. This causes problems when the string is read and
   "unescaped" by a parser. That is, the resulting string will be missing its
   final quote (or two quotes) and the dangling fourth quote (or fourth and
   fifth quotes) will likely trigger a subsequent parse error.
   - NodeFormatterTTL_MultiLine.formatLitLang(AWriter w, String lex, String
   langTag) always delimits "single line" strings with double quotes;
   unlike formatLitString(AWriter w, String lex), which will delimit strings
   with single quotes if the string contains any double quotes (but not any
   single quotes).
   - NodeFormatterTTL_MultiLine.writeLiteralLongForm(AWriter w, String lex,
   String datatypeURI) has the same problem.

Are these bugs? Or am I misunderstanding?

Thanks!
Brian

Reply via email to