Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] handling media, xsl:variable problem

From: Jeni Tennison <jeni@---------------->
To:
Date: 5/2/2002 4:54:00 PM
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


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent