W3C

XQuery, XP*ath, and X*SLT Functi*ons and Op*erators Na*mespace Do*cument

Table of C*ontents

1 Introducti*on
2 XQuery and* XPath Fun*ctions
3 XSL Transf*ormations *(XSLT) Fun*ctions
4 XML Schema*
5 Normative *References*
6 Non-Normat*ive Refere*nces


1 Introducti*on

This docum*ent descri*bes the na*mespace http://www*.w3.org/20*05/xpath-f*unctions defined b*y the [XPath and *XQuery Fun*ctions and* Operators* 3.1] and [XSLT 3.0] specifica*tions (Oct*ober 2014 *and Decemb*er 2013 ve*rsions, re*spectively*). This na*mespace is* identifie*d by the n*amespace p*refix fn:, which is* a predefi*ned prefix*. For upd*ated infor*mation, pl*ease refer* to the la*test versi*on of the *[XPath and *XQuery Fun*ctions and* Operators* 3.1] and [XSLT 3.0] specifica*tions.

This docu*ment descr*ibes the n*ames that *are define*d in this *namespace *at the tim*e of publi*cation. Th*e W3C rese*rves the r*ight to de*fine addit*ional name*s in this *namespace *in the fut*ure. [XPath and *XQuery Fun*ctions and* Operators* 3.1] and [XSLT 3.0] are the only specifica*tions that* may amend* this name*space.

This docu*ment conta*ins a dire*ctory of l*inks to re*lated reso*urces, usi*ng RDDL (a*s defined *in [Resource D*irectory D*escription* Language *(RDDL)]).

It is GRD*DL-enabled* (as defin*ed in [Gleaning R*esource De*scriptions* from Dial*ects of La*nguages (G*RDDL)]); that is* to say th*at a GRDDL*-compliant* processor* can extra*ct useful *RDF (as de*fined in [Resource D*escription* Framework* (RDF): Co*ncepts and* Abstract *Syntax]) represen*tations of* the infor*mation con*tained her*ein.

2 XQuery and* XPath Fun*ctions

This secti*on lists a*ll of the *functions *defined in* the [XPath and *XQuery Fun*ctions and* Operators* 3.1] specifica*tion. Each* function *and operat*or is uniq*uely ident*ified with* a URI of *the form: *“http://www*.w3.org/20*05/xpath-f*unctions#name” where name is the na*me of a fu*nction or *operator, *such as “m*ax”: http://www*.w3.org/20*05/xpath-f*unctions#m*ax.

The normat*ive defini*tions of t*hese funct*ions are i*n the [XPath and *XQuery Fun*ctions and* Operators* 3.1] specifica*tion. For *convenienc*e, a very *brief, non*-normative* summary o*f each fun*ction is p*rovided. F*or details*, follow t*he link on* the “Summ*ary:” intr*oductory t*ext below *each funct*ion.

abs

Summary:

Returns th*e absolute* value of *$arg.

adjust-dat*eTime-to-t*imezone

Summary:

Adjusts an* xs:dateTim*e value to *a specific* timezone,* or to no *timezone a*t * all.

adjust-dat*e-to-timez*one

Summary:

Adjusts an* xs:date value to *a specific* timezone,* or to no *timezone a*t all; * t*he result *is the dat*e in the t*arget time*zone that *contains t*he startin*g instant *of the * s*upplied da*te.

adjust-tim*e-to-timez*one

Summary:

Adjusts an* xs:time value to *a specific* timezone,* or to no *timezone a*t * all.

analyze-st*ring

Summary:

Analyzes a* string us*ing a regu*lar expres*sion, retu*rning an X*ML structu*re that id*entifies * * which par*ts of the *input stri*ng matched* or failed* to match *the regula*r expressi*on, and * *in the cas*e of match*ed substri*ngs, which* substring*s matched *each captu*ring group* in the * *regular ex*pression.

append

Summary:

Adds one m*ember at t*he end of *an array, *creating a* new array*.

available-*environmen*t-variable*s

Summary:

Returns a *list of en*vironment *variable n*ames that *are suitab*le for pas*sing to * * fn:environ*ment-varia*ble, as a (po*ssibly emp*ty) sequen*ce of stri*ngs.

avg

Summary:

Returns th*e average *of the val*ues in the* input seq*uence $arg, that is,* the * sum* of the va*lues divid*ed by the *number of *values.

base-uri

Summary:

Returns th*e base URI* of a node*.

boolean

Summary:

Computes t*he effecti*ve boolean* value of *the sequen*ce $arg.

ceiling

Summary:

Rounds $arg upwards t*o a whole *number.

codepoint-*equal

Summary:

Returns tr*ue if two *strings ar*e equal, c*onsidered *codepoint-*by-codepoi*nt.

codepoints*-to-string*

Summary:

Creates an* xs:string from a se*quence of *codepoints*.

collation-*key

Summary:

Given a st*ring value* and a col*lation, ge*nerates an* internal *value call*ed a colla*tion key, *with the p*roperty th*at * the m*atching an*d ordering* of collat*ion keys r*eflects th*e matching* and order*ing of str*ings under* the speci*fied colla*tion.

collection*

Summary:

Returns a *sequence o*f nodes re*presenting* a collect*ion of doc*uments ind*entified b*y a * coll*ection URI*; or a def*ault colle*ction if n*o URI is s*upplied.

compare

Summary:

Returns -1*, 0, or 1,* depending* on whethe*r $comparand*1 collates *before, * *equal to, *or after $comparand*2 according* to the ru*les of a s*elected * *collation.*

contains

Summary:

Returns tr*ue if the *string $arg1 contains *$arg2 as a * su*bstring, t*aking coll*ations int*o account.*

Summary:

Tests whet*her a supp*lied map c*ontains an* entry for* a given k*ey

contains-t*oken

Summary:

Determines* whether o*r not any *of the sup*plied stri*ngs, when *tokenized *at whitesp*ace bounda*ries, cont*ains the s*upplied to*ken, * und*er the rul*es of the *supplied c*ollation.

count

Summary:

Returns th*e number o*f items in* a sequenc*e.

current-da*te

Summary:

Returns th*e current *date.

current-da*teTime

Summary:

Returns th*e current *date and t*ime (with *timezone).*

current-ti*me

Summary:

Returns th*e current *time.

data

Summary:

Returns th*e result o*f atomizin*g a sequen*ce, that i*s, replaci*ng all nod*es in the *sequence * * by their *typed valu*es.

dateTime

Summary:

Returns an* xs:dateTim*e value cre*ated by co*mbining an* xs:date * and an *xs:time.

day-from-d*ate

Summary:

Returns th*e day comp*onent of a*n xs:date.

day-from-d*ateTime

Summary:

Returns th*e day comp*onent of a*n xs:dateTim*e.

days-from-*duration

Summary:

Returns th*e number o*f days in *a duration*.

deep-equal*

Summary:

This func*tion asses*ses whethe*r two sequ*ences are *deep-equal* to each o*ther. To b*e * deep-e*qual, they* must cont*ain items *that are p*airwise de*ep-equal; *and for tw*o items to* * be deep*-equal, th*ey must ei*ther be at*omic value*s that com*pare equal*, or nodes* of the * *same kind,* with the *same name,* whose chi*ldren are *deep-equal*, * or *maps with *matching e*ntries, or* arrays wi*th matchin*g members.*

default-co*llation

Summary:

Returns th*e value of* the defau*lt collati*on propert*y from the* static co*ntext.

distinct-v*alues

Summary:

Returns th*e values t*hat appear* in a sequ*ence, with* duplicate*s eliminat*ed.

doc

Summary:

Retrieves *a document* using a U*RI supplie*d as an xs:string, and retu*rns the * *correspond*ing docume*nt node.

doc-availa*ble

Summary:

The functi*on returns* true if a*nd only if* the funct*ion call fn:doc($ur*i) * would r*eturn a do*cument nod*e.

document-u*ri

Summary:

Returns th*e URI of a* resource *where a do*cument can* be found,* if availa*ble.

element-wi*th-id

Summary:

Returns t*he sequenc*e of eleme*nt nodes t*hat have a*n ID value mat*ching the * * value of* one or mo*re of the *IDREF values su*pplied in *$arg.

empty

Summary:

Returns tr*ue if the *argument i*s the empt*y sequence*.

encode-for*-uri

Summary:

Encodes re*served cha*racters in* a string *that is in*tended to *be used in* the path *segment * *of a URI.

ends-with

Summary:

Returns tr*ue if the *string $arg1 contains *$arg2 as a trai*ling * sub*string, ta*king colla*tions into* account.

entry

Summary:

Creates a *map that c*ontains a *single ent*ry (a key-*value pair*).

environmen*t-variable*

Summary:

Returns th*e value of* a system *environmen*t variable*, if it ex*ists.

error

Summary:

Calling th*e fn:error function *raises an *applicatio*n-defined *error.

escape-htm*l-uri

Summary:

Escapes a *URI in the* same way *that HTML *user agent*s handle a*ttribute v*alues expe*cted to * *contain UR*Is.

exactly-on*e

Summary:

Returns $arg if it con*tains exac*tly one it*em. Otherw*ise, raise*s an error*. *

exists

Summary:

Returns tr*ue if the *argument i*s a non-em*pty sequen*ce.

false

Summary:

Returns th*e xs:boolean* value false.

filter

Summary:

Returns th*ose items *from the s*equence $seq for which* the suppl*ied functi*on * $f returns t*rue.

Summary:

Returns an* array con*taining th*ose member*s of the $array for which* * $function returns t*rue.

floor

Summary:

Rounds $arg downwards* to a whol*e number.

fold-left

Summary:

Processes *the suppli*ed sequenc*e from lef*t to right*, applying* the suppl*ied functi*on * repea*tedly to e*ach item i*n turn, to*gether wit*h an accum*ulated res*ult value.*

Summary:

Evaluates *the suppli*ed functio*n cumulati*vely on su*ccessive v*alues of t*he supplie*d * array.*

fold-right*

Summary:

Processes *the suppli*ed sequenc*e from rig*ht to left*, applying* the suppl*ied functi*on * repea*tedly to e*ach item i*n turn, to*gether wit*h an accum*ulated res*ult value.*

Summary:

Evaluates *the suppli*ed functio*n cumulati*vely on su*ccessive v*alues of t*he supplie*d * array.*

for-each

Summary:

Applies th*e function* item $f to every *item from *the sequen*ce $seq * in turn*, returnin*g the conc*atenation *of the res*ulting seq*uences in *order.

Summary:

Applies a *supplied f*unction to* every ent*ry in a ma*p, returni*ng the con*catenation* of the * *results.

Summary:

Returns an* array who*se size is* the same *as array:size*($array), in which* * each me*mber is co*mputed by *applying $function to the co*rrespondin*g member o*f * $array.

for-each-p*air

Summary:

Applies th*e function* item $f to succes*sive pairs* of items *taken one *from * *$seq1 and one f*rom $seq2, returnin*g the conc*atenation *of the * r*esulting s*equences i*n order.

Summary:

Returns an* array obt*ained by e*valuating *the suppli*ed functio*n once for* each pair* of member*s at the s*ame positi*on in * th*e two supp*lied array*s.

format-dat*e

Summary:

Returns a *string con*taining an* xs:date value for*matted for* display.

format-dat*eTime

Summary:

Returns a *string con*taining an* xs:dateTim*e value for*matted for* display.

format-int*eger

Summary:

Formats an* integer a*ccording t*o a given *picture st*ring, usin*g the conv*entions of* a given * * natural l*anguage if* specified*.

format-num*ber

Summary:

Returns a *string con*taining a *number for*matted acc*ording to *a given pi*cture stri*ng, * taki*ng account* of decima*l formats *specified *in the sta*tic contex*t.

format-tim*e

Summary:

Returns a *string con*taining an* xs:time value for*matted for* display.

function-a*rity

Summary:

Returns th*e arity of* the funct*ion identi*fied by a *function i*tem.

function-l*ookup

Summary:

Returns th*e function* having a *given name* and arity*, if there* is one.

function-n*ame

Summary:

Returns th*e name of *the functi*on identif*ied by a f*unction it*em.

generate-i*d

Summary:

This funct*ion return*s a string* that uniq*uely ident*ifies a gi*ven node. *

get

Summary:

Returns th*e value as*sociated w*ith a supp*lied key i*n a given *map.

has-childr*en

Summary:

Returns tr*ue if the *supplied n*ode has on*e or more *child node*s (of any *kind).

head

Summary:

Returns th*e first it*em in a se*quence.

Summary:

Returns th*e first me*mber of an* array, th*at is $array(1).

hours-from*-dateTime

Summary:

Returns th*e hours co*mponent of* an xs:dateTim*e.

hours-from*-duration

Summary:

Returns th*e number o*f hours in* a duratio*n.

hours-from*-time

Summary:

Returns th*e hours co*mponent of* an xs:time.

id

Summary:

Returns th*e sequence* of elemen*t nodes th*at have an* ID value mat*ching the * * value of* one or mo*re of the *IDREF values su*pplied in *$arg.

idref

Summary:

Returns th*e sequence* of elemen*t or attri*bute nodes* with an IDREF value * m*atching th*e value of* one or mo*re of the *ID values su*pplied in * * $arg.

implicit-t*imezone

Summary:

Returns th*e value of* the impli*cit timezo*ne propert*y from the* dynamic c*ontext.

index-of

Summary:

Returns a *sequence o*f positive* integers *giving the* positions* within th*e sequence* * $seq of items *that are e*qual to $search.

innermost

Summary:

Returns ev*ery node w*ithin the *input sequ*ence that *is not an *ancestor o*f another *member * o*f the inpu*t sequence*; the node*s are retu*rned in do*cument ord*er with du*plicates * * eliminate*d.

in-scope-p*refixes

Summary:

Returns th*e prefixes* of the in*-scope nam*espaces fo*r an eleme*nt node.

insert-bef*ore

Summary:

Returns a *sequence c*onstructed* by insert*ing an ite*m or a seq*uence of i*tems at a *given * po*sition wit*hin an exi*sting sequ*ence.

Summary:

Constructs* an array *by adding *one new me*mber at a *specified *position.

iri-to-uri*

Summary:

Converts a* string co*ntaining a*n IRI into* a URI acc*ording to *the rules *of [RFC 3987].

join

Summary:

Concatenat*es the con*tents of s*everal arr*ays into a* single ar*ray.

json-doc

Summary:

Reads an e*xternal re*source con*taining JS*ON, and re*turns the *result of *parsing th*e resource* as JSON.

keys

Summary:

Returns a *sequence c*ontaining *all the ke*ys present* in a map

lang

Summary:

This funct*ion tests *whether th*e language* of $node, or the c*ontext ite*m if * the* second ar*gument is *omitted, a*s specifie*d by xml:lang attribute*s is the * * same as, *or is a su*blanguage *of, the la*nguage spe*cified by *$testlang.

last

Summary:

Returns th*e context *size from *the dynami*c context.*

load-xquer*y-module

Summary:

Provides a*ccess to t*he public *functions *and global* variables* of a dyna*mically-lo*aded XQuer*y library *module.

local-name*

Summary:

Returns th*e local pa*rt of the *name of $arg as an xs:string * that is* either th*e zero-len*gth string*, or has t*he lexical* form of a*n * xs:NCName.

local-name*-from-QNam*e

Summary:

Returns th*e local pa*rt of the *supplied Q*Name.

lower-case*

Summary:

Converts a* string to* lower cas*e.

matches

Summary:

Returns tr*ue if the *supplied s*tring matc*hes a give*n regular *expression*.

max

Summary:

Returns a *value that* is equal *to the hig*hest value* appearing* in the in*put sequen*ce.

merge

Summary:

Creates a *new map th*at combine*s entries *from a num*ber of exi*sting maps*.

min

Summary:

Returns a *value that* is equal *to the low*est value *appearing *in the inp*ut sequenc*e.

minutes-fr*om-dateTim*e

Summary:

Returns th*e minute c*omponent o*f an xs:dateTim*e.

minutes-fr*om-duratio*n

Summary:

Returns th*e number o*f minutes *in a durat*ion.

minutes-fr*om-time

Summary:

Returns th*e minutes *component *of an xs:time.

month-from*-date

Summary:

Returns th*e month co*mponent of* an xs:date.

month-from*-dateTime

Summary:

Returns th*e month co*mponent of* an xs:dateTim*e.

months-fro*m-duration*

Summary:

Returns th*e number o*f months i*n a durati*on.

name

Summary:

Returns th*e name of *a node, as* an xs:string that is e*ither the *zero-lengt*h * string*, or has t*he lexical* form of a*n xs:QName.

namespace-*uri

Summary:

Returns th*e namespac*e URI part* of the na*me of $arg, as an * * xs:anyURI value.

namespace-*uri-for-pr*efix

Summary:

Returns th*e namespac*e URI of o*ne of the *in-scope n*amespaces *for $element, * identi*fied by it*s namespac*e prefix.

namespace-*uri-from-Q*Name

Summary:

Returns th*e namespac*e URI part* of the su*pplied QNa*me.

nilled

Summary:

Returns tr*ue for an *element th*at is nilled.

node-name

Summary:

Returns th*e name of *a node, as* an xs:QName.

normalize-*space

Summary:

Returns th*e value of* $arg with lead*ing and tr*ailing whi*tespace re*moved, and* * sequenc*es of inte*rnal white*space redu*ced to a s*ingle spac*e characte*r.

normalize-*unicode

Summary:

Returns th*e value of* $arg after app*lying Unic*ode normal*ization.

not

Summary:

Returns true if the ef*fective bo*olean valu*e of $arg is * false, or false if it is *true.

number

Summary:

Returns th*e value in*dicated by* $arg or, if $arg is not * *specified,* the conte*xt item af*ter atomiz*ation, con*verted to *an xs:double. *

one-or-mor*e

Summary:

Returns $arg if it con*tains one *or more it*ems. Other*wise, rais*es an erro*r. *

outermost

Summary:

Returns ev*ery node w*ithin the *input sequ*ence that *has no anc*estor that* is itself* a * membe*r of the i*nput seque*nce; the n*odes are r*eturned in* document *order with* duplicate*s * elimin*ated.

parse-ietf*-date

Summary:

Parses a s*tring cont*aining the* date and *time in IE*TF format,* returning* the corre*sponding * * xs:dateTim*e value.

parse-json*

Summary:

Parses a s*tring supp*lied in th*e form of *a JSON tex*t, returni*ng the res*ults typic*ally in th*e form * o*f a map or* array.

parse-xml

Summary:

This funct*ion takes *as input a*n XML docu*ment repre*sented as *a string, *and return*s the * do*cument nod*e at the r*oot of an *XDM tree r*epresentin*g the pars*ed documen*t.

parse-xml-*fragment

Summary:

This funct*ion takes *as input a*n XML exte*rnal entit*y represen*ted as a s*tring, and* returns * * the docum*ent node a*t the root* of an XDM* tree repr*esenting t*he parsed *document * * fragment.*

path

Summary:

Returns a *path expre*ssion that* can be us*ed to sele*ct the sup*plied node* relative *to the * r*oot of its* containin*g document*.

position

Summary:

Returns th*e context *position f*rom the dy*namic cont*ext.

prefix-fro*m-QName

Summary:

Returns th*e prefix c*omponent o*f the supp*lied QName*.

put

Summary:

Creates a *map that a*dds a sing*le entry t*o an exist*ing map, o*r replaces* a single *entry in a*n existing* map.

QName

Summary:

Constructs* an xs:QName value giv*en a names*pace URI a*nd a lexic*al QName.

random-num*ber-genera*tor

Summary:

Returns a *random num*ber genera*tor, which* can be us*ed to gene*rate seque*nces of ra*ndom numbe*rs.

remove

Summary:

Returns a *new sequen*ce contain*ing all th*e items of* $target except th*e item * a*t position* $position.

Summary:

Constructs* a new map* by removi*ng an entr*y from an *existing m*ap

Summary:

Constructs* an array *by removin*g the memb*er of a su*pplied arr*ay at a sp*ecified po*sition.

replace

Summary:

Returns a *string pro*duced from* the input* string by* replacing* any subst*rings that* match a * * given reg*ular expre*ssion with* a supplie*d replacem*ent string*.

resolve-QN*ame

Summary:

Returns an* xs:QName value (th*at is, an *expanded-Q*Name) by t*aking an * * xs:string that has *the lexica*l form of *an xs:QName (a * stri*ng in the *form "pref*ix:local-n*ame" or "l*ocal-name"*) and reso*lving it u*sing the * * in-scope *namespaces* for a giv*en element*.

resolve-ur*i

Summary:

Resolves a* relative *IRI refere*nce agains*t an absol*ute IRI.

reverse

Summary:

Reverses t*he order o*f items in* a sequenc*e.

Summary:

Returns an* array con*taining al*l the memb*ers of a s*upplied ar*ray, but i*n reverse *order.

root

Summary:

Returns th*e root of *the tree t*o which $arg belongs. *This will *usually, b*ut * not n*ecessarily*, be a doc*ument node*.

round

Summary:

Rounds a v*alue to a *specified *number of *decimal pl*aces, roun*ding upwar*ds if two *such * val*ues are eq*ually near*.

round-half*-to-even

Summary:

Rounds a v*alue to a *specified *number of *decimal pl*aces, roun*ding to ma*ke the las*t digit * *even if tw*o such val*ues are eq*ually near*.

seconds-fr*om-dateTim*e

Summary:

Returns th*e seconds *component *of an xs:dateTim*e.

seconds-fr*om-duratio*n

Summary:

Returns th*e number o*f seconds *in a durat*ion.

seconds-fr*om-time

Summary:

Returns th*e seconds *component *of an xs:time.

serialize

Summary:

This funct*ion serial*izes the s*upplied in*put sequen*ce $arg as descri*bed in * * [XSLT and X*Query Seri*alization *3.0], returnin*g the seri*alized rep*resentatio*n * of the* sequence *as a strin*g.

size

Summary:

Returns th*e number o*f entries *in the sup*plied map.*

Summary:

Returns th*e number o*f members *in the sup*plied arra*y.

sort

Summary:

Sorts a su*pplied seq*uence, bas*ed on the *value of a* sort key *supplied a*s a functi*on.

Summary:

Sorts a su*pplied arr*ay, based *on the val*ue of a so*rt key sup*plied as a* function.*

starts-wit*h

Summary:

Returns tr*ue if the *string $arg1 contains *$arg2 as a lead*ing * subs*tring, tak*ing collat*ions into *account.

static-bas*e-uri

Summary:

This funct*ion return*s the valu*e of the S*tatic Base* URI prope*rty from t*he static * * context.*

string

Summary:

Returns th*e value of* $arg represent*ed as an xs:string.

string-joi*n

Summary:

Returns a *string cre*ated by co*ncatenatin*g the item*s in a seq*uence, wit*h a define*d * separa*tor betwee*n adjacent* items.

string-len*gth

Summary:

Returns th*e number o*f characters* in a stri*ng.

string-to-*codepoints*

Summary:

Returns th*e sequence* of codepoints* that cons*titute an * * xs:string value.

subarray

Summary:

Gets an ar*ray contai*ning all m*embers fro*m a suppli*ed array s*tarting at* a supplie*d * positi*on, up to *a specifie*d length.

subsequenc*e

Summary:

Returns th*e contiguo*us sequenc*e of items* in the va*lue of $sourceSeq* * beginni*ng at the *position i*ndicated b*y the valu*e of $startingL*oc and * con*tinuing fo*r the numb*er of item*s indicate*d by the v*alue of $length.

substring

Summary:

Returns th*e portion *of the val*ue of $sourceStr*ing beginning* at the po*sition * i*ndicated b*y the valu*e of $start and conti*nuing for *the number* of characters* indicated* by the va*lue of * $length.

substring-*after

Summary:

Returns th*e part of *$arg1 that foll*ows the fi*rst occurr*ence of * * $arg2, taking c*ollations *into accou*nt.

substring-*before

Summary:

Returns th*e part of *$arg1 that prec*edes the f*irst occur*rence of * * $arg2, taking c*ollations *into accou*nt.

sum

Summary:

Returns a *value obta*ined by ad*ding toget*her the va*lues in $arg.

tail

Summary:

Returns al*l but the *first item* in a sequ*ence.

Summary:

Returns an* array con*taining al*l members *except the* first fro*m a suppli*ed array.

timezone-f*rom-date

Summary:

Returns th*e timezone* component* of an xs:date.

timezone-f*rom-dateTi*me

Summary:

Returns th*e timezone* component* of an xs:dateTim*e.

timezone-f*rom-time

Summary:

Returns th*e timezone* component* of an xs:time.

tokenize

Summary:

Returns a *sequence o*f strings *constructe*d by split*ting the i*nput where*ver a sepa*rator is * * found; th*e separato*r is any s*ubstring t*hat matche*s a given *regular ex*pression.

trace

Summary:

Provides a*n executio*n trace in*tended to *be used in* debugging* queries.

transform

Summary:

Invokes a *transforma*tion using* a dynamic*ally-loade*d XSLT sty*lesheet.

translate

Summary:

Returns th*e value of* $arg modified *by replaci*ng or remo*ving indiv*idual * ch*aracters. *

true

Summary:

Returns th*e xs:boolean* value true.

unordered

Summary:

Returns th*e items of* $sourceSeq* in an implementa*tion-depen*dent order.

unparsed-t*ext

Summary:

The fn:unparse*d-text function *reads an e*xternal re*source (fo*r example,* a * file)* and retur*ns a strin*g represen*tation of *the resour*ce.

unparsed-t*ext-availa*ble

Summary:

Because er*rors in ev*aluating t*he fn:unparse*d-text function *are * non-*recoverabl*e, these t*wo functio*ns are pro*vided to a*llow an ap*plication *to determi*ne * wheth*er a call *with parti*cular argu*ments woul*d succeed.*

unparsed-t*ext-lines

Summary:

The fn:unparse*d-text-lin*es function *reads an e*xternal re*source (fo*r * exampl*e, a file)* and retur*ns its con*tents as a* sequence *of strings*, one for *each line *of * text *in the str*ing repres*entation o*f the reso*urce.

upper-case*

Summary:

Converts a* string to* upper cas*e.

uri-collec*tion

Summary:

Returns a *sequence o*f xs:anyURI values re*presenting* the URIs *in a resou*rce * coll*ection.

year-from-*date

Summary:

Returns th*e year com*ponent of *an xs:date.

year-from-*dateTime

Summary:

Returns th*e year com*ponent of *an xs:dateTim*e.

years-from*-duration

Summary:

Returns th*e number o*f years in* a duratio*n.

zero-or-on*e

Summary:

Returns $arg if it con*tains zero* or one it*ems. Other*wise, rais*es an * er*ror.

3 XSL Transf*ormations *(XSLT) Fun*ctions

This secti*on lists a*ll of the *functions *defined in* the [XSLT 3.0] specifica*tion. Each* function *and operat*or is uniq*uely ident*ified with* a URI of *the form: *“http://www*.w3.org/20*05/xpath-f*unctions#name” where name is the na*me of a fu*nction or *operator, *such as “s*ystem-prop*erty”: http://www*.w3.org/20*05/xpath-f*unctions#s*ystem-prop*erty.

The normat*ive defini*tions of t*hese funct*ions are i*n the [XSLT 3.0] specifica*tion. For *convenienc*e, a very *brief, non*-normative* summary o*f each fun*ction is p*rovided. F*or details*, follow t*he link on* the “Summ*ary:” intr*oductory t*ext below *each funct*ion.

4 XML Schema*

The funct*ion fn:analyze*-string(), identifi*ed in sect*ion 3 XSL Transf*ormations *(XSLT) Fun*ctions above, re*turns resu*lts that a*re always *valid acco*rding to a*n XML Sche*ma specifi*ed in [XPath and *XQuery Fun*ctions and* Operators* 3.1]. That XML* Schema de*fined four* XML eleme*nts and th*ree XML Sc*hema compl*ex types. * The XML e*lements ar*e named: *

<analyze-s*tring-resu*lt>
<match>
<non-match*>
<group>

The XML S*chema comp*lex types *are named:*

analyze-st*ring-resul*t-type
match-type*
group-type*

The targe*t namespac*e of this *XML Schema* is http://www*.w3.org/20*05/xpath-f*unctions.

This sche*ma specifi*es the XML* syntax of* the resul*t returned* by fn:analyze*-string as define*d in [XPath and *XQuery Fun*ctions and* Operators* 3.1]. It is l*ocated at *http://www*.w3.org/20*14/10/xpat*h-function*s-31/analy*ze-string.*xsd.

5 Normative *References*

These docu*ments desc*ribe the n*ames that *are define*d in this *namespace *at the tim*e of publi*cation. T*he W3C res*erves the *right to d*efine addi*tional nam*es in this* namespace* in the fu*ture.

XPath and *XQuery Fun*ctions and* Operators* 3.1
XSLT 3.0

XSL Transf*ormations *(XSLT) 3.0* (12 Decem*ber 2013 v*ersion)

6 Non-Normat*ive Refere*nces

Resource D*irectory D*escription* Language *(RDDL)
Gleaning R*esource De*scriptions* from Dial*ects of La*nguages (G*RDDL)
Resource D*escription* Framework* (RDF): Co*ncepts and* Abstract *Syntax
  翻译: