[exslt] (no subject)
by Greg Faron other posts by this author
Apr 15 2002 5:24PM messages near this date
RE: [exslt] using set operations on two documents
|
[exslt] xsl help
As per the Submissions page on www.exslt.org, I'm posting this XML file
here to discuss potential alterations to the str:tokenize function. Please
forgive me if this is not the proper etiquette, as the site is rather
confusing. I actually have a complete template implementing the proposed
parameters, but don't know where to put it on the website.
Greg Faron
Integre Technical Publishing Co.
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="submissions.xsl"?>
<!DOCTYPE function SYSTEM 'function-submission.dtd'>
<function date="15 April 2002" status="new">
<module> str</module>
<name> tokenize</name>
<meta>
<author email="gfaron@integretechpub.com"
url="http://www.integretechpub.com/"> Greg Faron</author>
<changes> Added optional parameters to template written by Jeni
Tennison.</changes>
<summary written-in="html">
<p> The <code>str:tokenize</code> function splits up a string and
returns a node set of <code> token</code> elements, each containing one
token from the string.</p>
</summary>
</meta>
<documentation written-in="html"> The added parameters are common
requests in string tokenizers of other programming languages.</documentation>
<definition>
<return type="RTF" written-in="html"> A list of <code>token</code>
elements.</return>
<arg name="string" type="string" optional="no"> The string to be
tokenized.</arg>
<arg name="delimiters" type="string" default="' 	 '"
optional="yes" written-in="html">
A string consisting of a number of characters.
Each character in this string is taken as a delimiting character.
The string given by the first argument is split at any occurrence
of any of these characters.
</arg>
<arg name="return-delimiters" type="boolean" default="false()"
optional="yes" written-in="html">
Determines if <code> token</code> elements containing the actual
delimiting
character are returned within the node set.
</arg>
<arg name="return-empty-tokens" type="boolean" default="false()"
optional="yes" written-in="html">
<p> Determines if empty <code>token</code> elements are returned within
the node set. An empty token element would appear if the following
template
call were enacted:</p>
<code> <xsl:call-template name="str:tokenize"></code><br/>
<code> <xsl:with-param name="string"
select="'a,b,,c,d'"/> </code><br/>
<code> <xsl:with-param name="delimiters" select="','"/></code><br/>
<code> <xsl:with-param name="return-empty-tokens"
select="true()"/> </code><br/>
<code> </xsl:call-template></code><br/>
<p> returns:</p>
<code> <token>a</token></code><br/>
<code> <token>b</token></code><br/>
<code> <token/></code><br/>
<code> <token>c</token></code><br/>
<code> <token>d</token></code><br/>
</arg>
</definition>
</function>
_______________________________________________
exslt mailing list
list@[...].org
http://www.exslt.org/list
|