OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Netscape XSL and ' character

[ Lists Home | Date Index | Thread Index ]

> 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>
> 
> 




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS