check out 2.6.1 and 2.6.2 of the XSLT recommendation and you'll know why this 
happens and what you need to do to solve your problem and please post this 
type of question to a xalan mailing list in the future.

HTH

robert

On Friday 11 May 2001 11:57, you wrote:
> Hi!
>
> We use Xalan 2 and have templates with the same name in two xsl-files.
>
> In the first file this template is defined, and It's overridden, if
> necessary, in the second file.
>
> Since that, we've got problem that previously we had not (when we use Xalan
> 1).
>
> It seems that Xalan 2.01 doesn't allow overriding templates. Is that true?
>
> Here goes short example:
>
> main.xsl:
>
> ... some preceding code
>
> <xsl:template name="draw-menu">
>
>     <!-- statndart code-->
>
> </xsl:template>
>
> ... other code
>
> --------------------------------------------------------
>
> dependent.xsl
>
> <xsl:include href="../main.xsl"/>
>
> .....
>
> then trying to override template
>
> <xsl:template name="draw-menu">
>
>     <!-- othrer code-->
>
> </xsl:template>
>
> this code causes the following exceptions:
>
> ....
>
> javax.xml.transform.TransformerConfigurationException: TRaX Transform
> Throwable at
> org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(Tran
> sformerFactoryImpl.java:684)
> ---------
> javax.xml.transform.TransformerConfigurationException: TRaX Transform
> Throwable at
> org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(Transf
> ormerFactoryImpl.java:856)
>         at
> org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(Tran
> sformerFactoryImpl.java:669)
> ---------
> javax.xml.transform.TransformerException: TRaX Transform Throwable
>         at
> org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(Transf
> ormerFactoryImpl.java:852)
>         at
> org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(Tran
> sformerFactoryImpl.java:669)
>
> ---------
> java.lang.RuntimeException: ElemTemplateElement error: Found more than one
> templ ate named: draw-menu
>         at
> org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:523) at
> org.apache.crimson.parser.Parser2.parse(Parser2.java:304) at
> org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:433)
>
>
>
> Any help will be greatly appreciated.
>
>
>
> Andrew Storoshenko
> e-mail: [EMAIL PROTECTED]
> ICQ:    39230553

----------------------------------------
Content-Type: text/html; charset="koi8-r"; name="Attachment: 1"
Content-Transfer-Encoding: quoted-printable
Content-Description: 
----------------------------------------

Reply via email to