Skip to content

xsd:double serialization is non-canonical and inconsistent across output formats #1445

Closed

Description

@aaj3f

Three different lexical forms today: SPARQL-JSON/XML render Rust Display ("1000000"), native CSV/TSV renders ryu ("1000000.0"), N-Triples/N-Quads export renders {:E} ("1E6" — missing the mandatory mantissa dot). The XSD canonical form is "1.0E6".

Fix: one shared canonical_xsd_double helper routed through sparql.rs, sparql_xml.rs, delimited.rs, LiteralValue::lexical(), and export.rs:1236/:1465; JSON-LD numeric output stays a native JSON number (deliberate). User-visible output change — changelog note for downstream string-matchers; R2RML/Iceberg lexical() consumers flagged. Roadmap PR-L2.

Found and verified by the W3C SPARQL burn-down audit (PR #1437; docs/audit/burn-down/ROADMAP.md §5 on branch test/sparql-testsuite-full-coverage).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions