Re: List of stylesheet parameters?
Michael Kay <mike-JkSD5nQpfvpWk0Htik3J/[email protected]> Thu, 18 Nov 2021 11:52:00 +0000
| Newsgroups | gmane.text.xml.saxon.help |
|---|---|
| Message-ID | <[email protected]> |
--===============0625719147999915302== Content-Type: multipart/alternative; boundary="Apple-Mail=_B5DE63EF-A1AF-44C4-AD60-393A4342EF1D" --Apple-Mail=_B5DE63EF-A1AF-44C4-AD60-393A4342EF1D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 There's net.sf.saxon.s9api.XsltExecutable.getGlobalParameters() which = gives the information at the Java level. You could wrap that in an = extension function, or copy the details as a map and pass it into the = stylesheet. Michael Kay Saxonica > On 17 Nov 2021, at 19:15, Graydon Saunders <[email protected]> = wrote: >=20 > Hello! >=20 > I am pretty sure there isn't a way to do this, but maybe I'm wrong. >=20 > In current Saxon -- 10.* -- using XSLT 3.0, is there some way to get a = list of the stylesheet parameters? =20 >=20 > The intent is to then check that they all have values assigned, since = one of the ways the "call this stylesheet" step of the processing chain = fails is "oops, that needs a value". There's an extension function, = saxon:tunnel-params(), that would be just the thing if it were = saxon:in-scope-params(). >=20 > (If not, an explicit list of parameters will work. I am hoping for a = more elegant solution.) >=20 > Thanks! >=20 > --- > Graydon Saunders | [email protected] <mailto:[email protected]> > =C3=9E=C3=A6s ofer=C3=A9ode, =C3=B0isses sw=C3=A1 m=C3=A6g. > -- Deor ("That passed, so may this.") > _______________________________________________ > saxon-help mailing list archived at http://saxon.markmail.org/ > [email protected] > https://lists.sourceforge.net/lists/listinfo/saxon-help --Apple-Mail=_B5DE63EF-A1AF-44C4-AD60-393A4342EF1D Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; = charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; line-break: after-white-space;" = class=3D"">There's = net.sf.saxon.s9api.XsltExecutable.getGlobalParameters() which gives the = information at the Java level. You could wrap that in an extension = function, or copy the details as a map and pass it into the = stylesheet.<div class=3D""><br class=3D""></div><div class=3D"">Michael = Kay</div><div class=3D"">Saxonica<br class=3D""><div><br = class=3D""><blockquote type=3D"cite" class=3D""><div class=3D"">On 17 = Nov 2021, at 19:15, Graydon Saunders <<a = href=3D"mailto:[email protected]" = class=3D"">[email protected]</a>> wrote:</div><br = class=3D"Apple-interchange-newline"><div class=3D""><div dir=3D"ltr" = class=3D""><div class=3D"gmail_default" = style=3D"font-size:small">Hello!<br class=3D""></div><div = class=3D"gmail_default" style=3D"font-size:small"><br = class=3D""></div><div class=3D"gmail_default" style=3D"font-size:small">I = am pretty sure there isn't a way to do this, but maybe I'm = wrong.</div><div class=3D"gmail_default" style=3D"font-size:small"><br = class=3D""></div><div class=3D"gmail_default" style=3D"font-size:small">In= current Saxon -- 10.* -- using XSLT 3.0, is there some way to get a = list of the stylesheet parameters? </div><div = class=3D"gmail_default" style=3D"font-size:small"><br = class=3D""></div><div class=3D"gmail_default" = style=3D"font-size:small">The intent is to then check that they all have = values assigned, since one of the ways the "call this stylesheet" step = of the processing chain fails is "oops, that needs a value". = There's an extension function, saxon:tunnel-params(), that would be just = the thing if it were saxon:in-scope-params().</div><div = class=3D"gmail_default" style=3D"font-size:small"><br = class=3D""></div><div class=3D"gmail_default" = style=3D"font-size:small">(If not, an explicit list of parameters will = work. I am hoping for a more elegant solution.)</div><div = class=3D"gmail_default" style=3D"font-size:small"><br = class=3D""></div><div class=3D"gmail_default" = style=3D"font-size:small">Thanks!</div><div class=3D"gmail_default" = style=3D"font-size:small"><br class=3D""></div><div = class=3D"gmail_default" style=3D"font-size:small">---<br = class=3D"">Graydon Saunders | <a = href=3D"mailto:[email protected]" = class=3D"">[email protected]</a><br class=3D"">=C3=9E=C3=A6s = ofer=C3=A9ode, =C3=B0isses sw=C3=A1 m=C3=A6g.<br class=3D"">-- Deor = ("That passed, so may this.")<br class=3D""></div></div> _______________________________________________<br class=3D"">saxon-help = mailing list archived at <a href=3D"http://saxon.markmail.org/" = class=3D"">http://saxon.markmail.org/</a><br class=3D""><a = href=3D"mailto:[email protected]" = class=3D"">[email protected]</a><br = class=3D"">https://lists.sourceforge.net/lists/listinfo/saxon-help = </div></blockquote></div><br class=3D""></div></body></html>= --Apple-Mail=_B5DE63EF-A1AF-44C4-AD60-393A4342EF1D-- --===============0625719147999915302== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============0625719147999915302== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ [email protected] https://lists.sourceforge.net/lists/listinfo/saxon-help --===============0625719147999915302==--