Re: List of stylesheet parameters?
Michael Kay <mike-JkSD5nQpfvpWk0Htik3J/[email protected]> Thu, 18 Nov 2021 12:00:25 +0000
| Newsgroups | gmane.text.xml.saxon.help |
|---|---|
| Message-ID | <[email protected]> |
--===============5956259940999785749== Content-Type: multipart/alternative; boundary="Apple-Mail=_F56AFD36-ADD2-4FA4-9F00-FFDA3224581A" --Apple-Mail=_F56AFD36-ADD2-4FA4-9F00-FFDA3224581A Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 As for the run-time values of global parameters, they are held in a = GlobalParameterSet object within the Controller, but this isn't directly = exposed. You can get the value for a specific parameter using = context.getController().getParameter() -- which you could of course wrap = in an extension function -- but there's no obvious way of getting the = full set. 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=_F56AFD36-ADD2-4FA4-9F00-FFDA3224581A 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"">As = for the run-time values of global parameters, they are held in a = GlobalParameterSet object within the Controller, but this isn't directly = exposed. You can get the value for a specific parameter using = context.getController().getParameter() -- which you could of course wrap = in an extension function -- but there's no obvious way of getting the = full set.<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=_F56AFD36-ADD2-4FA4-9F00-FFDA3224581A-- --===============5956259940999785749== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============5956259940999785749== 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 --===============5956259940999785749==--