Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SPARQLResultsTSVWriter to quote xsd:string literals #5262

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hmottestad
Copy link
Contributor

@hmottestad hmottestad commented Feb 27, 2025

Related to #5256

Update SPARQLResultsTSVWriter to ensure all xsd:string literals are quoted in SPARQL TSV results.

  • Modify writeLiteral method to always quote xsd:string literals.
  • Remove conditions that allowed xsd:string literals to be written without quotes.
  • Ensure special characters in xsd:string literals are properly escaped using encodeString method.
  • Update tests in SPARQLTSVCustomTest to verify correct quoting of xsd:string literals and proper escaping of special characters.

For more details, open the Copilot Workspace session.

Related to eclipse-rdf4j#5256

Update `SPARQLResultsTSVWriter` to ensure all `xsd:string` literals are quoted in SPARQL TSV results.

* Modify `writeLiteral` method to always quote `xsd:string` literals.
* Remove conditions that allowed `xsd:string` literals to be written without quotes.
* Ensure special characters in `xsd:string` literals are properly escaped using `encodeString` method.
* Update tests in `SPARQLTSVCustomTest` to verify correct quoting of `xsd:string` literals and proper escaping of special characters.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/eclipse-rdf4j/rdf4j/issues/5256?shareId=XXXX-XXXX-XXXX-XXXX).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant