[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xml-dev
Subject:    Re: [xml-dev] Seeking code for Xpath type signature detector
From:       Rick Jelliffe <rjelliffe () allette ! com ! au>
Date:       2021-07-16 15:45:00
Message-ID: CADUdYQW434v+PREuki1_NwX8+wFS1pzDNhi2Lre3w1ENM_oOXg () mail ! gmail ! com
[Download RAW message or body]

Ha :-) That is exactly what I started on. Then I decided to ask around,
because it seems like something that should be floating around.

Rick.

On Sat, 17 Jul. 2021, 00:46 Tony Graham, <tgraham@antenna.co.jp> wrote:

> On 16/07/2021 11:18, Rick Jelliffe wrote:
> > Does anyone have a pointer to code (XSLT or any C-alike) which takes
> > an XPath (3.n would be great) and gives you the type signature of
> > what it will return?
> >
> > e.g.   //nook//cranny  will  return  'element('cranny')'  in whatever
> >  notation or form.
> >
> > I am really only concerned with Xpath node types and their names if
> > any, not XSD datatypes.
>
> You could start with one of the XPath grammars for the REx Parser
> Generator [1], generate a parser in your target language of choice, then
> do whatever you want with the representation that the parser generates.
>
> Regards,
>
>
> Tony Graham.
> --
> Senior Architect
> XML Division
> Antenna House, Inc.
> ----
> Skerries, Ireland
> tgraham@antenna.co.jp
>
>
> [1] https://www.bottlecaps.de/rex/
>
> _______________________________________________________________________
>
> XML-DEV is a publicly archived, unmoderated list hosted by OASIS
> to support XML implementation and development. To minimize
> spam in the archives, you must subscribe before posting.
>
> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
> Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
> subscribe: xml-dev-subscribe@lists.xml.org
> List archive: http://lists.xml.org/archives/xml-dev/
> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
>
>

[Attachment #3 (text/html)]

<div dir="auto">Ha :-) That is exactly what I started on. Then I decided to ask \
around, because it seems like something that should be floating around.<div \
dir="auto"><br></div><div dir="auto">Rick.</div></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 17 Jul. 2021, 00:46 \
Tony Graham, &lt;<a href="mailto:tgraham@antenna.co.jp">tgraham@antenna.co.jp</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex">On 16/07/2021 11:18, Rick Jelliffe \
wrote:<br> &gt; Does anyone have a pointer to code (XSLT or any C-alike) which \
takes<br> &gt; an XPath (3.n would be great) and gives you the type signature of<br>
&gt; what it will return?<br>
&gt; <br>
&gt; e.g.     //nook//cranny   will   return   &#39;element(&#39;cranny&#39;)&#39;   \
in whatever<br> &gt;   notation or form.<br>
&gt; <br>
&gt; I am really only concerned with Xpath node types and their names if<br>
&gt; any, not XSD datatypes.<br>
<br>
You could start with one of the XPath grammars for the REx Parser<br>
Generator [1], generate a parser in your target language of choice, then<br>
do whatever you want with the representation that the parser generates.<br>
<br>
Regards,<br>
<br>
<br>
Tony Graham.<br>
-- <br>
Senior Architect<br>
XML Division<br>
Antenna House, Inc.<br>
----<br>
Skerries, Ireland<br>
<a href="mailto:tgraham@antenna.co.jp" target="_blank" \
rel="noreferrer">tgraham@antenna.co.jp</a><br> <br>
<br>
[1] <a href="https://www.bottlecaps.de/rex/" rel="noreferrer noreferrer" \
target="_blank">https://www.bottlecaps.de/rex/</a><br> <br>
_______________________________________________________________________<br>
<br>
XML-DEV is a publicly archived, unmoderated list hosted by OASIS<br>
to support XML implementation and development. To minimize<br>
spam in the archives, you must subscribe before posting.<br>
<br>
[Un]Subscribe/change address: <a href="http://www.oasis-open.org/mlmanage/" \
rel="noreferrer noreferrer" \
target="_blank">http://www.oasis-open.org/mlmanage/</a><br> Or unsubscribe: <a \
href="mailto:xml-dev-unsubscribe@lists.xml.org" target="_blank" \
                rel="noreferrer">xml-dev-unsubscribe@lists.xml.org</a><br>
subscribe: <a href="mailto:xml-dev-subscribe@lists.xml.org" target="_blank" \
rel="noreferrer">xml-dev-subscribe@lists.xml.org</a><br> List archive: <a \
href="http://lists.xml.org/archives/xml-dev/" rel="noreferrer noreferrer" \
target="_blank">http://lists.xml.org/archives/xml-dev/</a><br> List Guidelines: <a \
href="http://www.oasis-open.org/maillists/guidelines.php" rel="noreferrer noreferrer" \
target="_blank">http://www.oasis-open.org/maillists/guidelines.php</a><br> <br>
</blockquote></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic