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

Techwatcher techwatcher at accesswriters.com
Fri Jun 21 12:30:01 CDT 2002


> <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