https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43694

--- Comment #1 from Phan Quang Minh <[email protected]> ---
Correction to my own report, after testing the patch on bug 43674 against our
implementation.

I wrote that a conformant receiver rejects an out-of-order message at parse
time. That
is too strong, and in our case it was wrong.

Retesting with the same message content in two element orders:

  - correct schema order  -> our parser reads it; XSD validation passes
  - scrambled order       -> our parser still reads it, with no data loss;
                             XSD validation fails

So .NET's XmlSerializer, which is what our implementation uses, matches child
elements
by name and tolerates sequence violations. A validating parser does reject the
message —
XSD validation fails exactly as described — but a receiver that only
deserialises will
not notice.

I also traced what actually broke our first exchange with Koha, which I
attributed to
ordering in the original report. It was the timestamp format, not the order:

    <timestamp>2026-09-30 10:23:41</timestamp>

A space instead of T, and no timezone, so not a valid xs:dateTime. That one
does throw
on deserialisation and does fail XSD validation. Ordering was a red herring in
the
failure I described.

What still stands, and why I think this is worth fixing anyway:

  - The XML Koha emits is objectively schema-invalid, verifiably so against the
official
    XSD, and invalid differently on each run.
  - Any partner that validates against the schema — which is a reasonable thing
for an
    ILL system to do, and arguably what Koha should do to its own output — will
reject
    the message, intermittently.
  - A defect that appears and disappears between runs is expensive for whoever
meets it
    next. We only found it because we were looking at the XML rather than at
whether the
    exchange happened to work.

The reproduction script in the original report is unaffected: five runs still
produce
five different element orders.

Sorry for the overstated impact claim.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to