cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xoan <xoant...@gmail.com>
Subject Re: Newbie question about XSP and XSLT
Date Tue, 10 May 2005 13:00:00 GMT
Thanks Derek,

It works fine!

Regards,

Xoan

2005/5/10, Derek Hohls <dhohls@csir.co.za>:
> Xoan
> 
> Not too hard....
> 
> <?xml version="1.0"?>
> <xsl:stylesheet version="1.0"
>         xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>   >
> 
> <!-- root -->
> <xsl:template match="/">
>   <xsl:apply-templates/>
> </xsl:template>
> 
> <!-- your node -->
> <xsl:template match="xmlcode">
>   <b><xsl:apply-templates/></b>
> </xsl:template>
> 
> <!-- others; leave as they are -->
> <xsl:template match="@*|node()" priority="-1">
>   <xsl:copy>
>     <xsl:apply-templates select="@*|node()"/>
>   </xsl:copy>
> </xsl:template>
> 
> </xsl:stylesheet>
> 
> HTH
> Derek
> 
> >>> xoanteis@gmail.com 2005/05/10 02:10:25 PM >>>
>         Hi all,
> 
> I apologize for the obvious question. Perhaps this is not the right
> place to present it.
> 
> I am using Cocoon and XSP to query eXist (native xml database).I have
> a xsp that performs a query on eXist using the following code:
> 
> ====
> <xsp:page language="javascript" xmlns:xsp="http://apache.org/xsp"
>         xmlns:xdb="http://exist-db.org/xmldb/1.0"
>         xmlns:xsp-request="http://apache.org/xsp/request/2.0"
>         xmlns:util="http://apache.org/xsp/util/v1">
> 
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
> ...
> ...
>         <xmlcode>
>                 <xsp:content><xdb:get-xml as="xml"/></xsp:content>
>         </xmlcode>
> 
> ...
> ...
> </body>
> </html>
> 
> </xsp:page>
> ====
> 
> I need to perform some simple format (like bold or italics) on the
> element <xmlcode>. The rest of the page must remain equal.
> I am trying to pass a xsl to it.  In my sitemap:
> 
>                         <map:match pattern="**.xsp">
>                                 <map:generate src="{1}.xsp"
> type="serverpages"/>
>                                 <map:transform src="SomeFormat.xsl"/>
>                                 <map:serialize
> type="html"/>
>                         </map:match>
> 
> How could I perform this format leaving the rest of the document
> without changes??
> Any xsl example similar to this on blocks?
> 
> Thanks in advance
> 
> Xoan
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
>

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


Mime
View raw message