ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> exslt
exslt
[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="' &#9;&#10;'" 
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> &lt;xsl:call-template name="str:tokenize"></code><br/>
       <code>   &lt;xsl:with-param name="string" 
select="'a,b,,c,d'"/> </code><br/>
       <code>   &lt;xsl:with-param name="delimiters" select="','"/></code><br/>
       <code>   &lt;xsl:with-param name="return-empty-tokens" 
select="true()"/> </code><br/>
       <code> &lt;/xsl:call-template></code><br/>
       <p> returns:</p>
       <code> &lt;token>a&lt;/token></code><br/>
       <code> &lt;token>b&lt;/token></code><br/>
       <code> &lt;token/></code><br/>
       <code> &lt;token>c&lt;/token></code><br/>
       <code> &lt;token>d&lt;/token></code><br/>
     </arg> 
   </definition> 
</function> 


_______________________________________________
exslt mailing list
list@[...].org
http://www.exslt.org/list

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved