Re: List of stylesheet parameters?

Graydon Saunders <[email protected]> Wed, 17 Nov 2021 18:54:10 -0500
Newsgroups gmane.text.xml.saxon.help
Message-ID <CAO3ciQE4AfBc16V=V-_LsTuRXN8oz=5nXMu6sPRCnZtgLQ5DcQ@mail.gmail.com>
--===============5214663843952967087==
Content-Type: multipart/alternative; boundary="000000000000beaf6805d104c20f"

--000000000000beaf6805d104c20f
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Thank you, Gerrit!

I am pretty sure that's going to inspect the XSLT code, so I've been
unclear.

What I want is to be able to detect the in-scope parameters at the top of
the stylesheet (and whatever values those parameters have) _while the
stylesheet is running_, as a sort of last-ditch check that these parameters
have values.  (Possibly "usable values", but "values" for now.)

As I said, I'm pretty sure that's not something one can do.

-- Graydon

On Wed, Nov 17, 2021 at 4:16 PM Imsieke, Gerrit, le-tex <
[email protected]> wrote:

> Hi Graydon,
>
> You can extract the stylesheet parameters with XSLT. You need to follow
> the includes and imports and report only the topmost (non-overridden)
> xsl:params. I set up a small repo that does just this, not considering
> packages though.
>
> https://github.com/gimsieke/xsl-params/
>
> Gerrit
>
>
> On 17.11.2021 20:15, Graydon Saunders 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
> > more elegant solution.)
> >
> > Thanks!
> >
> > ---
> > 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

--000000000000beaf6805d104c20f
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><span class=3D"gmail_default" style=3D"font-size:small">Th=
ank you, Gerrit!</span><div><span class=3D"gmail_default" style=3D"font-siz=
e:small"><br></span></div><div><span class=3D"gmail_default" style=3D"font-=
size:small">I am pretty sure that&#39;s going to inspect the XSLT code, so =
I&#39;ve been unclear.</span></div><div><span class=3D"gmail_default" style=
=3D"font-size:small"><br></span></div><div><span class=3D"gmail_default" st=
yle=3D"font-size:small">What I want is to be able to detect the in-scope pa=
rameters at the top of the stylesheet (and whatever values those parameters=
 have) _while the stylesheet is running_, as a sort of last-ditch check tha=
t these parameters have values.=C2=A0 (Possibly &quot;usable values&quot;, =
but &quot;values&quot; for now.)</span></div><div><span class=3D"gmail_defa=
ult" style=3D"font-size:small"><br></span></div><div><span class=3D"gmail_d=
efault" style=3D"font-size:small">As I said, I&#39;m pretty sure that&#39;s=
 not something one can do.</span></div><div><span class=3D"gmail_default" s=
tyle=3D"font-size:small"><br></span></div><div><span class=3D"gmail_default=
" style=3D"font-size:small">-- Graydon</span></div></div><br><div class=3D"=
gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Wed, Nov 17, 2021 at =
4:16 PM Imsieke, Gerrit, le-tex &lt;<a href=3D"mailto:gerrit.imsieke@le-tex=
.de">[email protected]</a>&gt; wrote:<br></div><blockquote class=3D"=
gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(20=
4,204,204);padding-left:1ex">Hi Graydon,<br>
<br>
You can extract the stylesheet parameters with XSLT. You need to follow <br=
>
the includes and imports and report only the topmost (non-overridden) <br>
xsl:params. I set up a small repo that does just this, not considering <br>
packages though.<br>
<br>
<a href=3D"https://github.com/gimsieke/xsl-params/" rel=3D"noreferrer" targ=
et=3D"_blank">https://github.com/gimsieke/xsl-params/</a><br>
<br>
Gerrit<br>
<br>
<br>
On 17.11.2021 20:15, Graydon Saunders wrote:<br>
&gt; Hello!<br>
&gt; <br>
&gt; I am pretty sure there isn&#39;t a way to do this, but maybe I&#39;m w=
rong.<br>
&gt; <br>
&gt; In current Saxon -- 10.* -- using XSLT 3.0, is there some way to get a=
 <br>
&gt; list of the stylesheet parameters?<br>
&gt; <br>
&gt; The intent is to then check that they all have values assigned, since =
<br>
&gt; one of the ways the &quot;call this stylesheet&quot; step of the proce=
ssing chain <br>
&gt; fails is &quot;oops, that needs a value&quot;.=C2=A0 There&#39;s an ex=
tension function, <br>
&gt; saxon:tunnel-params(), that would be just the thing if it were <br>
&gt; saxon:in-scope-params().<br>
&gt; <br>
&gt; (If not, an explicit list of parameters will work.=C2=A0 I am hoping f=
or a <br>
&gt; more elegant solution.)<br>
&gt; <br>
&gt; Thanks!<br>
&gt; <br>
&gt; ---<br>
&gt; Graydon Saunders =C2=A0| <a href=3D"mailto:[email protected]" targe=
t=3D"_blank">[email protected]</a> &lt;mailto:<a href=3D"mailto:graydoni=
[email protected]" target=3D"_blank">[email protected]</a>&gt;<br>
&gt; =C3=9E=C3=A6s ofer=C3=A9ode, =C3=B0isses sw=C3=A1 m=C3=A6g.<br>
&gt; -- Deor =C2=A0(&quot;That passed, so may this.&quot;)<br>
&gt; <br>
&gt; <br>
<br>
<br>
_______________________________________________<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>

--000000000000beaf6805d104c20f--


--===============5214663843952967087==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============5214663843952967087==
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 
--===============5214663843952967087==--