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

Re:Escaping quotes in XPath expressions

Subject: Re:Escaping quotes in XPath expressions
From: yguaba@xxxxxxxxxxxx
Date: Mon, 17 Nov 2003 19:00:08 -0200
escaping in php
Here's "wrap-up" for anyone following this thread.

On 17 Nov 2003, Michael Kay wrote:

> Firstly, XSLT 1.1 is dead in the water. 

On 17 Nov 2003, David Carlisle wrote:

> You mean xslt 1.0 here (there never was (and never will be) an xslt
> 1.1 just a draft that was never coompleted to a recommendation) 

Actually, I did mean XSLT 1.1 ? sorry about that! My reference was "Inside XSLT" by 
Steven Holzner (2001), but that book is obviously completely outdated by now.

---------------------

On 17 Nov 2003, Michael Kay wrote:

> <xsl:variable name="quot" select='"'/>
> <xsl:variable name="apos" select="'"/>

On 17 Nov 2003, David Carlisle wrote:

> If you want to do it using select then you need teh Xpath expression
> "'" and to put that expression into an XML attribute you need either 
> 
> select="&quot;'&quot;"
> or
> select="'&quot;'"

I tried both solutions but only the second one (David's) seems to work. The processors I 
used for the test were IE 6's and Netscape 7.1's build-in processores and PHP's 
Sablotron (PHP v. 4.3.4). (Forgive me if Sablotron is not the actual name of the PHP 
processor; I get confused.)

---------------------

On 17 Nov 2003, Michael Kay wrote:

> Dimitre thought you were actually trying to use translate() to replace one
> character by several. If that's the case, then he's right, you can't do
> it.

Dimitre was right, but after I found out that 'translate()' wouldn't do what I needed, I 
thought I might as well dig into this and learn a little.

A million thanks to Michael, Dimitre and David for spending some of their valuable time 
trying to help me. Hopefully other people will also have learned something from this 
thread.

Erik

 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.