[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xalan-dev
Subject:    Re: pb xsl:include or xsl:import
From:       "Eric SCHAEFFER" <eschaeffer () posterconseil ! com>
Date:       1999-12-09 8:23:07
[Download RAW message or body]

That's not the problem (I use Cocoon 1.6 dev, last version) :

I tried also with absolute URLs (same result, no error). The problem is that
the imported stylesheet doesn't seem to be used... I've got an HTML page,
but only templates that are in the first XSL file are processed.
Is it a problem of 'priority' ?

I've got also a problem with xsl:sort :

when I try xsl:sort as first child of xsl:for-each, I've got a
ClassCastException :

java.lang.ClassCastException
 at
org.apache.xalan.xslt.ElemTemplateElement.transformSelectedChildren(ElemTemp
lateElement.java, Compiled Code)
 at org.apache.xalan.xslt.ElemForEach.execute(ElemForEach.java:119)
 at
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElemen
t.java, Compiled Code)
 at org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.java,
Compiled Code)
 at
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElemen
t.java, Compiled Code)
 at org.apache.xalan.xslt.ElemLiteralResult.execute(ElemLiteralResult.java,
Compiled Code)
 at
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElemen
t.java, Compiled Code)
 at
org.apache.xalan.xslt.ElemTemplateElement.transformChild(ElemTemplateElement
.java, Compiled Code)
 at
org.apache.xalan.xslt.ElemTemplateElement.transformSelectedChildren(ElemTemp
lateElement.java, Compiled Code)
 at
org.apache.xalan.xslt.ElemApplyTemplates.execute(ElemApplyTemplates.java,
Compiled Code)
 at
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateElemen
t.java, Compiled Code)

XML :

...
    <campagne>
        <enseigne>Citroën</enseigne>
        <afficheur>GIRAUDY</afficheur>
        <reseau>Master</reseau>
...

XSL :

...
    <xsl:for-each select="campagne">
        <xsl:sort select="enseigne[text()]"/>
        <xsl:sort select="afficheur[text()]"/>
...



Eric.
_______________________________________

Eric SCHAEFFER
eschaeffer@posterconseil.com

POSTER CONSEIL
118 rue de Tocqueville
75017 PARIS
FRANCE
Tel. : 33-140541058
Fax : 33-140541059
_______________________________________

----- Original Message -----
From: Keith Visco <kvisco@exoffice.com>
To: <xalan-dev@xml.apache.org>
Sent: Wednesday, December 08, 1999 9:02 PM
Subject: Re: pb xsl:include or xsl:import


>
> Eric,
>
> With Cocoon, I believe you'll need to use absolute URI's.
>
> --Keith
>
> Eric SCHAEFFER wrote:
>
> > Hie,
> >
> > I tried Xalan / Xerces with Cocoon, and I've got a problem with
stylesheet
> > inclusion.
> >
> > Does I misunderstand XSLT spec ?
> >
> > Test files :
> >
> > ******************
> > * hello-page.xml
> > ******************
> >
> > <?xml version="1.0"?>
> > <?xml-stylesheet href="hello-page-html.xsl" type="text/xsl"?>
> > <?cocoon-process type="xslt"?>
> >
> > <page>
> >  <title>Hello</title>
> >  <content>
> >   <paragraph>This is my first Cocoon file!</paragraph>
> >  </content>
> > </page>
> >
> > ******************
> > * hello-page-html.xsl
> > ******************
> >
> > <?xml version="1.0"?>
> >
> > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> >
> > <xsl:import href="hello-page-html-2.xsl"/>
> >
> >   <xsl:template match="page">
> >    <xsl:processing-instruction
> > name="cocoon-format">type="text/html"</xsl:processing-instruction>
> >    <html>
> >     <head>
> >      <title>
> >       <xsl:value-of select="title"/>
> >      </title>
> >     </head>
> >     <body bgcolor="#ffffff">
> >      <xsl:apply-templates/>
> >     </body>
> >    </html>
> >   </xsl:template>
> >
> > <!--
> >   <xsl:template match="title">
> >    <h1 align="center">
> >     <xsl:apply-templates/>
> >    </h1>
> >   </xsl:template>
> >
> >   <xsl:template match="paragraph">
> >    <p align="center">
> >     <i>
> >      <xsl:apply-templates/>
> >     </i>
> >    </p>
> >   </xsl:template>
> > -->
> >
> > </xsl:stylesheet>
> >
> > ******************
> > * hello-page-html.xsl
> > ******************
> >
> > <?xml version="1.0"?>
> >
> > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> >
> > <!--
> >   <xsl:template match="page">
> >    <xsl:processing-instruction
> > name="cocoon-format">type="text/html"</xsl:processing-instruction>
> >    <html>
> >     <head>
> >      <title>
> >       <xsl:value-of select="title"/>
> >      </title>
> >     </head>
> >     <body bgcolor="#ffffff">
> >      <xsl:apply-templates/>
> >     </body>
> >    </html>
> >   </xsl:template>
> > -->
> >
> >   <xsl:template match="title">
> >    <h1 align="center">
> >     <xsl:apply-templates/>
> >    </h1>
> >   </xsl:template>
> >
> >   <xsl:template match="paragraph">
> >    <p align="center">
> >     <i>
> >      <xsl:apply-templates/>
> >     </i>
> >    </p>
> >   </xsl:template>
> >
> > </xsl:stylesheet>
> >
> > Eric.
> >
> > _______________________________________
> >
> > Eric SCHAEFFER
> > eschaeffer@posterconseil.com
> >
> > POSTER CONSEIL
> > 118 rue de Tocqueville
> > 75017 PARIS
> > FRANCE
> > Tel. : 33-140541058
> > Fax : 33-140541059
> > _______________________________________
>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic