You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Ovidiu Predescu <ov...@cup.hp.com> on 2000/09/18 22:49:51 UTC

Re: Problem with Cocoon and namespace

On Mon, 18 Sep 2000 22:23:53 +0200, "Anouk Udressy" <ud...@freesurf.ch> wrote:

> Hi,
> 
> I would like to use Cocoon for transform XML file to WML and display the
> result with the Nokia Developpement toolkit.
> My problem is the following :
> When I use namespaces in my XSL file*, the Nokia developpement toolkit
> display the following error :
> "Attribute is not declared". Then, I can modifiy the source directly in the
> NDK, I remove all the name space** and it's work !
> 
> * like this :
> <?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:lng="http://toto.com/languages/1.0"
>       xmlns:lnk="http://toto.com/links/1.0"
>       xmlns:trl="http://toto.com/translations/1.0">
> 
> ** like this II :
> <wml xmlns:fo="http://www.w3.org/1999/XSL/Format"
>       xmlns:lng="http://toto.com/languages/1.0"
>       xmlns:lnk="http://toto.com/links/1.0"
>       xmlns:trl="http://toto.com/translations/1.0">
> become
> <wml>
> 
> If I remove the namespace directly in the XSL file, the Nokia Developpement
> toolkit display the following error : "MIME type text/html is not
> supported".

Make sure in your XSL page you include a cocoon-format processing instruction.
You can have something like this:

<xsl:template match="/">
  <xsl:processing-instruction name="cocoon-format">
    type="text/wml"
  </xsl:processing-instruction>
  <xsl:apply-templates/>
</xsl:template>


Regards,
Ovidiu

-- 
Ovidiu Predescu <ov...@cup.hp.com>
http://orion.nsr.hp.com/ (inside HP's firewall only)
http://www.geocities.com/SiliconValley/Monitor/7464/



Re: Problem with Cocoon and namespace

Posted by Anouk Udressy <ud...@freesurf.ch>.
My XSL already contains the "cocoon-format" processing instruction.

Dou you have an other suggestion for me ?

Anouk

On Mon, 18 Sep 2000 22:23:53 +0200, "Anouk Udressy" <ud...@freesurf.ch>
wrote:

> Hi,
>
> I would like to use Cocoon for transform XML file to WML and display the
> result with the Nokia Developpement toolkit.
> My problem is the following :
> When I use namespaces in my XSL file*, the Nokia developpement toolkit
> display the following error :
> "Attribute is not declared". Then, I can modifiy the source directly in
the
> NDK, I remove all the name space** and it's work !
>
> * like this :
> <?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:lng="http://toto.com/languages/1.0"
>       xmlns:lnk="http://toto.com/links/1.0"
>       xmlns:trl="http://toto.com/translations/1.0">
>
> ** like this II :
> <wml xmlns:fo="http://www.w3.org/1999/XSL/Format"
>       xmlns:lng="http://toto.com/languages/1.0"
>       xmlns:lnk="http://toto.com/links/1.0"
>       xmlns:trl="http://toto.com/translations/1.0">
> become
> <wml>
>
> If I remove the namespace directly in the XSL file, the Nokia
Developpement
> toolkit display the following error : "MIME type text/html is not
> supported".

Make sure in your XSL page you include a cocoon-format processing
instruction.
You can have something like this:

<xsl:template match="/">
  <xsl:processing-instruction name="cocoon-format">
    type="text/wml"
  </xsl:processing-instruction>
  <xsl:apply-templates/>
</xsl:template>


Regards,
Ovidiu

--
Ovidiu Predescu <ov...@cup.hp.com>
http://orion.nsr.hp.com/ (inside HP's firewall only)
http://www.geocities.com/SiliconValley/Monitor/7464/