Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 18th, 2010, 10:21 AM
Friend of Wrox
 
Join Date: Jul 2006
Posts: 430
Thanks: 28
Thanked 5 Times in 5 Posts
Send a message via Yahoo to bonekrusher
Default replace forward slash (/)

Hi,

I am getting this error in Saxon when trying to replace a forward slash (/)

Code:
FORX0004: Invalid replacement string in replace(): \ character must be followed by \ or $
This is the line throwing the error:

Code:
<xsl:value-of select="replace('../../temp', '../../', 'c:/newfolder/' )"/>
Do I need to escape the forward slash?

Thanks,
 
Old March 18th, 2010, 10:26 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

It's telling you there's a backslash in the replacement string, and it seems unlikely it would tell you that if there isn't. Are you sure the code you have shown is the code you are executing?
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
 
Old March 18th, 2010, 12:19 PM
Friend of Wrox
 
Join Date: Jul 2006
Posts: 430
Thanks: 28
Thanked 5 Times in 5 Posts
Send a message via Yahoo to bonekrusher
Default

Thanks Michael. I'll need to need to hunt this down.

Regards,





Similar Threads
Thread Thread Starter Forum Replies Last Post
value-of with forward slash in attribute value BassmanNL XSLT 2 February 23rd, 2010 06:37 AM
not able to add forward slash in regex eruditionist Perl 2 May 14th, 2009 10:15 AM
How to Escape Forward Slash in XPath/ XSLT? tclancy XSLT 4 January 10th, 2006 05:28 PM
Forward booking rahilahmed Pro VB Databases 1 June 16th, 2004 06:02 PM
Slash Sign "\" in Server Name??? omermalik BOOK: ASP.NET Website Programming Problem-Design-Solution 1 October 10th, 2003 05:14 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.