ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Files on a server
@ 2018-05-16  9:31 Hans van der Meer
  2018-05-16 10:41 ` Henri Menke
  0 siblings, 1 reply; 19+ messages in thread
From: Hans van der Meer @ 2018-05-16  9:31 UTC (permalink / raw)
  To: NTG ConTeXt


[-- Attachment #1.1: Type: text/plain, Size: 859 bytes --]

I tried to determine the existence of a file on the internet. See the following macro call:

        % Test if file exists.
        \edef\theurl{\linkprotocol://\urlbase\xmlatt{#1}{link}\thesuffix}
        \doiffileelse
        	{\theurl}
        	{\verbose{HVDM-PEV-TEST}{file exists: \theurl}}
        	{\verbose{HVDM-PEV-TEST}{file does not exist: \theurl}}

It seems that \doiffileelse always results in true except for local files where nonexistence is correctly handled.

For example the following url definitely does not exist but nevertheless \doiffileelse reports its existence:
HVDM-PEV-TEST   > file exists: http://hansvandermeer.myqnapcloud.com/archive/denhaag/hga-dtb-1869-6040.pdf

Is it possible that the \doiffile macros are extended for files on the internet or a correponding set \doifurl is developed?

Hans van der Meer


[-- Attachment #1.2: Type: text/html, Size: 2292 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2018-05-17  9:49 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-16  9:31 Files on a server Hans van der Meer
2018-05-16 10:41 ` Henri Menke
2018-05-16 11:23   ` Hans van der Meer
2018-05-16 11:45     ` Henri Menke
2018-05-16 12:23       ` Taco Hoekwater
2018-05-16 12:58         ` Hans van der Meer
2018-05-16 13:41           ` Hans Hagen
2018-05-16 14:05             ` Taco Hoekwater
2018-05-17  7:32         ` Ulrike Fischer
2018-05-17  7:39           ` Taco Hoekwater
2018-05-17  7:52             ` Hans van der Meer
2018-05-17  7:54             ` Taco Hoekwater
2018-05-17  8:30               ` Ulrike Fischer
2018-05-17  8:42               ` Hans Hagen
2018-05-17  8:46               ` luigi scarso
2018-05-17  8:20             ` Ulrike Fischer
2018-05-17  8:31               ` Taco Hoekwater
2018-05-17  9:03                 ` Taco Hoekwater
2018-05-17  9:49                   ` Henri Menke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).