You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Conny Krappatsch <co...@smb-tec.com> on 2001/02/01 09:23:27 UTC

Re: [c2] Can't use Context:// -- need help

On Wed, 31 Jan 2001 16:09:03 -0500
Berin Loritsch <bl...@apache.org> wrote:
> I am using Tomcat 3.2.1 with Cocoon 2 and Xalan 2.0D07 (JDK 1.3)
> 
> The problem comes from a couple of sources, and I need help from
> someone more familiar with Xalan than I.  I am trying to use a
> XSL stylesheet that I specified in my cocoon.xconf file.  The
> problem is that Tomcat uses the File:// protocol for finding
> context resources.
> 
> The URL is set correctly:
> -----------------------------------------
> INFO    13309   [cocoon  ] (Thread-10):
> context://WEB-INF/logicsheets/list.xsl:
> file:C:\jakarta-tomcat-3.2.1\webapps\ROOT\WEB-INF\logicsheets\list.xsl
> -----------------------------------------
> 
> I get this exception (which tells me nothing):
> -----------------------------------------------------
> javax.xml.transform.TransformerException: FuncPosition only allows 0

Hi Berin,

I don't know if it helps, but I remember Steffen talking about a similar
error message while integrating Xalan2 and Saxon with C1.
We interpreted it as follows: The XPath function 'position()' must not
have any arguments. Sometimes one (including me) passes the current node
as argument, even if it's not necessary(or allowed), for example
'position(.)'.
Maybe the new Xalan is somewhat more pedantic.

Hope it helps,
Conny

-- 
______________________________________________________________________
Conny Krappatsch                              mailto:conny@smb-tec.com
SMB GmbH                                        http://www.smb-tec.com




actions and aggregation

Posted by Torsten Curdt <tc...@dff.st>.
Following the action and aggregation discussion...
...is this a resonable approach for a page
with two forms in it?

  <map:action-set name="order-form">
   <map:act type="form-reader/">
   <map:act type="form-validator/">
   <map:act type="form-selector/">
  </map:action-set>

  <map:action-set name="login-form">
   <map:act type="form-reader"/>
   <map:act type="form-validator"/>
   <map:act type="form-selector"/>
  </map:action-set>

  <map:match pattern="form/order.*">
     <map:generate type="serverpages" src="navigation.xml"/>

     <map:act set="order-form">
       <map:generate type="serverpages" src="forms/{next-form}.xml"/>
     </map:act>

     <map:act set="login-form">
       <map:generate type="serverpages" src="forms/{next-form}.xml"/>
     </map:act>

     <map:transform src="aggregate2layout.xsl"/>
     <map:transform src="xml2{1}.xsl"/>
     <map:serialize/>
  </map:match>

I know a parameter can be passed to an action as
child node:

   <map:act type="form-reader">
      <param>theParam</param>
   </map:act>

If this parameter applies to all actions of
an action-set why not having a parameter node
below the action-set node?
Can it be a child node from the action-set and
in a consequence of this be a parameter to all
actions within this set? But how can this parameter
then be accessed?

  <map:action-set name="login-form">
   <param>theParam</param>
   <map:act type="form-reader"/>
   <map:act type="form-validator"/>
   <map:act type="form-selector"/>
  </map:action-set>

equals

  <map:action-set name="login-form">
   <map:act type="form-reader">
      <param>theParam</param>
   </map:act>
   <map:act type="form-validator">
      <param>theParam</param>
   </map:act>
   <map:act type="form-selector">
      <param>theParam</param>
   </map:act>
  </map:action-set>

Is there already more documentation on the
sitemap/action semantics other than
the xdocs/sitemap.xml?
--
Torsten


Re: [c2] Can't use Context:// -- need help

Posted by Berin Loritsch <bl...@apache.org>.
Conny Krappatsch wrote:
> 
> On Wed, 31 Jan 2001 16:09:03 -0500
> Berin Loritsch <bl...@apache.org> wrote:
> > I am using Tomcat 3.2.1 with Cocoon 2 and Xalan 2.0D07 (JDK 1.3)
> >
> > The problem comes from a couple of sources, and I need help from
> > someone more familiar with Xalan than I.  I am trying to use a
> > XSL stylesheet that I specified in my cocoon.xconf file.  The
> > problem is that Tomcat uses the File:// protocol for finding
> > context resources.
> 
> Hi Berin,
> 
> I don't know if it helps, but I remember Steffen talking about a similar
> error message while integrating Xalan2 and Saxon with C1.
> We interpreted it as follows: The XPath function 'position()' must not
> have any arguments. Sometimes one (including me) passes the current node
> as argument, even if it's not necessary(or allowed), for example
> 'position(.)'.
> Maybe the new Xalan is somewhat more pedantic.

Doh!  Your right.
I made the change, and everything worked correctly!