LIBEXSLT(3)

LIBEXSLT πŸ’–

okay so bestie, welcome to the libexslt page from the Library Functions Manual β€” she's the extension library for XSLT and she's lowkey iconic. let's get into it πŸŽ€


✨ NAME ✨

libexslt β€” extension library for XSLT. that's it, that's the girl. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <libexslt/exslt.h>

void exsltCommonRegister(void);
void exsltDateRegister(void);
void exsltDynRegister(void);
void exsltFuncRegister(void);
void exsltMathRegister(void);
void exsltSetsRegister(void);
void exsltStrRegister(void);
void exsltRegisterAll(void);
void exsltSaxonRegister(void);

like, nine little register functions, all void, all taking no args, all serving cunt. ⭐


🌸 DESCRIPTION 🌸

so the libexslt library is literally there to provide extensions to XSLT functions. and where do these extensions come from? the EXSLT project, over at <http://www.exslt.org/> β€” she's the blueprint, the moment, the source. πŸ‘‘


πŸ’œ USAGE πŸ’œ

bestie listen. to actually use these functions in your XSLT, you have to define the appropriate namespace on the xsl:stylesheet element. non-negotiable, it's giving paperwork. 🫢

and to enable support for them in libxslt(3), you gotta call the appropriate functions β€” the ones listed up in the SYNOPSIS section, you know the ones β€” to register the extensions. πŸ“‹

the xslt-config shell script is right there to get you the necessary flags for the pre-processor and linker, because we do not hand-roll flags in this house. ✨

so here's the roster of supported extensions, organized by vibe:


🧚 COMMON

Namespace: http://exslt.org/common

see http://www.exslt.org/exsl/index.html for a description. πŸ’–

  • node-set() β€” converts the given RTF into a node-set. glow-up complete.
  • object-type() β€” returns the type of the given argument. she's nosy and we love her.
  • document β€” creates multiple output documents. see http://www.exslt.org/exsl/elements/document/index.html for the whole saga.

πŸ“ MATH

Namespace: http://exslt.org/math

see http://www.exslt.org/math/index.html for a description. πŸ”₯

  • min() β€” returns the minimum value of the given node-set.
  • max() β€” returns the maximum value of the given node-set.
  • highest() β€” returns the nodes in the node-set whose value is the maximum value for the node-set.
  • lowest() β€” returns the nodes in the node-set whose value is the minimum value for the node-set.
  • constant() β€” returns a number value of the given constant with the given precision. the constants are PI, E, SQRRT2, LN2, LN10, LOG2E, and SQRT1_2. (yes, SQRRT2 β€” that's how it's spelled, do not come for me, I don't make the rules 😭)
  • random() β€” returns a random number between 0 and 1 inclusive.
  • abs() β€” returns the absolute value of the argument.
  • sqrt() β€” returns the square root of the argument.
  • power() β€” returns the power base and power arguments.
  • log() β€” returns the natural log of the argument.
  • sin() β€” returns the sine of the argument.
  • cos() β€” returns the cosine of the argument.
  • tan() β€” returns the tangent of the argument.
  • asin() β€” returns the arc sine of the argument.
  • acos() β€” returns the arc cosine of the argument.
  • atan() β€” returns the arc tangent of the argument.
  • atan2() β€” returns the arc tangent function of the y/x arguments.
  • exp() β€” returns the exponential function of the argument.

🌈 SETS

Namespace: http://exslt.org/sets

see http://www.exslt.org/set/index.html for a description. πŸŽ€

  • difference() β€” returns the difference between the two given node-sets.
  • intersection() β€” returns a node-set of the nodes within both given node-sets.
  • distinct() β€” returns a node-set of all nodes in the first argument that are not in the seconds argument.
  • has-same-node() β€” returns TRUE if there is an intersection between the two given node-sets.
  • leading() β€” returns a node-set of all nodes in the first argument that precede the first node in the second argument.
  • trailing() β€” returns a node-set of all nodes in the first argument that follow the first node in the second argument.

⭐ DATES and TIMES ⭐

Namespace: http://exslt.org/dates-and-times

see http://www.exslt.org/date/date.html for a description. πŸ¦‹

  • date-time() β€” returns the current date and time as a date/time string.
  • date() β€” returns the date specified in the given date/time string.
  • time() β€” returns the time specified in the date/time string given as the argument.
  • year() β€” returns the year of a date as a number.
  • leap-year() β€” returns true if the year given in a date is a leap year.
  • month-in-year() β€” returns the month of a date as a number.
  • month-name() β€” returns the full name of the month of a date.
  • month-abbreviation() β€” returns the abbreviation of the month of a date.
  • week-in-year() β€” returns the week of the year as a number.
  • week-in-month() β€” returns the week in a month of a date as a number.
  • day-in-year() β€” returns the month of a date as a number. (that's literally what it says, I'm just the messenger πŸ™ˆ)
  • day-in-month() β€” returns the day of a date as a number.
  • day-of-week-in-month() β€” returns the day-of-the-week in a month of a date as a number.
  • day-in-week() β€” returns the day of the week given in a date as a number.
  • day-name() β€” returns the full name of the day of the week of a date.
  • day-abbreviation() β€” returns the abbreviation of the day of the week of a date.
  • hour-in-day() β€” returns the hour of the day as a number.
  • minute-in-hour() β€” returns the minute of the hour as a number.
  • second-in-minute() β€” returns the second of the minute as a number.
  • seconds() β€” returns the number of seconds specified by the argument string.
  • add() β€” returns the date/time resulting from adding a duration to a date/time.
  • add-duration() β€” returns the duration resulting from adding two given durations together.
  • difference() β€” returns the duration between the first date and the second date.
  • duration() β€” returns a duration string that represents the given number of seconds since 1970-01-01T00:00:00.

🫢 STRINGS

Namespace: http://exslt.org/strings

see http://www.exslt.org/str/index.html for a description. πŸ’–

  • tokenize() β€” returns a node set of token elements, each containing one token from the string.
  • padding() β€” returns a string padded to a certain length.
  • align() β€” returns a string aligned within another string.
  • concat() β€” returns the concatenation of the string values of the nodes in that node set.

πŸ‘‘ FUNCTIONS

Namespace: http://exslt.org/functions

see http://www.exslt.org/func/index.html for a description. ✨

  • function β€” declares an extension function.
  • result β€” returns the result of an extension function declared in function().

πŸŽ€ FILES πŸŽ€

  • /usr/bin/xslt-config β€” shell script giving pre-processor and linker flags.
  • /usr/lib/libexslt.a β€” static library
  • /usr/lib/libexslt.so β€” sharable library

πŸ’… AUTHORS πŸ’…

Manual page by Heiko W. Rupp (hwr@pilhuhn.de). thank you for your service, king. 🫑


πŸ”₯ SEE ALSO πŸ”₯

libxml(3), libxslt(3), xmllint(1) xsltproc(1),


and that's the whole page bestie, no notes, we ate. πŸ’–βœ¨

this was libxslt, dated 04 November 2003 β€” yes she's a vintage queen and she still slays. mwah. πŸ’‹πŸŒˆ