You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Ashish Srivastava <as...@yahoo.com> on 2004/03/26 05:43:06 UTC
translate funtion with in xtags library
Hi,
I have a following XML :
<root>
<summary>
<a
href="javascript:window.open('..','..'...);">Link</a>
</summary>
</root>
I am using xtags-library to read the summary as :
<xtags:copyOf context=... select="//summary"/>
All the "'" are converted into ' It works on
mozilla but not Netscape 4.79. I tried saving the page
and then manually replaced all "&apos" back to "'" and
it worked. Now, what I am trying to do is to use
Xpath's translate() function to convert all &apos back
to "'". Each time I am getting errors. Please help!
Thanks,
-Ashish
__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: translate funtion with in xtags library
Posted by Kris Schneider <kr...@dotech.com>.
Hm, I seem to be on an XSLT kick lately, but here's a test that worked with
JSTL's <x:transform> tag:
<%@ page contentType="text/plain" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="x" uri="http://java.sun.com/jstl/xml" %>
<c:set var="xml">
<root>
<summary>
<a href="javascript:window.open('..','..');">Link</a>
</summary>
</root>
</c:set>
<c:set var="xslt">
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="html"/>
<xsl:template match="//summary">
<xsl:copy-of select="a"/>
</xsl:template>
</xsl:stylesheet>
</c:set>
<x:transform xml="${xml}" xslt="${xslt}"/>
Which produced:
<a href="javascript:window.open('..','..');">Link</a>
Quoting Ashish Srivastava <as...@yahoo.com>:
> Hi,
> I have a following XML :
>
> <root>
> <summary>
> <a
> href="javascript:window.open('..','..'...);">Link</a>
>
> </summary>
> </root>
>
> I am using xtags-library to read the summary as :
>
> <xtags:copyOf context=... select="//summary"/>
>
> All the "'" are converted into ' It works on
> mozilla but not Netscape 4.79. I tried saving the page
> and then manually replaced all "&apos" back to "'" and
> it worked. Now, what I am trying to do is to use
> Xpath's translate() function to convert all &apos back
> to "'". Each time I am getting errors. Please help!
>
>
> Thanks,
> -Ashish
--
Kris Schneider <ma...@dotech.com>
D.O.Tech <http://www.dotech.com/>
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org