Re: [xslt] string literal with single-quote inside won't parse
- From: Michael Ludwig <mlu as-guides com>
- To: The Gnome XSLT library mailing-list <xslt gnome org>
- Subject: Re: [xslt] string literal with single-quote inside won't parse
- Date: Mon, 14 Sep 2009 18:16:41 +0200
Viktor Stujber schrieb:
<xsl:value-of select=""Hello, I'm a literal with an apostrophe inside.""/>
This is interesting... could you point me to the part of the spec that
describes the rules for constructing literals this way?
The XML parser turns the attribute value into:
'Hello, I'm a literal with an apostrophe inside.'
And that's not a valid XPath 1.0 expression. So it's a bit awkward in
1.0, that's a fact. In 2.0, you can quote apostrophe or quote character
by doubling them.
'Hello, I''m a literal with an apostrophe inside.'
"Did you say ""apostrophe""?"
--
Michael Ludwig
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]