Harry,

Match attributes must conform to pattern specification.  Quoting from Alan Kay's
XSLT Programmers Reference, p415:
     "When a pattern is used in the match attribute of <xsl:template> or
<xsl:key>, the predicate must not contain any references to variables.  This is
to prevent circular definitions:  global variables can invoke keys or templates,
so if keys and templates were allowed to be defined in terms of global
variables, infinite recursion could happen.  This restriction doesn't apply to
patterns used in <xsl:number>."

Cheers,
Michael




                                                                                       
 
                    "Lai, Harry"                                                       
 
                    <HLai@coremetr       To:     'CocoonUsers'                         
 
                    ics.com>              <[EMAIL PROTECTED]>                
 
                                         cc:                                           
 
                    03/28/02 02:32       Subject:     Possible error in 2.0.2 xsp.xsl  
 
                    PM                    (incompatible with Saxon 6.5)                
 
                    Please respond                                                     
 
                    to                                                                 
 
                    cocoon-users                                                       
 
                                                                                       
 
                                                                                       
 




Hi folks,

We've been using Cocoon 2.0.1, and I just downloaded 2.0.2.  After migrating
to it, I find that I'm getting an XSL error in xsp.xsl (using Saxon 6.5).
The message is:

<our_path>/org/apache/cocoon/components/language/markup/xsp/java/xsp.xsl;
Line#: 441; Column#: -1
com.icl.saxon.expr.XPathException:
The match pattern in xsl:template may not contain references to variables

So when I looked at line 441, this is what it has:

           <xsl:template match="*[not(namespace-uri(.) = $xsp-uri)]">...

xsp-uri is basically used as a constant, so I just replaced it with its
constant string literal value, and voila, everything's fine!

Anyway, I'm curious - does anyone know whether match patterns can contain
variables, or if Saxon's just being overly particular?

Harry


--------------
Harry Lai
[EMAIL PROTECTED]
512.342.2623 x2170

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>






---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to