Re: List of stylesheet parameters?
Graydon Saunders <[email protected]> Thu, 18 Nov 2021 20:33:48 -0500
| Newsgroups | gmane.text.xml.saxon.help |
|---|---|
| Message-ID | <CAO3ciQG0UtdVVYBq6h-ppQzEiPdWejXdUBzWJvcE=FV02Jj-dw@mail.gmail.com> |
--===============0975304019492536967== Content-Type: multipart/alternative; boundary="000000000000ecd4f405d11a44e8" --000000000000ecd4f405d11a44e8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Appreciate the definitive and detailed answer. Specific knowledge of the params it is! On Thu, Nov 18, 2021 at 7:21 AM Michael Kay <mike-JkSD5nQpfvpWk0Htik3J/[email protected]> wrote: > 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 s= et. > > Michael Kay > Saxonica > > On 17 Nov 2021, at 19:15, Graydon Saunders <[email protected]> wrote: > > Hello! > > I am pretty sure there isn't a way to do this, but maybe I'm wrong. > > In current Saxon -- 10.* -- using XSLT 3.0, is there some way to get a > list of the stylesheet parameters? > > 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(). > > (If not, an explicit list of parameters will work. I am hoping for a mor= e > elegant solution.) > > Thanks! > > --- > Graydon Saunders | [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 > > > _______________________________________________ > saxon-help mailing list archived at http://saxon.markmail.org/ > [email protected] > https://lists.sourceforge.net/lists/listinfo/saxon-help --000000000000ecd4f405d11a44e8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-size:small">App= reciate the definitive and detailed answer.</div><div class=3D"gmail_defaul= t" style=3D"font-size:small"><br></div><div class=3D"gmail_default" style= =3D"font-size:small">Specific knowledge of the params it is!</div></div><br= ><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Thu, N= ov 18, 2021 at 7:21 AM Michael Kay <<a href=3D"mailto:mike-JkSD5nQpfvpWk0Htik3J/[email protected]"= >mike-JkSD5nQpfvpWk0Htik3J/[email protected]</a>> wrote:<br></div><blockquote class=3D"gmail_quote= " style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);= padding-left:1ex"><div style=3D"overflow-wrap: break-word;">As for the run-= time values of global parameters, they are held in a GlobalParameterSet obj= ect within the Controller, but this isn't directly exposed. You can get= the value for a specific parameter using context.getController().getParame= ter() -- which you could of course wrap in an extension function -- but the= re's no obvious way of getting the full set.<div><br></div><div>Michael= Kay</div><div>Saxonica<br><div><br><blockquote type=3D"cite"><div>On 17 No= v 2021, at 19:15, Graydon Saunders <<a href=3D"mailto:[email protected]= om" target=3D"_blank">[email protected]</a>> wrote:</div><br><div><di= v dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-size:small">Hello!= <br></div><div class=3D"gmail_default" style=3D"font-size:small"><br></div>= <div class=3D"gmail_default" style=3D"font-size:small">I am pretty sure the= re isn't a way to do this, but maybe I'm wrong.</div><div class=3D"= gmail_default" style=3D"font-size:small"><br></div><div class=3D"gmail_defa= ult" 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?=C2=A0=C2=A0</= div><div class=3D"gmail_default" style=3D"font-size:small"><br></div><div c= lass=3D"gmail_default" style=3D"font-size:small">The intent is to then chec= k that they all have values assigned, since one of the ways the "call = this stylesheet" step of the processing chain fails is "oops, tha= t needs a value".=C2=A0 There's an extension function, saxon:tunne= l-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></div><di= v class=3D"gmail_default" style=3D"font-size:small">(If not, an explicit li= st of parameters will work.=C2=A0 I am hoping for a more elegant solution.)= </div><div class=3D"gmail_default" style=3D"font-size:small"><br></div><div= class=3D"gmail_default" style=3D"font-size:small">Thanks!</div><div class= =3D"gmail_default" style=3D"font-size:small"><br></div><div class=3D"gmail_= default" style=3D"font-size:small">---<br>Graydon Saunders =C2=A0| <a href= =3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>= <br>=C3=9E=C3=A6s ofer=C3=A9ode, =C3=B0isses sw=C3=A1 m=C3=A6g.<br>-- Deor = =C2=A0("That passed, so may this.")<br></div></div> _______________________________________________<br>saxon-help mailing list = archived at <a href=3D"http://saxon.markmail.org/" target=3D"_blank">http:/= /saxon.markmail.org/</a><br><a href=3D"mailto:[email protected]= net" target=3D"_blank">[email protected]</a><br><a href=3D"h= ttps://lists.sourceforge.net/lists/listinfo/saxon-help" target=3D"_blank">h= ttps://lists.sourceforge.net/lists/listinfo/saxon-help</a> </div></blockquo= te></div><br></div></div>_______________________________________________<br= > saxon-help mailing list archived at <a href=3D"http://saxon.markmail.org/" = rel=3D"noreferrer" target=3D"_blank">http://saxon.markmail.org/</a><br> <a href=3D"mailto:[email protected]" target=3D"_blank">saxon= [email protected]</a><br> <a href=3D"https://lists.sourceforge.net/lists/listinfo/saxon-help" rel=3D"= noreferrer" target=3D"_blank">https://lists.sourceforge.net/lists/listinfo/= saxon-help</a> </blockquote></div> --000000000000ecd4f405d11a44e8-- --===============0975304019492536967== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============0975304019492536967== 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 --===============0975304019492536967==--