You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Hahn Kurt (CHA)" <ku...@etat.ge.ch> on 2002/08/19 13:42:24 UTC

Error with multiple stylesheet imports (xsl:import)

I'm using the xsl:import-function in some stylesheets, which was OK while I
imported just one stylesheet. If I import a second one, I get a
nullPointerException error. 

According to the xsl-specs, importing more than one stylesheets shouldn't be
a problem, is this a limitation of Cocoon (I don't think so, since I didn't
find anything on this in the mail archives)?


Here's the code-snippet:

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


<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:fo="http://www.w3.org/1999/XSL/Format"
  xmlns:i18n="http://apache.org/cocoon/i18n/2.0"
  xmlns:eleTitre="http://etat.geneve.com/eleTitre"
  xmlns:eleTexte="http://etat.geneve.com/eleTexte">
  
  <xsl:import href="formattage.xsl"/>
  <xsl:import href="fonctions.xsl"/><!--  Both stylesheets are located in
the same subdirectory, and both are imported successfully
in different stylesheets, but not together-->


  <xsl:template match="/">
    
   <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
   
    <fo:layout-master-set>....

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

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: Error with multiple stylesheet imports (xsl:import)

Posted by Joerg Heinicke <jo...@gmx.de>.
Problems with xsl:import seem to occure really often, when using Cocoon. I 
often may not use xsl:import, because it simply doesn't work or I get a "not 
allowed in this position" or something similar. xsl:include solved all 
problems until now, but maybe I want to include a named template, where 
already one exists in the current template with the same name ... 
xsl:include won't work then.

Joerg


Hahn Kurt (CHA) wrote:
> I'm using the xsl:import-function in some stylesheets, which was OK while I
> imported just one stylesheet. If I import a second one, I get a
> nullPointerException error. 
> 
> According to the xsl-specs, importing more than one stylesheets shouldn't be
> a problem, is this a limitation of Cocoon (I don't think so, since I didn't
> find anything on this in the mail archives)?
> 
> 
> Here's the code-snippet:
> 
> <?xml version="1.0"  encoding="iso-8859-1"?>
> 
> 
> <xsl:stylesheet version="1.0"
>   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>   xmlns:fo="http://www.w3.org/1999/XSL/Format"
>   xmlns:i18n="http://apache.org/cocoon/i18n/2.0"
>   xmlns:eleTitre="http://etat.geneve.com/eleTitre"
>   xmlns:eleTexte="http://etat.geneve.com/eleTexte">
>   
>   <xsl:import href="formattage.xsl"/>
>   <xsl:import href="fonctions.xsl"/><!--  Both stylesheets are located in
> the same subdirectory, and both are imported successfully
> in different stylesheets, but not together-->
> 
> 
>   <xsl:template match="/">
>     
>    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
>    
>     <fo:layout-master-set>....


-- 

System Development
VIRBUS AG
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409
joerg.heinicke@virbus.de
www.virbus.de


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

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: Error with multiple stylesheet imports (xsl:import)

Posted by Carles Canellas <cc...@yahoo.es>.
 --- "Hahn Kurt (CHA)" <ku...@etat.ge.ch>
escribió: > I'm using the xsl:import-function in some
> stylesheets, which was OK while I
> imported just one stylesheet. If I import a second
> one, I get a
> nullPointerException error. 

I'm using complex xsl with a lot of imports and
imports inside imported filesheets, in order to
overwrite templates, atributes sets and parameters,
and I got no problems. I'm using Saxon instead of
Xalan, perhaps that will solve your problems.
What error appears in the sitemap.log?
> 
> According to the xsl-specs, importing more than one
> stylesheets shouldn't be
> a problem, is this a limitation of Cocoon (I don't
> think so, since I didn't
> find anything on this in the mail archives)?
> 
> 
> Here's the code-snippet:
> 
> <?xml version="1.0"  encoding="iso-8859-1"?>
> 
> 
> <xsl:stylesheet version="1.0"
>   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>   xmlns:fo="http://www.w3.org/1999/XSL/Format"
>   xmlns:i18n="http://apache.org/cocoon/i18n/2.0"
>   xmlns:eleTitre="http://etat.geneve.com/eleTitre"
>   xmlns:eleTexte="http://etat.geneve.com/eleTexte">
>   
>   <xsl:import href="formattage.xsl"/>
>   <xsl:import href="fonctions.xsl"/><!--  Both
> stylesheets are located in
> the same subdirectory, and both are imported
> successfully
> in different stylesheets, but not together-->
> 
> 
>   <xsl:template match="/">
>     
>    <fo:root
> xmlns:fo="http://www.w3.org/1999/XSL/Format">
>    
>     <fo:layout-master-set>....
> 


_______________________________________________________________
Yahoo! Messenger
Nueva versión: Webcam, voz, y mucho más ¡Gratis! 
Descárgalo ya desde http://messenger.yahoo.es

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

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>