[thelist] Re: possibly new dumb question... [xsl] Testing for presence of node

Joel Konkle-Parker jjk3 at msstate.edu
Fri Jun 21 13:00:01 CDT 2002


XSL is much more powerful than CSS. You can set up more complex
formatting, conditional formatting, you can manipulate data before you
display it, etc.

-joeljkp

Techwatcher wrote:

>><xsl:if test="count(subcategory) &gt; 0"> </xsl:if>
>>
>>
>>>>I have an XML file that contains the following structure:
>>>>
>>>><category>
>>>>  <subcategory>
>>>>    <article>
>>>>    </article>
>>>>  </subcategory>
>>>></category>
>>>>
>>>>In my XSLT stylesheet, I need to be able to test if the <category>
>>>>node I'm working with contains a <subcategory> node. What's the
>>>>
> best
>
>>>>way to test for the presence of this node without actually doing
>>>>anything with it? I was thinking <xsl:if test="something">.
>>>>
>>>>
>
> In my current round of studies, I learned (among other things) that CSS
> is designed for XML as well as other markup languages. So, dumb
> question (please answer in language for dummies): Why do some people
> need other-than-CSS stylesheets for XML?
>
> Cheers
> Carol Stein
> techwatcher at accesswriters.com
>





More information about the thelist mailing list