Calc's ENCODEURL, FILTERXML and WEBSERVICE functions

Eike Rathke erack at redhat.com
Mon Jun 7 13:04:48 UTC 2021


Hi Steve,

On Sunday, 2021-06-06 20:06:27 +0100, Steve Fanning wrote:

https://wiki.documentfoundation.org/Documentation/Calc_Functions/ENCODEURL

Just some remarks.

URL is not Universal Resource Locator but Uniform Resource Locator.
URI is Uniform Resource Identifier.
See also https://en.wikipedia.org/wiki/URL and
https://en.wikipedia.org/wiki/Uniform_Resource_Identifier

I find it a tad unfortunate that the first example of ENCODEURL() uses
a valid URI to encode it, i.e.
=ENCODEURL("https://www.libreoffice.org/")
that produces "https%3A%2F%2Fwww%2Elibreoffice%2Eorg%2F".
ENCODEURL() is more used on path components or query parameter arguments
that are appended to the path.

Also, using the libreoffice.org site should be avoided for examples as
when loaded
a) it generates quite some traffic
b) the result is overly complex

Rather use https://example.org/ instead that's made and reserved for,
well, examples, and delivers a short page if someone tries out.

Using actual queries for FILTERXML() is of course fine to demonstrate
functionality, with examples that keep the result not overly complex.

For ENCODEURL() "Additional details" "URL is constructed from a limited
set of characters" ... maybe also link to
https://datatracker.ietf.org/doc/html/rfc3986 the "Uniform Resource
Identifier (URI): Generic Syntax", and "A few special characters" should
be replaced by "A few reserved characters" linking to
https://datatracker.ietf.org/doc/html/rfc3986/#section-2.2 (Reserved
Characters)


> https://wiki.documentfoundation.org/Documentation/Calc_Functions/FILTERXML
> https://wiki.documentfoundation.org/Documentation/Calc_Functions/WEBSERVICE

The WEBSERVICE() example for "Accessing non-XML data" probably should
also be changed to https://example.org/ to not deliver the
"exceptionally long, multi-line string" ...

In "Accessing XML data" the example lacks the protocol scheme and //
before host component, i.e. https://


> On a specific point, do we need to declare the versions of XML and XPath
> that are relevant for FILTERXML? If so, can somebody confirm what they are?

I don't think the versions are somewhere nailed.

  Eike

-- 
GPG key 0x6A6CD5B765632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20210607/523fd8a3/attachment.sig>


More information about the LibreOffice mailing list