This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: xsl and <Div> tags - urgent please help


Aparna Konduri wrote:

> I have an xml file generated for a C# class from Visual 
> Studio.
Cool xml design :)

> 
> E.g:
> 
> <member name="T:Person">
> <access type="public"/>
>      <summary>
>         Person class
>       </summary>
> </member>
> <member name="M:getName()">
> <access type="public"/>
>       <summary>
>          get name method     
>       </summary>
> </member>
> <member name="T:Car">
> <access type="private"/>
>      <summary>
>         Car class
>       </summary>
> </member>
> <member name="M:getMake()">
> <access type="private"/>
>       <summary>
>          get make method     
>       </summary>
> </member>
> 
> 
> As you see, all the classes and its methods are shown as 
> member tags. Only thing that differentiates the two is the 
> first character of the name value (e.g. "T" for class 
> type, "M" for method). I use an xsl file as attached to 
> display the xml. But I want the toggling functionality on 
> each class shown on html page. i.e. if I click on the 
> classname, its body and methods should appear. 

Apart from your WD-XSL stuff which is not supported on this list (see 
http://www.netcrucible.com/xslt/msxml-faq.htm) at all, I would say in *xslt* 
you can easy differenciate memeber elements using starts-with(string, 
substring) function:

<xsl:template match="member[starts-with(@name, 'T:')]">
...type processing...
</xsl:template>
<xsl:template match="member[starts-with(@name, 'M:')]">
...method processing...
</xsl:template>

-- 
Oleg Tkachenko
Multiconn International, Israel


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]