Re: [basex-talk] http:request parsing question

2019-10-22 Thread Bridger Dyson-Smith
Hi Liam!

On Tue, Oct 22, 2019 at 7:38 PM Liam R. E. Quin 
wrote:

> On Tue, 2019-10-22 at 19:32 -0400, Bridger Dyson-Smith wrote:
> >
> > http://export.arxiv.org/oai2?verb=Identify'/>)//@status/data()
> >
> > returns '200', but trying
> >
> > http:send-request()/h:response/@status
> >
> > fails.
>
> I'm guessing that the first request sends you an auth token, and that
> you're supposed to send this as a parameter in the second token?
>
> How exactly does the second call fail?
>
> Apologies for not clarifying. The @href points to an OAI-PMH endpoint,
which simply returns a XML response[1] saying, "This is an OAI-PMH
endpoint, here's an administrator's email address, plus some other stuff."
So, there aren't any tokens being passed back in forth in this case (to be
honest, there are resumption tokens that can be passed back in to an OAI
provider for other types of requests).

I had thought it might be a good idea to try to think about the HTTP status
('200', '404', etc) in a thing I'm working on, and while I realize I can
get to it with a `//@status` , I had thought a more direct expression would
be more suited (what if there are other `@status` attributes, etc). I even
tried taking my shoes off, to no avail. :)

In any case, thank you!
Best,
Bridger


> --
> Liam Quin, https://www.delightfulcomputing.com/
> Available for XML/Document/Information Architecture/XSLT/
> XSL/XQuery/Web/Text Processing/A11Y training, work & consulting.
> Barefoot Web-slave, antique illustrations:  http://www.fromoldbooks.org
>
> [1] The full response from arXiv's OAI endpoint looks like this:
```

http://www.openarchives.org/OAI/2.0/;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/
http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd;>2019-10-22T23:18:26Zhttp://export.arxiv.org/oai2arXivhttp://export.arxiv.org/oai22.0h...@arxiv.org2007-05-23persistent-MM-DDhttp://www.openarchives.org/OAI/1.1/eprints;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation="http://www.openarchives.org/OAI/1.1/eprints
http://www.openarchives.org/OAI/1.1/eprints.xsd;> 
Author self-archived e-prints  
 Metadata harvesting permitted through OAI interface
http://arxiv.org/help/oa/metadataPolicy 
  Full-content harvesting not permitted (except by
special arrangement)
http://arxiv.org/help/oa/dataPolicy 
  Author self-submission preferred,
submissions screened for appropriateness.
http://arxiv.org/help/submit
http://www.openarchives.org/OAI/2.0/branding/;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/branding/
http://www.openarchives.org/OAI/2.0/branding.xsd;> 
http://arxiv.org/OAI/arXivLogo.png
http://arxiv.org/ arXiv e-print archive
88 31
http://www.openarchives.org/OAI/2.0/oai_dc/;
mimeType="text/xsl">http://arxiv.org/OAI/arXivMetadata.xsl

```


Re: [basex-talk] http:request parsing question

2019-10-22 Thread Liam R. E. Quin
On Tue, 2019-10-22 at 19:32 -0400, Bridger Dyson-Smith wrote:
> 
> http://export.arxiv.org/oai2?verb=Identify'/>)//@status/data()
> 
> returns '200', but trying
> 
> http:send-request()/h:response/@status
> 
> fails.

I'm guessing that the first request sends you an auth token, and that
you're supposed to send this as a parameter in the second token?

How exactly does the second call fail?


-- 
Liam Quin, https://www.delightfulcomputing.com/
Available for XML/Document/Information Architecture/XSLT/
XSL/XQuery/Web/Text Processing/A11Y training, work & consulting.
Barefoot Web-slave, antique illustrations:  http://www.fromoldbooks.org



[basex-talk] http:request parsing question

2019-10-22 Thread Bridger Dyson-Smith
Hi all -

I was hoping that someone on the list could help with my thinking about
parsing the http:response values from a request; I've tried the following,
but I'm not thinking about this correctly.

declare namespace oai = "http://www.openarchives.org/OAI/2.0/;;
declare namespace h = "http://expath.org/ns/http-client;;
http:send-request()//@status/data()

returns '200', but trying

http:send-request()/h:response/@status

fails.

I'm guessing (but am not sure) that the combination of the 
with the body of the response is causing my problem, but I'm not sure how
to wiggle my way around it.

Note: this is not in a RESTXQ context (yet), but for my simple trials is
there a way to get at the http -namespace elements?
Thank you for your time and trouble.
Best,
Bridger


Re: [basex-talk] catalog.xml - xsd - urn

2019-10-22 Thread Imsieke, Gerrit, le-tex




On 21.10.2019 22:05, SW-Service wrote:
xmlns:xdomea="urn:xoev-de:xdomea:schema:2.3.0">


Somewhat unrelated to your initial question, and it was probably someone 
else’s idea to put a minor version number in a namespace – but this is 
considered bad practice.


All processing applications, for example XSLT stylesheets or editing 
environments, need to be adapted when the namespace changes. This can 
probably be avoided by matching only local names in XSLT, but why use 
namespaces at all when you end up ignoring them?


If a schema is likely to undergo significant changes between major 
versions, it might be acceptable to include the major version in the 
namespace. In general, it is better to use a version attribute in the 
document instead so that transformation rules, editor configurations or 
schema co-occurrence constraints can be customized to reflect specific 
differences between the versions.


Gerrit