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

Re: Implementing " and ' in literals

Subject: Re: Implementing " and ' in literals
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 20 Apr 2000 10:16:41 +0100 (BST)
Re: Implementing " and ' in literals
> In XML::XPath (perl's XPath processing module) I implemented translation
> of &quot; and &apos; in literals to " and ' respectively.
> So what do people think of this?

I think it's completely broken!

The behaviour of the entities is completely determined by the XML
specification, so if you deviate from that there will be no way of
sharing stylesheets between XML::XPath and a conforming XSL system.

So it adds no new functionality and breaks interoperability.


> <xsl:value-of select="&quot;I'm feeling &amp;quot;sad&amp;quot;&quot;"/>
> 
> Which gives you a literal of:

> I'm feeling "sad"

The value of the above is the value of the xpath expression
 "I'm feeling &quot;sad&;quot;"

which is the string, when written out in XML syntax looks like

I'm feeling &amp;quot;sad&amp;quot;

If you want to produce the string I'm feeling "sad" then just use
 
<xsl:value-of select="translate('IXm feeling &quot;sad&quot;','X', &quot;'&quot;)"/>

David


 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.