[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: use of starts-with()

Subject: RE: use of starts-with()
From: "Matthew L. Avizinis" <mla@xxxxxxxxx>
Date: Fri, 26 Oct 2001 13:18:26 -0400
RE:  use of starts-with()
Thanks much.  However, this solution only works if the string contains only
the integer,  parenthesis and space, i.e. without any other text.  In the
original question I asked if the string _starts with_ "#) " [#=some int].
In comparing this solution with David Carlisle's, his is the more general
case.
It was fun to work this out, though.  Thanks for both your efforts.  This
was a good way to increase my skill a little more. (Although now that the
solution is laid out in front of me, I see that half the solution was
staring me in the face as an example all along on page 562 of XSLT
Programmer's Reference, 2nd.  I just couldn't see how to put the two halves
together.)

And on the remote chance anyone is interested in why I wanted to know this:
My company had a number of outlines which were formatted in HTML.  Since at
that time we needed a list type of "#) followed_by_text" we had create a <ol
style="list-type: none"> and insert the counting numbers as I outlined.
Now, years later, we XHTML-ized the HTML, and are converting it to an
XML-based publishing paradigm, but we only need the content from those lines
not the "#) " at the start.  Now with this eloquent little check, when all
the <li> nodes are parsed the "#) " can be easily removed.  Thanks again.

   Matthew L. Avizinis <mailto:mla@xxxxxxxxx>
Gleim Publications, Inc.
   4201 NW 95th Blvd.
 Gainesville, FL 32606
(352)-375-0772 ext. 101
      www.gleim.com <http://www.gleim.com>


> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Chris Bayes
> Sent: Thursday, October 25, 2001 8:14 PM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: RE:  use of starts-with()
>
>
> > Correct?
> Maybe. Or
> starts-with(translate(.,'123456789','000000000'),substring('000000)',8 -
> string-length(.)))
>
> Ciao Chris
>
> XML/XSL Portal
> http://www.bayes.co.uk/xml
>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.