xsl variables

sb1 (archive)

Usenet Archive
Joined
May 6, 2004
Messages
4
Reaction score
0
Hi

I am new to xml and I am trying to use xsl to transform my xml document to smil.

I want to create a line such as
<video src="../media/countries_video/cuba_100.ram "
id="../media/countries_video/greece_100.ram " region="x"/>

for a number of different video files, the references to which are held within my xml files. At the minute my code:

<xsl:for-each select="$destination/Country/CountryVideo">

<xsl:variable name="countryvid"
select="$destination/Country/CountryVideo"/>
<video src="{$countryvid}" id="{$countryvid}" region="x" /> </xsl:for-each>

produces the correct number of lines but each contains the reference to the same file, I'm guessing this is because I can't use the one variable to reference each. I'd appreciate it if anyone could give me some pointers on how to get around this. (Bearing in mind I'm very new to all this!)
Thanks in advance
 

Martin Honnen

Usenet Archive
Joined
Apr 8, 2000
Messages
6,174
Reaction score
0
sb1 said:
Hi

I am new to xml and I am trying to use xsl to transform my xml
document to smil.

I want to create a line such as
<video src="../media/countries_video/cuba_100.ram "
id="../media/countries_video/greece_100.ram " region="x"/>

for a number of different video files, the references to which are
held within my xml files. At the minute my code:

<xsl:for-each select="$destination/Country/CountryVideo">

<xsl:variable name="countryvid"
select="$destination/Country/CountryVideo"/>
Try

<video src="{$countryvid}" id="{$countryvid}" region="x" />
</xsl:for-each>

produces the correct number of lines but each contains the reference
to the same file, I'm guessing this is because I can't use the one
variable to reference each. I'd appreciate it if anyone could give me
some pointers on how to get around this. (Bearing in mind I'm very new
to all this!)
Thanks in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
548,208
Messages
3,104,799
Members
249,594
Latest member
henrywalsh

Latest Threads

Top