.. _functx_scheme-from-uri: ====================== functx:scheme-from-uri ====================== Returns the scheme from a URI Description ~~~~~~~~~~~ The functx:scheme-from-uri function returns the scheme part of a URI, for example http or ftp, which appears before the colon. If there is no scheme (because it is a relative URI), a zero-length string is returned. .. list-table:: :widths: 40 60 :header-rows: 1 * - **Parameters** - **Description** * - uri:string() - the URI Examples ~~~~~~~~ .. list-table:: :widths: 50 50 :header-rows: 1 * - **XPath** - **Results** * - functx:scheme-from-uri('http://www.datypic.com') - http * - functx:scheme-from-uri('ftp://ftp.datypic.com') - ftp * - functx:scheme-from-uri('ftp.datypic.com') - zero-length string * - functx:scheme-from-uri('www.datypic.com') - zero-length string * - functx:scheme-from-uri('prod.html') - zero-length string See Also ~~~~~~~~ .. toctree:: :titlesonly: :glob: * :ref:`functx_is-absolute-uri`. * :ref:`functx_fragment-from-uri`.