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

RE: How can I return all urls in a string

Subject: RE: How can I return all urls in a string
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Mon, 29 Sep 2003 08:23:47 +0100
moreinformation.com
If you're restricted to XSLT 1.0, use a recursive template or an
xx:tokenize() extension function to break the text into words, then test
each word to see if it starts with "http://" or "HTTP://".

Michael Kay

> 
> Of course, you're right.  Any url's that don't start with 
> http:// or href will be ignored.  What I want to do is take 
> an xml file like this:
> 
> <document>
> <longstring>for more information look here: http://url.com  
> for other products look here: http://moreinformation.com  to 
> see a review go here: http://www.review.com. </longstring> </document>
> 
> and translate it into this:
> 
> <document>
>      <url>http://url.com</url>
> </document>
> 
> <document>
>      <url>http://moreinformation.com</url>
> </document>
> 
> <document>
>      <url>http://www.review.com</url>
> </document>
> 
> Thanks
> 
> 
> 
>                                                               
>                                                               
>                     
>                       "Michael Kay"                           
>                                                               
>                     
>                       <mhk@xxxxxxxxx>                   To:   
>     <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>                         
>                     
>                       Sent by:                          cc:   
>                                                               
>                     
>                       owner-xsl-list@xxxxxxxxxxx        
> Subject:  RE:  How can I return all urls in a string     
>                           
>                       rrytech.com                             
>                                                               
>                     
>                                                               
>                                                               
>                     
>                                                               
>                                                               
>                     
>                       09/28/2003 04:15 PM                     
>                                                               
>                     
>                       Please respond to xsl-list              
>                                                               
>                     
>                                                               
>                                                               
>                     
> 
> 
> 
> 
> 
> Please try to explain you question more clearly. What are you 
> trying to do? What do you mean "Obviously I know the url will 
> start with 'http://'
> - how do you know this? (Many URLs do not start with this string).
> 
> Michael Kay
> 
> 
> > -----Original Message-----
> > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Brian 
> > Benson
> > Sent: 28 September 2003 18:42
> > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > Subject:  How can I return all urls in a string
> >
> >
> > I'm not sure how to do this.  Obviously I know the url will 
> start with 
> > "http://" but I don't know what it will end with. Any thoughts or 
> > pointers are appreciated.
> >
> > Thanks
> >
> >
> >
> >  XSL-List info and archive:  
> http://www.mulberrytech.com/xsl/xsl-list
> >
> 
> 
>  XSL-List info 
> and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 
> 
> 
> 
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 


 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.