Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: Evaluating blank CDATA node [Thread Next] Re: Evaluating blank CDATA nodeTo: NULL Date: 7/1/2004 10:00:00 AM
"Don" <doduong12141214@h...> wrote in message
news:%23L%23PNKsXEHA.3516@T......
> I'm just wondering about the syntax and what available funtions are there
> for evaluating a blank CDATA in ActionImg. :
>
> I do a template match up to DOCUMENT/CONTENT[@loc='']
> Then I run this <xsl:when test="I/I/IMGSrc[@id='1']/ActionImg =''"> (Note:
> This is the correct XSL; the one from the first email is wrong)
> Do I possibly need to strip spaces from ActionImg before I check for a
> blank?
>
> <DOCUMENT>
> - <CONTENT type="paragraph" loc="">
> - <I type="paragraph">
> - <I type="html">
> - <IMGSrc id="1">
> - <ImgTxt>
> - <![CDATA[ #1 Overall Mortgage Website, Spring
2004]]>
> </ImgTxt>
> - <ActionImg>
> - <![CDATA[ ]]>
> </ActionImg>
> - <ActionURL>
> - <![CDATA[
>
javascript:openURL('http://www.gomez.com/main.aspx?m=5&s=2&tc=39');]
> ]>
> </ActionURL>
> - <Text>
> - <![CDATA[ #1 Overall Mortgage Website, Spring
2004]]>
> </Text>
> </IMGSrc>
> </I>
> </I>
> - </CONTENT>
> </DOCUMENT>
>
> Thanks,
>
> don
>
>
You could use normalize-space() or strip space first with <xsl:strip-space
elements="ActionImg"/>.
normalize-space(test="I/I/IMGSrc[@id='1']/ActionImg) =''"
--
Joe (MVP - xml)
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
