Re: List of stylesheet parameters?

Dimitre Novatchev <[email protected]> Thu, 18 Nov 2021 07:25:26 -0800
Newsgroups gmane.text.xml.saxon.help
Message-ID <CAK4KnZeU1JGohvaweAtLs-8AqWpWcgP-6382+iE9qZFAG5uY0A@mail.gmail.com>
--===============7548469554279960292==
Content-Type: multipart/alternative; boundary="0000000000002d308a05d111c5dd"

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

In July I asked this on the XML.com Slack #xpath-ng channel (and your
question is exactly one use-case for this proposal):

https://xmlcom.slack.com/archives/C01GVC3JLHE/p1625534819029200

Dimitre Novatchev <https://app.slack.com/team/U01F9LEC4SE>  6:26 PM
<https://xmlcom.slack.com/archives/C01GVC3JLHE/p1625534819029200>
Question: AFAIK we don't have an XPath function that returns all
variables/parameters  that are in context, do we?
Please, correct me if I am wrong.Having such a function will be useful for
debugging and other goals. Any thoughts?

There was a thread on this with 27 responses, most positive, the question
got 7 thumbs-up, but I am not aware of anything been done further.

Probably must add this as an official proposal on
https://github.com/qt4cg/qtspecs/issues


Thanks,
Dimitre

On Wed, Nov 17, 2021 at 11:16 AM 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



--=20
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
Never fight an inanimate object
-------------------------------------
To avoid situations in which you might make mistakes may be the
biggest mistake of all
------------------------------------
Quality means doing it right when no one is looking.
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play
-------------------------------------
To achieve the impossible dream, try going to sleep.
-------------------------------------
Facts do not cease to exist because they are ignored.
-------------------------------------
Typing monkeys will write all Shakespeare's works in 200yrs.Will they write
all patents, too? :)
-------------------------------------
Sanity is madness put to good use.
-------------------------------------
I finally figured out the only reason to be alive is to enjoy it.

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

<div dir=3D"ltr">In July I asked this on the XML.com Slack #xpath-ng channe=
l (and your question is exactly one use-case for this proposal):<br><br><a =
href=3D"https://xmlcom.slack.com/archives/C01GVC3JLHE/p1625534819029200">ht=
tps://xmlcom.slack.com/archives/C01GVC3JLHE/p1625534819029200</a><br><br><d=
iv class=3D"gmail-c-virtual_list__item" tabindex=3D"-1" role=3D"presentatio=
n" style=3D"top: 1157.7px;" id=3D"gmail-1625468400000divider"><div class=3D=
"gmail-c-message_list__day_divider"><div class=3D"gmail-c-message_list__day=
_divider__line"></div></div></div><div class=3D"gmail-c-virtual_list__item"=
 tabindex=3D"0" role=3D"listitem" style=3D"top: 1197.7px;" id=3D"gmail-1625=
534819.029200"><div role=3D"presentation" class=3D"gmail-c-message_kit__bac=
kground gmail-c-message_kit__background--hovered gmail-p-message_pane_messa=
ge__message gmail-c-message_kit__message"><div role=3D"document" class=3D"g=
mail-c-message_kit__hover gmail-c-message_kit__hover--hovered"><div class=
=3D"gmail-c-message_kit__actions gmail-c-message_kit__actions--default" sty=
le=3D""><div class=3D"gmail-c-message_kit__gutter"><div role=3D"presentatio=
n" class=3D"gmail-c-message_kit__gutter__left"></div></div></div></div></di=
v></div><span class=3D"gmail-c-message__sender gmail-c-message_kit__sender"=
><a target=3D"_blank" rel=3D"noopener noreferrer" aria-haspopup=3D"menu" ar=
ia-expanded=3D"false" class=3D"gmail-c-link gmail-c-message__sender_link" h=
ref=3D"https://app.slack.com/team/U01F9LEC4SE" tabindex=3D"-1">Dimitre Nova=
tchev<span aria-label=3D"(opens in new tab)"></span></a></span>=C2=A0=C2=A0=
<a class=3D"gmail-c-link gmail-c-timestamp" href=3D"https://xmlcom.slack.co=
m/archives/C01GVC3JLHE/p1625534819029200" tabindex=3D"-1"><span class=3D"gm=
ail-c-timestamp__label">6:26 PM</span></a><br><div class=3D"gmail-c-message=
_kit__blocks gmail-c-message_kit__blocks--rich_text"><div class=3D"gmail-c-=
message__message_blocks gmail-c-message__message_blocks--rich_text"><div cl=
ass=3D"gmail-p-block_kit_renderer"><div class=3D"gmail-p-block_kit_renderer=
__block_wrapper gmail-p-block_kit_renderer__block_wrapper--first"><div clas=
s=3D"gmail-p-rich_text_block" dir=3D"auto"><div class=3D"gmail-p-rich_text_=
section">Question: AFAIK we don&#39;t have an <span class=3D"gmail-c-mrkdwn=
__highlight">XPath</span> function that returns all variables/parameters=C2=
=A0 that are in context, do we?</div><div class=3D"gmail-p-rich_text_sectio=
n"><span class=3D"gmail-c-mrkdwn__br"></span>Please, correct me if I am wro=
ng.<span class=3D"gmail-c-mrkdwn__br"></span>Having such a function will be=
 useful for debugging and other goals. Any thoughts?<br><br>There was a thr=
ead on this with 27 responses, most positive, the question got 7 thumbs-up,=
 but I am not aware of anything been done further.<br><br>Probably must add=
 this as an official proposal on <a href=3D"https://github.com/qt4cg/qtspec=
s/issues">https://github.com/qt4cg/qtspecs/issues</a></div><div class=3D"gm=
ail-p-rich_text_section"><br><br>Thanks,</div><div class=3D"gmail-p-rich_te=
xt_section">Dimitre</div></div></div></div></div></div></div><br><div class=
=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Wed, Nov 17, 2021=
 at 11:16 AM Graydon Saunders &lt;<a href=3D"mailto:[email protected]">g=
[email protected]</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quot=
e" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204)=
;padding-left:1ex"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"f=
ont-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 there isn&#39;t a way to do this, but maybe I&#39;m wron=
g.</div><div class=3D"gmail_default" style=3D"font-size:small"><br></div><d=
iv 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 par=
ameters?=C2=A0=C2=A0</div><div class=3D"gmail_default" style=3D"font-size:s=
mall"><br></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 th=
e ways the &quot;call this stylesheet&quot; step of the processing chain fa=
ils is &quot;oops, that needs a value&quot;.=C2=A0 There&#39;s an extension=
 function, saxon:tunnel-params(), that would be just the thing if it were s=
axon:in-scope-params().</div><div class=3D"gmail_default" style=3D"font-siz=
e:small"><br></div><div class=3D"gmail_default" style=3D"font-size:small">(=
If not, an explicit list of parameters will work.=C2=A0 I am hoping for a m=
ore 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">Th=
anks!</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 Saun=
ders =C2=A0| <a href=3D"mailto:[email protected]" target=3D"_blank">gray=
[email protected]</a><br>=C3=9E=C3=A6s ofer=C3=A9ode, =C3=B0isses sw=C3=A1 m=
=C3=A6g.<br>-- Deor =C2=A0(&quot;That passed, so may this.&quot;)<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><br clear=3D"all"><div><br></div>-- <br><=
div dir=3D"ltr" class=3D"gmail_signature"><div>Cheers,</div><div>Dimitre No=
vatchev</div><div>---------------------------------------</div><div>Truly g=
reat madness cannot be achieved without significant intelligence.</div><div=
>---------------------------------------</div><div>To invent, you need a go=
od imagination and a pile of junk</div><div>-------------------------------=
------</div><div>Never fight an inanimate object</div><div>----------------=
---------------------</div><div>To avoid situations in which you might make=
 mistakes may be the</div><div>biggest mistake of all</div><div>-----------=
-------------------------</div><div>Quality means doing it right when no on=
e is looking.</div><div>-------------------------------------</div><div>You=
&#39;ve achieved success in your field when you don&#39;t know whether what=
 you&#39;re doing is work or play</div><div>-------------------------------=
------</div><div>To achieve the impossible dream, try going to sleep.</div>=
<div>-------------------------------------</div><div>Facts do not cease to =
exist because they are ignored.</div><div>---------------------------------=
----</div><div>Typing monkeys will write all Shakespeare&#39;s works in 200=
yrs.Will they write all patents, too? :)</div><div>------------------------=
-------------</div><div>Sanity is madness put to good use.</div><div>------=
-------------------------------</div><div>I finally figured out the only re=
ason to be alive is to enjoy it.</div><div>=C2=A0</div></div>

--0000000000002d308a05d111c5dd--


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


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