cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ilya A. Kriveshko" <i...@infoinsomniax.com>
Subject Re: newbie question: XHTML(XML)->HTML translation
Date Fri, 25 Aug 2000 18:30:10 GMT
You said "H1", but are trying to match "h1". XML is case
sensitive! Could that be the problem?
--
Ilya

Kim Bisgaard wrote:

> Hi,
>
> Thanks folks for helping out - BUT it still does not work. Maybe its something
> simple?
>
> Using the advice from Robin Green I added this:
>   <xsl:template match="@* | node()" priority="-1.0">
>     <xsl:copy>
>        <xsl:apply-templates select="@*"/>
>        <xsl:apply-templates/>
>     </xsl:copy>
>   </xsl:template>
>
> And it works in that if I remove "<xsl:apply-templates select="@*"/>" all attrib's
> get lost, BUT I still does not get the H1 tags CENTER'ed.
>
> Any good ideas?
>
> Kim Bisgaard wrote:
>
> > Hi,
> >
> > I am trying to have Cocoon-1.7.4 do the default XHTML to HTML translation, but
> > at the same time try to intercept/precede it to do layout customization. But my
> > XSLT instructions does not get called.
> >
> > This is my test page:
> > <?xml version="1.0" encoding="iso-8859-1"?>
> > <?xml-stylesheet href="dmi.html.xsl" type="text/xsl"?>
> > <?cocoon-process type="xslt"?>
> > <html xmlns="http://www.w3.org/1999/xhtml">
> > <head>
> > <meta name="generator" content="HTML Tidy, see www.w3.org" />
> > <title>XHTML test page</title>
> > </head>
> > <body>
> > <h1>XHTML test page</h1>
> >
> > <blockquote><i>Some filling should be in here</i></blockquote>
> > </body>
> > </html>
> >
> > and here is my XSLT instructions:
> > <?xml version="1.0"?>
> > <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> > <xsl:output method="html"/>
> >   <xsl:template match="h1">
> >            <h1><center>
> >                <xsl:apply-templates/>
> >            </center></h1>
> >   </xsl:template>
> > </xsl:stylesheet>
> >
> > Can anybody please give me a hint to what I am doing wrong here?
> >
> > I sometimes gets the following errors but I cannot desipher them. Any help in
> > that?
> >         org.apache.xalan.xslt.XSLProcessorException: Warning: can't output text
> > before document element!  Ignoring..
> >         org.xml.sax.SAXException: Warning: can't output text before document
> > element!  Ignoring...
> >
> > Thanks in advance,
> >
> > --
> > Kim Bisgaard
> >
> > Oersted Science Data Center
> > Solar-Terrestrial Physics Division           Phone: +45 3915 7495 (direct)
> > Danish Meteorological Institute              Fax: +45 3915 7460 (division)
> > http://www.dmi.dk/solar-terrestrial/ -- Division homepage
> > http://www.dmi.dk/projects/oersted/  -- Oersted Satellite
> > http://www.dmi.dk/projects/wdcc1/    -- WDC C1 for geo-magnetism
> >   These are our official Web addresses - ignore any change in the server name
> >   which may occur while browsing this site. Unfortunately, these pages are
> >   not reachable via links from the main institute pages - http://www.dmi.dk
>
> --
> Kim Bisgaard
>
> Oersted Science Data Center
> Solar-Terrestrial Physics Division           Phone: +45 3915 7495 (direct)
> Danish Meteorological Institute              Fax: +45 3915 7460 (division)
> http://www.dmi.dk/solar-terrestrial/ -- Division homepage
> http://www.dmi.dk/projects/oersted/  -- Oersted Satellite
> http://www.dmi.dk/projects/wdcc1/    -- WDC C1 for geo-magnetism
>   These are our official Web addresses - ignore any change in the server name
>   which may occur while browsing this site. Unfortunately, these pages are
>   not reachable via links from the main institute pages - http://www.dmi.dk
>
> ---------------------------------------------------------------------
> 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