You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Chris Newland <cn...@nortelnetworks.com> on 2000/06/05 17:12:12 UTC

apply to an XSL?

Hi, 

Is it possible to write <xsp:logic> tags into an XSL file and add
<?cocoon-process type="xsp"?> to the top of the file to allow conditional
sections in XSL stylesheets.

I would like to be able to do something like:


<?cocoon-process type="xsp"?>

<xsl:template match="effect">

	<xsp:logic>
		if (<xsl:value-of select="@effect"/>.equals("bold")) {
			<b><xsl:apply-templates/></b>
		}
		else {
			<i><xsl:apply-templates/></i>
		}	
	</xsp:logic>

</xsl:template>

I would imagine that the XSL would undergo an XSP processing step to produce
the completed XSL and this would then be applied to the XML document using
an XSLT processing step.

Is this within the realms of possibility?

Thanks,

Chris

--
Chris Newland 
Software Research Engineer 
Advanced IP Services and Management 
Nortel Networks, London Road, Harlow, Essex, CM17 9NA. 
Tel:   +44(0)1279 405165 
Fax:   +44(0)1279 402047 
Email: cnewland@nortelnetworks.com
"This message may contain information proprietary to Nortel Networks 
so any unauthorised disclosure, copying or distribution of its 
contents is strictly prohibited." 
------------------------------------------------------------
Company name: Nortel Networks plc
Company number: 2515751
Company's registered office address: Maidenhead Office Park, 
Westacott Way, Maidenhead, Berkshire SL6 3QH.
------------------------------------------------------------


Re: apply to an XSL?

Posted by Ulrich Mayring <ul...@denic.de>.
Chris Newland wrote:
> 
> I would imagine that the XSL would undergo an XSP processing step to
> produce the completed XSL and this would then be applied to the XML
> document using an XSLT processing step.
> 
> Is this within the realms of possibility?

I don't think it's possible, for a simple reason: In your XML file you
specify an XSLT processing step. Once that step is reached, the
mentioned XSL file is passed to the XSLT processor. This processor does
not know what to do with other processing instructions encountered -
only the cocoon engine knows about the cocoon PIs. And the cocoon engine
only acts on the file you requested via URI.

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung