Re: XSL content:encoded troubles

Michael Vincent van Rantwijk <[email protected]>
Newsgroups gmane.comp.mozilla.devel.layout.xslt
Organization Another Netscape Collabra Server User
Message-ID <[email protected]>
Lucky wrote:
> Michael Vincent van Rantwijk wrote:
>> Hi,
>>
>> Should something like this work in Mozilla?
>>
>>       <xsl:attribute name="description">
>>         <xsl:choose>
>>           <xsl:when test="content:encoded">
>>             <xsl:value-of select="content:encoded"/>
>>           </xsl:when>
>>           <xsl:otherwise>
>>             <xsl:value-of select="description"/>
>>           </xsl:otherwise>
>>         </xsl:choose>
>>       </xsl:attribute>
>>
>> To assign the data inside of:
>>
>> <content:encoded>
>> </content:encoded>
>>
>> to the description attribute?
>>
>>
>> Please note that I am still learning so I might have made one or more 
>> errors, because I don't fully understand XSL yet, so it would be nice 
>> if anyone could help me with this problem.
>>
>> Thanks,
>> Michael
> 
> that would work with the following input
> 
> <some_document xmlns:content="your.content.namespace">
>   <blah>
>     <content:encoded>content....</content:encoded>
>     <description>description....</description>
>   </blah>
> </some_document>
> 
> and your <xsl:attribute/> was within the <blah/> match context...
> both input + xslt would need the content namespace defined as well.

I've read and replied to Martin Honnen's, which was also about 
namespace, and I don't have the prefix content bound to any namespace 
URI so that must be it.

See also: news://news.mozilla.org:119/[email protected]

Thank you for helping me Lucky,
Michael
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.