开发者

Namespace 'http://exslt.og/common' ERROR

I have two servers my test server "Sever 1" is online with no firewall. Server 2 (Production) is behind a firewall. Below is the code that is giving the following error: Namespace 'http://exslt.org/common' does not contain any functions This error only show on Server 2. If I try browsing to http://exslt.org/common on either browser the page is not there.

<xsl:stylesheet version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 xmlns:ext="http://exslt.org/common"
 xmlns:my="my:my"  extension-element-prefixes="ext my">

I got the above code from a very helpful person on stackoverflow and I am 95% it was working on Serer2 but now I'm just getting the error. the rest of the code is below: PLEASE HELP I am pulling my hair out haha.

<?xml version="1.0" encoding="ISO-8859-1"?>

<xsl:stylesheet version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 xmlns:ext="http://exslt.org/common"
 xmlns:my="my:my"  extension-element-prefixes="ext my">

 <my:colors>
  <c>#fff</c>
  <c>#ccc</c>
 </my:colors>

 <xsl:variable name="vColors" select="document(\'\')/*/my:colors/*"/>

 <xsl:template match="NewDataSet">
       <html>
            <body>
             <table width="390" style="text-align:left;" cellspacing="0">
                          <tr>
                            <th style="text-align:left;"><span style="font:20px arial;
font-weight:bold;">Agent Name!</span></th>
                            <th style="text-align:center;"><span style="font:20px arial;
font-weight:bold;">State</span></th>
                            <th style="text-align:center;" ><span style="font:20px arial;
font-weight:bold;">Time</span></th>
                           </tr>

                <xsl:variable name="vrtfResult">
                 <xsl:apply-templates>
                   <xsl:sort select="time" data-type="number" order="descending"/>
                 </xsl:apply-templates>
               </xsl:variable>

               <xsl:apply-templates select="ext:node-set($vrtfResult)/tr"/>
             </table>
           </body>
        </html>
 </xsl:template>

 <xsl:template match="tr">
  <xsl:variable name="vPos" select="position()"/>
 <xsl:copy>
  <xsl:copy-of select="@*"/>
  <xsl:attribute name="bgcolor">
    <xsl:value-of select="$vColors[($vPos mod 2)+1]"/>
  </xsl:attribute>

  <xsl:copy-of select="node()"/>
 </xsl:copy>
 </xsl:template>

 <xsl:template match="AgentSales[State=\'Talking Out\']">
   <tr>
      <xsl:apply-templates/>
   </tr>
 </xsl:template>

       <xsl:template match="AgentSales/AgentName">
           <td style="text-align:left;">
               <span style="font:14px arial;
font-weight:bold;text-align:center;"> <xsl:value-of
select="."/></span>
           </td>

       </xsl:template>

       <xsl:template match="AgentSales/State">
           <td style="text-align:center;">
               <span style="font:14px arial;
font-weight:bold;text-align:center;"> <xsl:value-of
select="."/></span>
           </td>

       </xsl:template>开发者_StackOverflow社区;

       <xsl:template match="AgentSales/time">
           <td style="text-align:center;">
               <span style="font:14px arial;
font-weight:bold;text-align:center;"> <xsl:value-of
select="."/></span>
           </td>

       </xsl:template>

  <xsl:template match="AgentSales/Reason | AgentSales"/>
</xsl:stylesheet>


Your problem is that the XSLT processor that runs on one ov the servers implements the node-set() extension function of EXSLT, while the other XSLT processor (running on the other server) does not implement this extension function.

The solution is to use the same XSLT processor on both servers, if possible.

If this cannot be done, find out the namespace (and name) for the xxx:node-set() extension function that is supported on the second server, and replace:

xmlns:ext="http://exslt.org/common"

with

xmlns:ext="{the-exact-namespace-to-be-used-for-this-XSLT-processor}" 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜