lcnetdev / marc2bibframe2

Convert MARC records to BIBFRAME2 RDF
http://www.loc.gov/bibframe/
Creative Commons Zero v1.0 Universal
88 stars 35 forks source link

In browser Marc to Bibframe (without a server) #206

Closed PhilAndrew closed 2 years ago

PhilAndrew commented 3 years ago

Hi there, I wanted to reach out since I am making a simple tool to help convert user inputs about books to Marc records here. LibraryPhil. Since all of this works within the browser as a react/typescript webpage, what would be nice is if I could add this marc2bibframe2. Then I could show the same records in bibframe. That would require that I can process the XSLT within the browser.

Do you have any ideas or suggestions on how to go about doing it? Thought I would reach out firstly before attempting to see if you have some idea.

kefo commented 3 years ago

I would take a look at Saxon-JS. I've not used it much, and not in the browser, but it should be possible.

This will help get you started: https://www.saxonica.com/saxon-js/documentation/index.html#!starting/installing

NB: you must 'compile' the stylesheet in a specific JSON format. You can find more information about that here: https://www.saxonica.com/saxon-js/documentation/index.html#!starting/export

PhilAndrew commented 2 years ago

Thanks I got it working at LibraryPhil. I made a link at the top, after entering a little book info then click the link View BibFrame 2.0 (on top right side) then it outputs the BibFrame. Not sure if its correct or not, I just hooked it up and I don't know anything at all about BibFrame yet.