Re: XSL content:encoded troubles

Lucky <[email protected]>
Newsgroups gmane.comp.mozilla.devel.layout.xslt
Organization Cox Communications
Message-ID <niCRe.21607$hp.13676@lakeread08>
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.
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.