- From: Paul Tyson <phtyson@sbcglobal.net>
- Date: Thu, 23 Jan 2025 08:48:32 -0600
- To: denis.maier@unibe.ch
- Cc: ndw@nwalsh.com, xproc-dev@w3.org
You can use <p:exec> with a base64 command from host OS. On Windows, looks like there are at least 2 options. Search for “windows convert base64” On the one hand I can see that this would be a convenient feature in xproc spec, or an implementation extension. On the other hand it is feature creep for something that xproc writers can do themselves. Regards, —Paul > On Jan 23, 2025, at 06:17, denis.maier@unibe.ch wrote: > > Ok, so there's no out-of-the box way to do this with vanilla xpath/xslt, but I should look into the EXPath Binary module then... This page http://expath.org/modules/binary/implems claims that saxon is going to implement the module, and it looks like this is indeed already the case, but needs Saxon PE: https://www.saxonica.com/html/documentation12/functions/expath-binary/encode-string.html > > Best, > Denis > >> -----Ursprüngliche Nachricht----- >> Von: Paul Tyson <phtyson@sbcglobal.net> >> Gesendet: Mittwoch, 22. Januar 2025 17:32 >> An: Norm Tovey-Walsh <ndw@nwalsh.com> >> Cc: Maier, Denis Christian (UB) <denis.maier@unibe.ch>; xproc-dev@w3.org >> Betreff: Re: base64 >> >> [Sie erhalten nicht häufig E-Mails von phtyson@sbcglobal.net. Weitere >> Informationen, warum dies wichtig ist, finden Sie unter >> https://aka.ms/LearnAboutSenderIdentification ] >> >> Many years ago I wrote a step to insert base64 html into a SOAP document to >> upload to sharepoint. I used <p:exec command=“base64”>, running on a Linux >> host. >> >> I either didn’t know about or couldn’t use expath binary module, which would >> probably be easier and more portable. >> >> Best, >> —Paul >> >>>> On Jan 22, 2025, at 10:19, Norm Tovey-Walsh <ndw@nwalsh.com> wrote: >>> >>> <denis.maier@unibe.ch> writes: >>>> I have a project where I produce about 200 HTML files that will have to >> uploaded to our Open Monograph Press installation. Of course, I’d prefer to >> automate this if possible. OMP support a native XML format that allows you >> to embed the individual files in base64 encoding. >>> >>> I’m trying to work out if I understand the format. >>> >>> You take a document, you serialize it, you base64 encode it, and then you >> embed that base64 encoded string into some sort of Open Monograph Press >> XML manifest XML vocabulary? Something like: >>> >>> <submission> >>> <document id="thing1">base64encodedblob</document> >>> <document id="thing2">anotherbase64encodedblob</document> >>> </submission> >>> >>> (The exact elements and metadata aren’t really my question, I’m just >>> trying to see if I understand the general structure.) >>> >>>> It looks like there have been some solution that worked with XSLT, but it >> looks like there have been some changes. >>> >>> With Saxon PE in Oxygen, I wouldn’t be surprised if you can do this with >> some combination of serialization and some EXPath function, but I’ve never >> tried. >>> >>>> P.S.: I know this is not exactly an xproc question, so maybe there’s a better >> place to ask. But I thought the communities overlap enough to justify asking >> the question here. And maybe there’s even something xproc can do here. >>> >>> It’s a completely fine question. >>> >>> Be seeing you, >>> norm >>> >>> -- >>> Norm Tovey-Walsh <ndw@nwalsh.com> >>> >> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fnorm >>> .tovey- >> walsh.com%2F&data=05%7C02%7Cdenis.maier%40unibe.ch%7C80b9ad305 >> 9 >>> >> 1f4a00041308dd3b025704%7Cd400387a212f43eaac7f77aa12d7977e%7C >> 1%7C0%7C63 >>> >> 8731603423317934%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiO >> nRydWUsIlYiO >>> >> iIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7 >> C0%7C >>> >> %7C%7C&sdata=VTZHXQMXkt5dSElQL14Ex%2B6gFiBqsB%2Fr4FjqkK%2BK87 >> w%3D&rese >>> rved=0 >>> >>>> DNA neither cares nor knows. DNA just is. And we dance to its >>>> music.--Richard Dawkins >>> >> >
Received on Thursday, 23 January 2025 14:48:54 UTC