You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ilya Vyatkin <la...@sigent.ru> on 2005/03/10 17:21:01 UTC

How to add processing instruction in XSP?

Hi all!
 
I have the XSP page. The xml it generates is then opened in Microsoft Excel.
How to add such processing instruction in resul xml?
<?mso-application progid="Excel.Sheet"?>

I tried to experiment with something like this:
<xsp:pi target="mso-application">
  ..
</xsp:pi>
But I could generate only <?mso-application ?> this way.
Moreover i need to place this p.i. right after <?xml version="1.0" ?> in
result xml!

Please help.

Lars


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: How to add processing instruction in XSP?

Posted by Geert Josten <Ge...@daidalos.nl>.
Hi,

I don't think you can do this inside the XSP page, the page is always wrapped in page, head and body 
kind of elements. Quickest fix would be to put an xsl transform step right after the xsp generator 
with a root template like:

<xsl:template match="/">
   <xsl:processing-instruction
     name="mso:application">progid="Excel.Sheet"</xsl:processing-instruction>
   <xsl:copy-of select="."/>
</xsl:template>

Hope this helps..

Cheers

Ilya Vyatkin wrote:

> Hi all!
>  
> I have the XSP page. The xml it generates is then opened in Microsoft Excel.
> How to add such processing instruction in resul xml?
> <?mso-application progid="Excel.Sheet"?>
> 
> I tried to experiment with something like this:
> <xsp:pi target="mso-application">
>   ..
> </xsp:pi>
> But I could generate only <?mso-application ?> this way.
> Moreover i need to place this p.i. right after <?xml version="1.0" ?> in
> result xml!
> 
> Please help.
> 
> Lars
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 
> 

-- 
Geert.Josten@Daidalos.nl
IT-consultant at Daidalos BV, Zoetermeer (NL)

http://www.daidalos.nl/
tel:+31-(0)79-3316961
fax:+31-(0)79-3316464

GPG: 1024D/12DEBB50

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org