Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Sending Data between Frames (XML/XSL)

From: "Alex Krawarik [MSFT]" <alexkr@------.---------.--->
To: NULL
Date: 2/6/2007 10:09:00 AM

If this is JScript (looks like it to me..?) you must pad backslash 
characters in strings. This path:

  myXMLHTTPRequest.open("GET", "c:\videocatalog\config\vid.xsl", false);

is not padded/escaped and clearly won't work, for starters. Try

  myXMLHTTPRequest.open("GET", "c:\\videocatalog\\config\\vid.xsl", false);



"ignignokt" <davis929@g...> wrote in message 
news:1170688226.378610.83690@a......
>I have a new question for this issue.  I have created the setParameter
> in the HTML and created the parm name and sort on the param in the XSL
> file but nothing happens when I click on the link and try to run the
> script.  Any advice is greatly appreciated:
>
> HTML:
> <html>
> <body>
> <script type="text/javascript">
> function Request(key)
> {
> var strQueryString=QueryString();
> strQueryString=strQueryString.replace(/\%20/g," ");
> if (strQueryString.length < 1)
> return "";
>
> arrTmp=strQueryString.split("&");
> for (var i=0; i<arrTmp.length; i++)
> {
> var arrTmp2=arrTmp[i].split("=");
> if (arrTmp2.length < 1)
> continue;
> var curKey=arrTmp2[0];
> var curValue=(arrTmp2.length < 2)?"":arrTmp2[1];
> if (curKey.toLowerCase() == key.toLowerCase())
> return curValue;
> }
> return "";
> }
>
> function QueryString()
> {
> var strFullUrl=document.location+"";
> var arrTmp=strFullUrl.split("?");
> if (arrTmp.length < 2)
> return "";
> return arrTmp[1];
> }
>
>
>
> var xsltProcessor = newXSLTProcessor();
> var myXMLHTTPRequest = new XMLHttpRequest();
>  myXMLHTTPRequest.open("GET", "c:\videocatalog\config\vid.xsl",
> false);
>  myXMLHTTPRequest.send(null);
>
>  xslStylesheet = myXMLHTTPRequest.responseXML;
>  xsltProcessor.importStylesheet(xslStylesheet);
>
> xsltProcessor.setParameter(null, "choice", "disc");
>
>
> </script>
> </body>
> </html>
>
> 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:param name="choice" />
> <xsl:template match="/">
>
>
> <html>
> <body>
> <h2>
> <font face="Arial" size="6">Video Catalog v1.0</font>
> </h2>
>
> <xsl:for-each select="catalog/disc">
> <xsl:sort select="." data-type="text" order="{$choice}"/>
> <table width="100%" border="1">
> <tbody>
> <tr bgColor="#0033ff">
> <td width="100%">
> <font face="Arial" size="5">
> <font color="#ffffff"><strong>Disc - </strong>
> <strong><xsl:value-of select="file/label"/></strong>
> </font>
> </font>
> </td>
> </tr>
> </tbody>
> </table>
>
>
> <xsl:for-each select="file">
> <table width="100%" border="1"><tbody>
> <tr bgColor="#00ccff">
> <td><p align="center">
> <font face="Arial" size="4">
> <strong>Filename</strong>
> </font>
> </p>
> </td>
> <td>
> <p align="center">
> <font face="Arial" size="4">
> <strong>Size</strong>
> </font>
> </p>
> </td>
>
> <td>
> <p align="center">
> <font face="Arial" size="4">
> <strong>Date Created</strong>
> </font>
> </p>
> </td>
> </tr>
>
> <tr>
> <td>
> <p align="center">
> <font face="Arial">
> <xsl:value-of select="name"/>
> </font>
> </p>
> </td>
> <td>
> <p align="center">
> <font face="Arial">
> <xsl:value-of select="size"/>
> </font>
> </p>
> </td>
> <td>
> <p align="center">
> <font face="Arial">
> <xsl:value-of select="created"/>
> </font>
> </p>
> </td>
> </tr>
>
> <tr>
> <td><img src="{image01}"/></td>
> <td><img src="{image02}"/></td>
> <td><img src="{image03}"/></td>
> <td><img src="{image04}"/></td>
> <td><img src="{image05}"/></td>
> <td><img src="{image06}"/></td>
> </tr>
> </tbody>
> </table>
> </xsl:for-each>
> </xsl:for-each>
> </body>
> </html>
> </xsl:template>
> </xsl:stylesheet>
> 




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent