Re: tokenizing and counting with xsl:analyze-string
| Newsgroups | gmane.text.xml.xsl.general.mulberrytech |
|---|---|
| Message-ID | <[email protected]> |
Am 17.10.2020 um 15:53 schrieb Mukul Gandhi [email protected]: > On Sat, Oct 17, 2020 at 4:27 PM Mukul Gandhi [email protected] > <mailto:[email protected]> <[email protected] > <mailto:[email protected]>> wrote: > > With above mentioned XSLT stylesheet, the thing that worked is, not > explicitly declaring the type for xsl:variable name="temp_result". > > I find this strange. > > With context to my example, if xsl:variable name="temp_result" without > an explicit type declaration on the variable, presents the result of > this variable as string (and string-length(translate(... working fine on > such a variable), Without having any "as" attribute your variable is a document fragment node containing the content constructed by the sequence constructor; of course if you use functions like "translate" expecting a string value the string value of the document fragment (which is the concatenation of the string value(s) of all child nodes) is being used. --~---------------------------------------------------------------- XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/3329386 or by email: [email protected] --~--