Subject: RE: [xsl] How can I return all urls in a string From: "Michael Kay" <mhk@xxxxxxxxx> Date: Mon, 29 Sep 2003 08:23:47 +0100 |
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: [xsl] 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: [xsl] 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] How can I return all urls, David Carlisle | Thread | Re: [xsl] How can I return all urls, WebShark |
Re: [xsl] slightly OT: php and xsl-, Mukul Gandhi | Date | Re: [xsl] How can I return all urls, WebShark |
Month |