Re: [basex-talk] Serializing with xml-stylesheet prolog

2020-06-07 Thread Martin Honnen

Am 07.06.2020 um 10:25 schrieb Jay Straw:


I need to run a client-side stylesheet (XSLTForms, I tried it server
side, didn't work), but getting my assembled XHTML document to output
with  has been hard. After searching
https://docs.basex.org/wiki/Serialization,
http://www.w3.org/TR/xslt-xquery-serialization-31/#serparams-in-xdm-instance,
searching this list, lots of googling with prolog/declaration/other
words, I came up empty. So I tried other things.

But those other things worked poorly, and when things did come out in
the right order, with the right namespaces etc, the single page app that
worked as a standalone document, doesn't work. If I copy and paste raw
output from basex that my browser receives, put it in a new file in the
same directory, and open that in my browser it works fine. So there's
gotta be some issue with my workaround.

So I'm hoping you can tell me what I've missed in my searches, so that I
don't need a workaround :-)


Basically that is not part of the prolog, rather it is a processing
instruction https://www.w3.org/TR/xquery-31/#id-computed-pis before the
root element so you need e.g.

document {
processing-instruction xml-stylesheet { 'type="text/xsl"
href="sheet.xsl"' },
http://www.w3.org/1999/xhtml;>
...

}





[basex-talk] Serializing with xml-stylesheet prolog

2020-06-07 Thread Jay Straw
Hi,

Been a while since I've posted. Been a while since I programmed!

I need to run a client-side stylesheet (XSLTForms, I tried it server side,
didn't work), but getting my assembled XHTML document to output with
 has been hard. After searching
https://docs.basex.org/wiki/Serialization,
http://www.w3.org/TR/xslt-xquery-serialization-31/#serparams-in-xdm-instance,
searching this list, lots of googling with prolog/declaration/other words,
I came up empty. So I tried other things.

But those other things worked poorly, and when things did come out in the
right order, with the right namespaces etc, the single page app that worked
as a standalone document, doesn't work. If I copy and paste raw output from
basex that my browser receives, put it in a new file in the same directory,
and open that in my browser it works fine. So there's gotta be some issue
with my workaround.

So I'm hoping you can tell me what I've missed in my searches, so that I
don't need a workaround :-)

I haven't built anything in a few years, but I've been subscribed to this
list for many many years and you're all such a patient, wonderful lot.
Thank you all so much.

Be well,
Jay Straw