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

Strange behaviour with indentation #525

Closed
TobiasNx opened this issue Apr 12, 2024 · 2 comments · Fixed by #532
Closed

Strange behaviour with indentation #525

TobiasNx opened this issue Apr 12, 2024 · 2 comments · Fixed by #532
Assignees
Labels

Comments

@TobiasNx
Copy link
Contributor

When running the following flux:

https://gitlab.com/oersi/oersi-marc/-/blob/2-createBasicTransformation/localTestWorkflow.flux?ref_type=heads

There are more indentations added to every new record in a file.
The first (0) has a normal indentation :

<marc:collection xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd">
	<marc:record>
		<marc:leader>00000cam a2200000  4500</marc:leader>
		<marc:controlfield tag="005">20240412102249.3</marc:controlfield>
		<marc:controlfield tag="007">cr</marc:controlfield>
		<marc:datafield tag="264" ind1="#" ind2="0">
		...
	</marc:record>

</marc:collection>

the second has:

<marc:collection xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd">
		<marc:record>
			<marc:leader>00000cam a2200000  4500</marc:leader>
			<marc:controlfield tag="005">20240412102249.4</marc:controlfield>
			<marc:controlfield tag="007">cr</marc:controlfield>
			<marc:controlfield tag="008">240228t||||||||xx#|||||o|||||||||||fin||</marc:controlfield>
			...
		</marc:record>

</marc:collection>

record 14(15) has a lot:

<?xml version="1.0" encoding="UTF-8"?>
<marc:collection xmlns:marc="http://www.loc.gov/MARC21/slim" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd">
															<marc:record>
																<marc:leader>00000cam a2200000  4500</marc:leader>
																<marc:controlfield tag="005">20240412102249.6</marc:controlfield>
																<marc:controlfield tag="007">cr</marc:controlfield>
																<marc:controlfield tag="008">240228t||||||||xx#|||||o|||||||||||fin||</marc:controlfield>
																<marc:datafield tag="040" ind1="#" ind2="#">
																	<marc:subfield code="b">fin</marc:subfield>
....
															</marc:record>

</marc:collection>

Every record additional indentations are added.
I am not sure why.

@TobiasNx TobiasNx added the Bug label Apr 12, 2024
TobiasNx added a commit to TobiasNx/notWorkingFlux that referenced this issue Apr 26, 2024
@TobiasNx
Copy link
Contributor Author

TobiasNx commented Apr 26, 2024

This example cannot be run in the playground, but I have added a simple example for the runner here, that also shows the wrong indentation that it produces. This error seems to be specific for the combinantion batch-reset and encode-marcxml, when I use encode-yaml or encode-xml the error is not happening:

TobiasNx/notWorkingFlux@9321111

@TobiasNx
Copy link
Contributor Author

@dr0i you wanted a playground example, see comment above this is not possible, but I added a small example in a repo and it shows the strange behaviour.

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

Successfully merging a pull request may close this issue.

2 participants