This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: translate quot to apos



> The following does not work, XT complains about a missing quote in the line
> containing the translate function. 

>    <xsl:value-of select="translate(Tag1, '&quot;', '&apos;')"/>

After the XML parser has finished, the above passes the following xpath
expression to the XSL system

"translate(Tag1, '"', ''')

and that third argument isn't legal, so you can instead do

   <xsl:value-of select="translate(Tag1, '&quot;', '&quot;'&quot;)"/>

which is the xpath expression

"translate(Tag1, '"', "'")

David


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]