cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jerzy Kut" <jer...@rzeszow.tiger.com.pl>
Subject Re: XSLT named teplates and xsl:param (is it a BUG?)
Date Thu, 11 Apr 2002 13:46:14 GMT
Why did You use '{' and '}' tokens?
Isn't enough only
<xsl:if test="$dayofweek=1 or $dayofweek=7">
???

----- Original Message -----
From: "Ivan Luzyanin" <ivan@ProZa.Lviv.UA>
To: "Cocoon-users" <cocoon-users@xml.apache.org>
Sent: Thursday, April 11, 2002 8:34 PM
Subject: XSLT named teplates and xsl:param (is it a BUG?)


> Hi!
>
> I'm using Cocoon 2.0.2 and Tomcat 3.3.1.
>
> Can anybody explain to me why i can't use 'xsl:param' in 'xsl:if'
> clause?
>
> Example:
>
> <xsl:template name="TimeCell">
> <xsl:param name="cssClassNormal">TimeCell</xsl:param>
> <xsl:param name="cssClassWeekEnd">HolidayCell</xsl:param>
> <xsl:param name="dayofweek">
> <!-- Monday -->
> 2
> </xsl:param>
> <td class="{$cssClassNormal}">
> <xsl:if test="{$dayofweek}=1 or {$dayofweek}=7">
> <xsl:attribute name="class">{$cssClassWeekEnd}</xsl:attribute>
> </xsl:if>
> <xsl:value-of select="."/>
> </td>
> </xsl:template>
>
> it throws:
>
> org.apache.cocoon.ProcessingException: Exception in creating Transform
> Handler: javax.xml.transform.TransformerException: Extra illegal tokens:
> '{', '$', 'dayofweek}', '=', '1', 'or', '{', '$', 'dayofweek}', '=', '7'
> at
>
org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandler(XS
LTProcessorImpl.java:271)
> at
>
org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandler(XS
LTProcessorImpl.java:204)
> at
>
org.apache.cocoon.transformation.TraxTransformer.setup(TraxTransformer.java:
295)
> at
>
org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupPipeline(Ab
stractEventPipeline.java:215)
> at
>
org.apache.cocoon.components.pipeline.CachingEventPipeline.setup(CachingEven
tPipeline.java:279)
> at
>
org.apache.cocoon.components.pipeline.CachingEventPipeline.generateKey(Cachi
ngEventPipeline.java:142)
> at
>
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS
treamPipeline.java:320)
> at
>
org.apache.cocoon.www.sitemap_xmap.matchN101FC(/usr/local/bin/java/jakarta-t
omcat-3.3.1/work/DEFAULT/cocoon-dev/cocoon-files/org/apache/cocoon/www/sitem
ap_xmap.java:1569)
> at
>
org.apache.cocoon.www.sitemap_xmap.process(/usr/local/bin/java/jakarta-tomca
t-3.3.1/work/DEFAULT/cocoon-dev/cocoon-files/org/apache/cocoon/www/sitemap_x
map.java:1338)
> at
>
org.apache.cocoon.www.sitemap_xmap.process(/usr/local/bin/java/jakarta-tomca
t-3.3.1/work/DEFAULT/cocoon-dev/cocoon-files/org/apache/cocoon/www/sitemap_x
map.java:1274)
> at org.apache.cocoon.sitemap.Handler.process(Handler.java:222)
> at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)
> at
> org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:154)
> at org.apache.cocoon.Cocoon.process(Cocoon.java:575)
> at
> org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:998)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java)
> at
> org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
> at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
> at org.apache.tomcat.core.Handler.service(Handler.java:235)
> at
> org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485)
> at
>
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:91
7)
> at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
> at
>
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10I
nterceptor.java:176)
> at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
> at
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:516)
> at java.lang.Thread.run(Thread.java:484)
> ; SystemID:
>
file:/usr/local/bin/java/jakarta-tomcat-3.3.1/webapps/cocoon-dev/transforms/
report2html.xsl; Line#: 162; Column#: 50
> javax.xml.transform.TransformerException: Extra illegal tokens: '{',
> '$', 'dayofweek}', '=', '1', 'or', '{', '$', 'dayofweek}', '=', '7'
> at org.apache.xpath.compiler.XPathParser.error(XPathParser.java:602)
> at
> org.apache.xpath.compiler.XPathParser.initXPath(XPathParser.java:165)
> at org.apache.xpath.XPath.(XPath.java:217)
> at
>
org.apache.xalan.processor.StylesheetHandler.createXPath(StylesheetHandler.j
ava:197)
> at
>
org.apache.xalan.processor.XSLTAttributeDef.processEXPR(XSLTAttributeDef.jav
a:575)
> at
>
org.apache.xalan.processor.XSLTAttributeDef.processValue(XSLTAttributeDef.ja
va:920)
> at
>
org.apache.xalan.processor.XSLTAttributeDef.setAttrValue(XSLTAttributeDef.ja
va:1078)
> at
>
org.apache.xalan.processor.XSLTElementProcessor.setPropertiesFromAttributes(
XSLTElementProcessor.java:375)
> at
>
org.apache.xalan.processor.XSLTElementProcessor.setPropertiesFromAttributes(
XSLTElementProcessor.java:311)
> at
>
org.apache.xalan.processor.ProcessorTemplateElem.startElement(ProcessorTempl
ateElem.java:122)
> at
>
org.apache.xalan.processor.StylesheetHandler.startElement(StylesheetHandler.
java:658)
> at
>
org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.j
ava:445)
> at
>
org.apache.xerces.impl.XMLNamespaceBinder.handleStartElement(XMLNamespaceBin
der.java:832)
> at
>
org.apache.xerces.impl.XMLNamespaceBinder.startElement(XMLNamespaceBinder.ja
va:568)
> at
>
org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator.java
:808)
> at
>
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDo
cumentFragmentScannerImpl.java:752)
> at
>
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
her.dispatch(XMLDocumentFragmentScannerImpl.java:1454)
> at
>
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocume
ntFragmentScannerImpl.java:333)
> at
>
org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserCo
nfiguration.java:525)
> at
>
org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserCo
nfiguration.java:581)
> at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:147)
> at
>
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:115
7)
> at
> org.apache.avalon.excalibur.xml.JaxpParser.parse(JaxpParser.java:241)
> at
>
org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractStrea
mSource.java:206)
> at
>
org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandler(XS
LTProcessorImpl.java:233)
> at
>
org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandler(XS
LTProcessorImpl.java:204)
> at
>
org.apache.cocoon.transformation.TraxTransformer.setup(TraxTransformer.java:
295)
> at
>
org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupPipeline(Ab
stractEventPipeline.java:215) ...
>
>
> ---------------------------------------------------------------------
> 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: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


---------------------------------------------------------------------
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message