You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by beyaNet Consultancy <be...@ntlworld.com> on 2004/03/08 02:11:54 UTC

xsp:attribute declaration problem.....

Hi,
I am having a strange problem defining the declare attribute of the 
OBJECT tag. My code is so:


<xsl:template match="artistDetails:currentTrack">
	<xsp:element name="object">
		<xsp:attribute name="data">music/Borderline.mp3</xsp:attribute>
		<xsp:attribute name="type">audio/mpeg</xsp:attribute>
		<xsp:attribute name="declare">declare</xsp:attribute>
	</xsp:element>
</xsl:template>

When the page is rendered as HTML, and the source viewed, the object 
tag reads as:

<object data="music/Borderline.mp3" type="audio/mpeg" 
declare></object>. This is incorrect. It should read:

<object data="music/Borderline.mp3" type="audio/mpeg" 
declare="declare"></object>.

Why is the declare attribute being chopped like this? Is this a bug?
It seems that if you define an attribute and assign a value which has 
the same name, the attribute value pair is then not rendered properly
Does anyone have a solution for this?

What I am expecting to happen here is for the mp3 file to be download 
but not to start playing until some form of user interaction takes 
play, i.e. clicking an ahref link for example. This is not happening as 
the declare attribute is not being properly declared !!

many thanks in advance

Re: xsp:attribute declaration problem.....

Posted by Joerg Heinicke <jo...@gmx.de>.
On 08.03.2004 02:11, beyaNet Consultancy wrote:

> Hi,
> I am having a strange problem defining the declare attribute of the 
> OBJECT tag. My code is so:
> 
> 
> <xsl:template match="artistDetails:currentTrack">
>     <xsp:element name="object">
>         <xsp:attribute name="data">music/Borderline.mp3</xsp:attribute>
>         <xsp:attribute name="type">audio/mpeg</xsp:attribute>
>         <xsp:attribute name="declare">declare</xsp:attribute>
>     </xsp:element>
> </xsl:template>
> 
> When the page is rendered as HTML, and the source viewed, the object tag 
> reads as:
> 
> <object data="music/Borderline.mp3" type="audio/mpeg" declare></object>. 
> This is incorrect. It should read:
> 
> <object data="music/Borderline.mp3" type="audio/mpeg" 
> declare="declare"></object>.

It's the HTML serializer doing this. If you change to XHTML it must not 
do it.

Joerg

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