I am using Trax to generate translets. Following is the code snippet used to generate TransformerFactory class object :
String key = "javax.xml.transform.TransformerFactory"; String value = "org.apache.xalan.xsltc.trax.TransformerFactoryImpl"; Properties props = System.getProperties(); props.put(key, value); System.setProperties(props); javax.xml.transform.TransformerFactory tFactory = javax.xml.transform.TransformerFactory.newInstance(); Templates templates = tFactory.newTemplates(new StreamSource(xslInURI)); I will test it with latest XSLTC version. Regards. Rajeev -----Original Message----- From: Santiago Pericas-Geertsen [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 04, 2002 2:21 PM To: Sachdeva, Rajeev; 'Antony Quinn'; [EMAIL PROTECTED] Subject: Re: special character Rajeev: I tried your stylesheet from the command line using the lastest XSLTC and it *works*. So please get release 2.4.1 or give us more information about your environment (i.e. whether you're using Trax, native API, etc.). -- Santiago On Wednesday 04 December 2002 07:02, Sachdeva, Rajeev wrote: > Thanks to everyone who has given special attention to this non-uri > character escaping problem. > This problem only arise when I give xsl:ouput as HTML, for XML output it > gives correct value. > It looks like there is bug in XSLTC which has to be rectified. > > Please find the attached xsltc_Manifest, xalan_Manifest and test xml, xsl > file for your reference. > > > Regards. > > Rajeev > -----Original Message----- > From: Santiago Pericas-Geertsen > [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 03, 2002 4:50 PM > To: Sachdeva, Rajeev; 'Antony Quinn'; [EMAIL PROTECTED] > Subject: Re: special character > > > Rajeev: > > Attribute values are escaped differently from the text nodes, this is why > you see a difference. However, it appears that XSLTC is escaping "value" as > it were a URI-valued attribute. > > What version of Xalan/XSLTC are you using? Are you using the command line, > the native API or TrAX? > > -- Santiago > > On Tuesday 03 December 2002 11:34, Sachdeva, Rajeev wrote: > > I have used ISO-8859-1 encoding in xsl. > > The strange thing about this transformation is that when I give Å in > > <TD> it works fine whereas if I give as <TD><INPUT name="test" > > value="Å"/></TD> it gives me %c5 value. > > > > Regards. > > > > Rajeev Sachdeva > > Energy & Utilities > > Logica > > Direct Line: 01224 388845 > > www.logica.com > > > > -----Original Message----- > > From: Antony Quinn [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, December 03, 2002 4:27 PM > > To: [EMAIL PROTECTED] > > Subject: RE: special character > > > > > > Rajeev, > > > > Which character encoding are you using? > > > > Antony > > > > -----Original Message----- > > From: Sachdeva, Rajeev [mailto:[EMAIL PROTECTED] > > Sent: 03 December 2002 15:53 > > To: 'Antony Quinn'; [EMAIL PROTECTED] > > Subject: RE: special character > > > > > > Thanks for your reply, but my problem is still not resolved, I tried both > > the ways and > > I get Å as a result of first option and %c5 as a result of second > > option. > > > > I have tried giving disable-output-escaping="yes" in value-of tag and > > that too didn't > > work. > > > > For your information I am using Apache's XSLTC for XSL transformation, > > using translet for transformation. > > > > Following are the parameters used to provide TransformerFactor class to > > create translet : > > > > String key = "javax.xml.transform.TransformerFactory"; > > String value = "org.apache.xalan.xsltc.trax.TransformerFactoryImpl"; > > > > Regards. > > Rajeev > > > > -----Original Message----- > > From: Antony Quinn [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, December 03, 2002 2:32 PM > > To: [EMAIL PROTECTED] > > Subject: RE: special character > > > > > > Rajeev, > > > > There are two methods you could use: > > > > 1. Use &#197; instead of Å ie: > > <xsl:variable name="special_character">&#197;</xsl:variable> > > > > 2. Use an ENTITY declaration, e.g. > > <?xml version="1.0" encoding="UTF-8"?> > > <!DOCTYPE xsl:stylesheet [ > > <!ENTITY special-character "Å"> > > ]> > > <xsl:stylesheet version="1.0" > > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > > > <xsl:template match="/"> > > <xsl:element name="INPUT"> > > <xsl:attribute name="name">test</xsl:attribute> > > <xsl:attribute name="value">&special-character;</xsl:attribute> > > </xsl:element> > > </xsl:template> > > </xsl:stylesheet> > > > > Regards, > > > > Antony > > > > P.S. A simpler method to produce an INPUT tag is as follows: > > <xsl:template match="/"> > > <INPUT name="test" value="&special-character;"/> > > </xsl:template> > > > > > > -----Original Message----- > > From: Sachdeva, Rajeev [mailto:[EMAIL PROTECTED] > > Sent: 03 December 2002 11:26 > > To: '[EMAIL PROTECTED]' > > Subject: special character > > > > > > Hi, > > > > Does anyone know how to display special character in Input element text > > line ? > > > > Code snippet in xsl : > > > > <xsl:variable name="special_character">Å</xsl:variable> > > <xsl:element name="INPUT"> <!-- INPUT --> > > <xsl:attribute name="name">test</xsl:attribute> > > <xsl:attribute name="value"> > > <xsl:value-of select="$special_character"/> > > </xsl:attribute> > > </xsl:element> > > > > Expected result : � > > > > Acutal Output in Input element : %c5 <-- Wrong > > > > How to display � instead of %c5 in HTML Input element ? > > > > Thanks for your help. > > > > Regards. > > > > Rajeev Sachdeva > > > > This e-mail and any attachment is for authorised use by the intended > > recipient(s) only. It may contain proprietary material, confidential > > information and/or be subject to legal privilege. It should not be > > copied, > > > disclosed to, retained or used by, any other party. If you are not an > > intended recipient then please promptly delete this e-mail and any > > attachment and all copies and inform the sender. Thank you. > > > > This e-mail and any attachment is for authorised use by the intended > > recipient(s) only. It may contain proprietary material, confidential > > information and/or be subject to legal privilege. It should not be > > copied, > > > disclosed to, retained or used by, any other party. If you are not an > > intended recipient then please promptly delete this e-mail and any > > attachment and all copies and inform the sender. Thank you. > > > > This e-mail and any attachment is for authorised use by the intended > > recipient(s) only. It may contain proprietary material, confidential > > information and/or be subject to legal privilege. It should not be > > copied, > > > disclosed to, retained or used by, any other party. If you are not an > > intended recipient then please promptly delete this e-mail and any > > attachment and all copies and inform the sender. Thank you. > > This e-mail and any attachment is for authorised use by the intended > recipient(s) only. It may contain proprietary material, confidential > information and/or be subject to legal privilege. It should not be copied, > disclosed to, retained or used by, any other party. If you are not an > intended recipient then please promptly delete this e-mail and any > attachment and all copies and inform the sender. Thank you. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
