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

Log a hint if handle-generic-xml doesn't find a record so that the user knows to configure "recordtagname" #497

Closed
dr0i opened this issue Sep 15, 2023 · 5 comments · Fixed by #563

Comments

@dr0i
Copy link
Member

dr0i commented Sep 15, 2023

Working on a LIDO document an unconfigured handle-generic-xml flux command doesn't yield anything.
This could somehow be configured to be logged ? -The user should be hinted to configure (recordtagname="lido").
(problem surfaced in the SWIB23 Metafacture workshop)

@dr0i dr0i added this to Metafacture Sep 15, 2023
@dr0i dr0i moved this to Backlog in Metafacture Sep 15, 2023
@dr0i dr0i changed the title Log a hint if handle-marcxml doesn't find a record so that the user knows to configure "recordtagname" Log a hint if handle-generic-xml doesn't find a record so that the user knows to configure "recordtagname" Sep 18, 2023
@dr0i dr0i self-assigned this Nov 5, 2023
@dr0i dr0i moved this from Backlog to Ready in Metafacture Nov 5, 2023
@dr0i dr0i moved this from Ready to Selected in Metafacture Apr 29, 2024
@dr0i dr0i moved this from Selected to Working in Metafacture Sep 6, 2024
@dr0i
Copy link
Member Author

dr0i commented Sep 6, 2024

Thinking about this, some thoughts surfaced:

  1. If there would be logs they wouldn't be helpful for e.g. playground. One would have to throw an Exception (playground can display that) but it would be disputable to throw an exception only because (one) record in the stream didn't yield any data
  2. So it may be better to improve the documentation, i.e. the flux-commands.md , to point out the importance of the recordtagname, possibly noting the lido example
  3. we also could provide Handlers of their own, like the CGXmlHandler, i.e. a LidoXmlHandler
  4. we could implement LidoXmlHandler just wrapping GenericXmlHandler and setting the proper recordtagname as a convenient shortcut (no need to set a parameter when using GenericXmlHandler instead)
  5. the playground could evaluate the flux and, by finding the usage of handle-generic-xml, printing a note in the Result window, like "If you see this text here after clicking process obviously the result was empty. As you use handle-generic-xml this may be caused by a wrong recordtagname . The default one is record, which couldn't be found in the data. Have a look at the flux-commands.md". Something like this.

WDYT @blackwinter @TobiasNx @fsteeg @maipet ?

I like the generic approach (2) by giving more examples ([onix](url), lido, maybe some more). And would like to see later (5) as a more dynamic help.

@dr0i dr0i moved this from Working to Review in Metafacture Sep 6, 2024
@TobiasNx
Copy link
Contributor

TobiasNx commented Sep 6, 2024

Your suggestion 2: Sound good to me! +1

@blackwinter
Copy link
Member

Option 2) is certainly the least intrusive 👍

@blackwinter blackwinter removed their assignment Sep 6, 2024
@fsteeg
Copy link
Member

fsteeg commented Sep 6, 2024

+1 for 2)

@fsteeg fsteeg removed their assignment Sep 6, 2024
@maipet
Copy link

maipet commented Sep 9, 2024

+1 for opt 2

@maipet maipet removed their assignment Sep 9, 2024
@fsteeg fsteeg unassigned dr0i Sep 23, 2024
@TobiasNx TobiasNx moved this from Selected to Review in Metafacture Oct 9, 2024
@TobiasNx TobiasNx assigned dr0i and unassigned TobiasNx Oct 9, 2024
@dr0i dr0i removed their assignment Oct 14, 2024
@dr0i dr0i closed this as completed in #563 Oct 17, 2024
@github-project-automation github-project-automation bot moved this from Review to Done in Metafacture Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants