cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Cordes <mcord...@maine.edu>
Subject Re: C1 <xsp:element> useless?
Date Wed, 21 Mar 2001 00:42:32 GMT
Hi,

The original poster was referring to <xsp:element> not 
<xsl:element> and where you have <xsl:element name="a">
below you could just do <a>...</a>.  xsl:element is good 
in that you can use attribute value templates and thus you 
can set the name at run time ala <xsl:element name="{$elem-name}"
which, the original poster pointed out you cannot do with 
<xsp:element>

-matt

On Wed, Mar 21, 2001 at 10:32:39AM +1100, Peter wrote:
> G'day
> 
> I'm using <xsp:element> for building URLs, which can be tricky with multiple
> parameters.
> 
> xml fragment, one of these per page returned by the search or db query.
> 
> <PageUrl bar="123" pagetoget="456" displaynumber="789"></PageUrl>
> 
> stylesheet fragment
> 
> <xsl:for-each select="PageUrl">
> 	<xsl:element name="a">
> 		<xsl:attribute name="href">
> 			<xsl:text>foobar.xml?foo=</xsl:text>
> 			<xsl:value-of select="@bar"/>
> 			<xsl:text>&amp;pagetoget=</xsl:text>
> 			<xsl:value-of select="@pagetoget"/>
> 		</xsl:attribute>
> 		<xsl:value-of select="@displaynumber"/>
> 	</xsl:element>
> </xsl:for-each>
> 
> this generates a row of numbered links, nothing fancy.
> 
> <a href="foobar.xml?foo=123&pagetoget=456">789</a>
> 
> Regards
> 
> Peter Burstow
> 
> Clickdocs Pty. Ltd.
> 
> 
> > -----Original Message-----
> > From: Peter C. Verhage [mailto:petercv@zeelandnet.nl]
> > Sent: Wednesday, 21 March 2001 02:23
> > To: cocoon-users@xml.apache.org
> > Subject: Re: C1 <xsp:element> useless?
> >
> >
> >
> > : <xsp:element>
> > :   <xsp:param name="name">
> > :     ..
> > :   </xsp:param>
> > :   ..
> > : </xsp:element>
> > :
> > : It looks like <xsp:param> could be reused across XSP, not just for
> > : <xsp:element>.
> >
> > Couldn't you use <xsp:attribute .../> instead of <xsp:param>? So you
have
> > something like this:
> > <xsp:element>
> >   <xsp:attribute name="name">
> >     ..
> >   </xsp:attribute>
> >   ..
> > </xsp:element>
> >
> > Regards,
> >
> > Peter
> >
> 
> 
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
> 

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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