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

encode-marcxml should output leader as first element, all controlfield after that and then all datafields after that #548

Open
TobiasNx opened this issue Jul 3, 2024 · 4 comments · Fixed by #549
Assignees
Labels

Comments

@TobiasNx
Copy link
Contributor

TobiasNx commented Jul 3, 2024

With the last release encode-marcxml outputs the leader as last element, it should be the first.
See: https://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd

<xsd:complexType name="recordType" id="record.ct">
<xsd:sequence minOccurs="0">
<xsd:element name="leader" type="leaderFieldType"/>
<xsd:element name="controlfield" type="controlFieldType" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="datafield" type="dataFieldType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attribute name="type" type="recordTypeType" use="optional"/>
<xsd:attribute name="id" type="idDataType" use="optional"/>
</xsd:complexType>
@TobiasNx TobiasNx added the Bug label Jul 4, 2024
@TobiasNx TobiasNx changed the title encode-marcxml should output leader as first element encode-marcxml should output leader as first element, all controlfield after that and then all datafields after that Jul 4, 2024
@dr0i
Copy link
Member

dr0i commented Jul 12, 2024

I get that the marc:leader has to be the first element and implemented that in #549.
I don't get your second comment "Idea for tests", though. Especially, the marc:leader has just always to be emitted first - which it does with #549 , regardless of the setting of ensureCorrectMarc21Xml="true".

@dr0i dr0i self-assigned this Jul 12, 2024
@dr0i dr0i closed this as completed in #549 Jul 12, 2024
@dr0i
Copy link
Member

dr0i commented Jul 12, 2024

Have a look @TobiasNx after your vacation.

@dr0i
Copy link
Member

dr0i commented Jul 15, 2024

Did the functional review together with @maipet . Looks good, structurally, but indentation is not pretty. As this is merely an aesthetic thing we will build the new release upon this.
Opened #550.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants