[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Netscape XSL and ' character


netscape xsl
> Anybody who can answer my question....
> 
> I am using Netscape 6.2 on WIN 2000 PC. No web server used. All taking
> place on client.
> 
> I have a XSL and XML file (see the files below). I am calling a javascript
> function and passing a parameter using two '  (single quotes) to wrap the
> string. Netscape converts this to '. This is not I want. I want
> netscape to just pass the value with two ' on both sides.
> 
> Hyperlink generated by Netscape is
> javascript('prod39.xml')
> What I want is        javascript('prod39.xml')
> 
> I tried few things and they don't work,
> 
> 1)  I used <xsl:text disable-output-escaping="yes">. Does not work because
> "disable-output-escaping" is not supported by Netscape. 
> (see
> http://developer.netscape.com/evangelism/docs/articles/xslt/netscapexslt34
> .html#22621)
> 
> 2) I used <!DOCTYPE xsl:stylesheet [<!ENTITY qu "&#34;">]> in the xsl file
> and used &qu; to generate single quotes. This also does not work.
> 
> I want the solution for Netscape. I don't have problem with IE.
> 
> Can any body help?
> Thanks
> 
> Gururaj
> 
> Example:
> XML
> ===============================================
> <?xml version="1.0" encoding="iso-8859-1"?>
> <?xml-stylesheet type="text/xsl" href="../html/equipment.xsl"?>
> <plant>
>     <dept deptid="231" deptname="Drier Crusher Department" deptno="010">
>         <eqpt eqptid="39">
>             <equipmentno>010.AS100</equipmentno>
>             <description>High-top airslide 300 12 200</description>
>             <contractno>99-20043</contractno>
>             <manufactureno>5.704620</manufactureno>
>             <pdb_number>20837</pdb_number>
>             <prodxml>prod39.xml</prodxml>
>         </eqpt>
>         <eqpt eqptid="38">
>             <equipmentno>010.AS200</equipmentno>
>             <description>Low-bottom airslide 200 12 100</description>
>             <contractno/>
>             <manufactureno/>
>             <pdb_number>20837</pdb_number>
>             <prodxml>prod38.xml</prodxml>
>         </eqpt>
>         <eqpt eqptid="37">
>             <equipmentno>010.AS300</equipmentno>
>             <description>No-bottom airslide 200 12 100</description>
>             <contractno/>
>             <manufactureno/>
>             <pdb_number>20837</pdb_number>
>             <prodxml>prod37.xml</prodxml>
>         </eqpt>
>     </dept>
> </plant>
> =============================================================
> XSL
> 
> <?xml version='1.0' encoding="iso-8859-1"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <xsl:output method="html"/>
> <xsl:template match="/">
>    <html>
>       <head>
>          <title></title>
>       </head>
> 	<SCRIPT language="JavaScript">
> 		<xsl:comment><![CDATA[
> 			function test(avalue) {
> 				alert(avalue);
> 			}
> 		]]></xsl:comment></SCRIPT>
>       <body>
> 		<table border="0" width="95%" cellspacing="2"
> cellpadding="0" align="center">
> 		<tr>
> 		    <td>Equipment No.</td>
> 		    <td>Description</td>
> 		    <td>Manufacture No.</td>
> 		    <td>Contract No.</td>
> 		</tr>
> 		<xsl:apply-templates select="plant/dept/eqpt"/> 
> 		</table>
>             	
>       </body>
>    </html>
> </xsl:template>
> <xsl:template match="plant/dept/eqpt">
> 	<xsl:for-each select=".">
> 		<xsl:sort select="equipmentno"/>
>         	<tr><td><a><xsl:attribute name="href">
> 				javascript:test('</xsl:text><xsl:value-of
> select="prodxml"/>')
> 			</xsl:attribute>
> 			<xsl:value-of select="equipmentno"/>
> 			</a>
> 		    </td>
> 		    <td><xsl:value-of select="description"/></td>
> 		    <td><xsl:value-of select="manufactureno"/></td>
> 		    <td><xsl:value-of select="contractno"/></td>  
> 		</tr>
> 	</xsl:for-each>
> </xsl:template>
> </xsl:stylesheet>
> 
> 

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.