xsl-list
[Top] [All Lists]

Re: [xsl] translate apos in string

2007-01-16 07:47:30
Florent Georges wrote:
translate(translate(/node,'
',''),''', ''')
and ''' is a syntax error.

  Mmh, doesn't translate(xxx, ''', ''') call translate() with two
parameters, xxx and "', '" ?  Which is of course an error, but because
translate() doesn't have a version of arity 2.

This would be XSLT 2 error, because it allows escaping of ' and " by doubling it.

On XSLT 1, this escape mechanism is not allowed, causing the statement to be interpreted as:
translate(xxx, ''   ', '   '')

which is an illegal concatenation of apostrophes.

-- Abel

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>