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

RE: Converting embedded URLs int hot links via XSL

Subject: RE: Converting embedded URLs int hot links via XSL
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Mon, 19 Apr 2004 21:50:05 +0100
escape a double quote xsl
I'm not going to start debugging this kind of regex for people. But the "$"
at the end, and the absense of any upper-case letters, look pretty dubious.

Michael Kay 

> -----Original Message-----
> From: Ragulf Pickaxe [mailto:jawxml@xxxxxxxxxxx] 
> Sent: 19 April 2004 09:31
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: RE:  Converting embedded URLs int hot links via XSL
> 
> 
> >tokenize seems about right, to find the preceding and 
> following strings,
> >which may then be used in substring before and after to 
> extract the needed
> >string.
> >
> >but saxon 7.9.1 seems not to match using
> >
> ><xsl:template match="/vs/url">
> >   <xsl:message>
> >   <xsl:for-each select="tokenize (.,
> >'(http|https|ftp)://((([a-z_0-9\-]+)+(([:]?)+([a-z_0-9\-]+))?
)(@+)?)?(((((([
> >0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0-5]))).(((([0-1])
> ?([0-9])?[0-9])
> >|(2[0-4][0-9])|(2[0-5][0-5]))).(((([0-1])?([0-9])?[0-9])|(2[0
> -4][0-9])|(2[0-
> >5][0-5])))\.(((([0-1])?([0-9])?[0-9])|(2[0-4][0-9])|(2[0-5][0
> -5]))))|((([a-z
> >0-9\-])+.)+([a-z]{2}.[a-z]{2}|[a-z]{2,4})))(([:])(([1-9]{1}[0
-9]{1,3})|([1-5
> >]{1}[0-9]{2,4})|(6[0-5]{2}[0-3][0-6])))?(/)?$')">
> >     <xsl:value-of select="."/><xsl:text>
> >     ========
> ></xsl:text>
> >   </xsl:for-each>
> ></xsl:message>
> >
> ></xsl:template>
> >
> >only printing out the full string.
> 
> Well, bug or should be used differently? Only M. Kay can tell.
> 
> >
> >I'm also curious how I might add (escape) the single or 
> double quotes prior
> >to the
> >url in the example.
> >http://www.w3.org/TR/xmlschema-2/#nt-Punctuation seems not 
> to include 
> >these?
> >
> 
> Can't help you there - regular expressions par se gives no 
> special meaning 
> to single nor double quotes, so it is an issue in XSLT - and 
> I expect you to 
> be better at that, than me.
> 
> >
> >regards DaveP
> >
> 
> Regards,
> Ragulf Pickaxe :-)
> 
> _________________________________________________________________
> Fe alle de nye og sjove ikoner med MSN Messenger 
> http://www.msn.dk/messenger

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.