[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: handling media, xsl:variable problem

Subject: Re: handling media, xsl:variable problem
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Wed, 1 May 2002 20:51:06 +0100
handling media
Hi Nathan,

> I am trying to setup a template to handle MEDIA elements, which can
> be images, video or audio. I am trying to use a variable to store
> the actual img or embed tag to use later on in placement of the
> media file, but for some reason, the variable is coming out empty.
> If I add some basic text in the variable, it is captured and output
> as expected. So, it is just the img or embed tags that are being
> ignored/omitted for some reason...

The $media1 variable holds a result tree fragment containing an img or
embed empty element. When you get the *value of* a result tree
fragment, it's just like getting the value of the root node of the
source document -- you get all of the text in the result tree
fragment, but none of the elements.

If you want to copy the element in the result tree fragment as well,
then you have to *copy* it, with xsl:copy-of, instead. So try:

  <xsl:copy-of select="$media1" />

rather than:

  <xsl:value-of select="$media1" />

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.