|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Vertical Resulting Display...Format..
Hi,
Im not too sure about your requirements, but the following will give you the
ouput you have stated
cheers
andrew
==xsl==
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<table>
<th>Impl File</th>
<th>Header File</th>
<xsl:apply-templates select="Project/SubProject"/>
</table>
</xsl:template>
<xsl:template match="SubProject">
<tr>
<td><xsl:value-of select="ImplFiles/File[1]"/></td>
<td><xsl:value-of select="HeaderFiles/File[1]"/></td>
</tr>
</xsl:template>
</xsl:stylesheet>
=========
>
>
> Hi All,
> Here is a xml.
>
> <?xml version='1.0'?>
> <Project>
> <SubProject ID="1">
> <ImplFiles>
> <TotalFiles>3</TotalFiles>
> <File>KTbizAgent.cpp</File>
> <File>KTCbizAgent.cpp</File>
> <File>StdAfx.cpp</File>
> </ImplFiles>
> <HeaderFiles>
> <TotalFiles>3</TotalFiles>
> <File>KTbizAgent.h</File>
> <File>resource.h</File>
> <File>StdAfx.h</File>
> </HeaderFiles>
> </SubProject>
> <SubProject ID="2">
> <ImplFiles>
> <TotalFiles>3</TotalFiles>
> <File>KTdbAgent.cpp</File>
> <File>KTCdbAgent.cpp</File>
> <File>StdAfx.cpp</File>
> </ImplFiles>
> <HeaderFiles>
> <TotalFiles>3</TotalFiles>
> <File>KTdbAgent.h</File>
> <File>resource.h</File>
> <File>StdAfx.h</File>
> </HeaderFiles>
> </SubProject>
> </Project>
>
>
> I want the output to be
>
> <Table>
> <TH>Impl File</TH>
> <TH>Header File</TH>
> <TR>
> <TD>KTbizAgent.cpp</TD>
> <TD>KTbizAgent.h</TD>
> </TR>
> <TR>
> <TD>KTdbAgent.cpp</TD>
> <TD>KTdbAgent.h</TD>
> </TR>
> ...
> ....
> ...
> </TABLE>
>
> I want Vertical result.As it is inital phase if i need to optimize my xml
> let me know .
>
> Thanks in Advance
> Sachi
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








