[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: RE: html tables with XSL

Subject: RE: RE: html tables with XSL
From: Deepak <deepak_vn@xxxxxxxxx>
Date: Thu, 12 Jan 2006 02:06:02 -0800 (PST)
html tables in xsl
Hi Charles,

I don't think mailing list will allow to use
attachments.

> 
> So, is it that you want a table with a new row for
> <elementid> containing the string "properties"?

Not exactly,

 Below attached XSL and XML. If we transform the XML
using the XSL provided, then we can see  the table
columns are not aligned properly.

Thanks,Pradeep


--0-1237714426-1137022967=:94530

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xmlns:java="http://xml.apache.org/xslt/java" 
xmlns:lxslt="http://xml.apache.org/xslt">
	<xsl:template match="/">
		<table border="1">
			<TR>
				<TH COLSPAN="1" bgcolor="#E0E0E0">Name</TH>
				<TH COLSPAN="1" bgcolor="#E0E0E0">Key
Properties</TH>
			</TR>
			<xsl:apply-templates select="Formelements/Form">
			</xsl:apply-templates>
		</table>
	</xsl:template>
	<xsl:template match="Form">
		<tr>
			<td align="left" valign="top">
			<xsl:if test="contains(string(elementid), 'name')">
					<ul>
						<li>
							<xsl:value-of select="elementid">
							</xsl:value-of>
						</li>
						</ul>
						</xsl:if>
								<xsl:if test="contains(string(elementid),
'address')">
					<ul>
						<li>
							<xsl:value-of select="elementid">
							</xsl:value-of>
						</li>
						</ul>
						</xsl:if>
						</td>
							<td align="right" valign="top">
						<xsl:if test="contains(string(elementid),
'properties')">
					<ul>
						<li>
							<xsl:value-of select="elementid">
							</xsl:value-of>
						</li>
						</ul>
						</xsl:if>
						</td>
						<td align="right" valign="top">
				
						</td>
	</tr>
	
	</xsl:template>
	</xsl:stylesheet>

--0-1237714426-1137022967=:94530
<?xml version="1.0" encoding="UTF-8"?>
<Formelements>
<Form>
	<elementid>samename</elementid>
</Form>
<Form>
	<elementid>address</elementid>
</Form>
<Form>
	<elementid>properties1</elementid>
</Form>
<Form>
	<elementid>properties2</elementid>
</Form>
<Form>
	<elementid>properties3</elementid>
</Form>
</Formelements>
--0-1237714426-1137022967=:94530--




--- cknell@xxxxxxxxxx wrote:

> 
> So, is it that you want a table with a new row for
> <elementid> containing the string "properties"?
> -- 
> Charles Knell
> cknell@xxxxxxxxxx - email
> 
> 
> 
> -----Original Message-----
> From:     Deepak <deepak_vn@xxxxxxxxx>
> Sent:     Wed, 11 Jan 2006 14:02:09 -0800 (PST)
> To:      
> xsl-list@xxxxxxxxxxxxxxxxxxxxxx;cknell@xxxxxxxxxx
> Subject:  RE:  html tables with XSL
> 
> 
> Hi Charles,
> 
> Thanks for the reply.
> 
> Attached XSL,XML file and expected HTML result. 
> 
> Thanks & Regards,Deepak
> 
> 
> --- cknell@xxxxxxxxxx wrote:
> 
> > Please post your templates for processing the
> > <Forms> and <Form> elements. We can quickly fix
> them
> > for you.
> > -- 
> > Charles Knell
> > cknell@xxxxxxxxxx - email
> > 
> > 
> > 
> > -----Original Message-----
> > From:     Deepak <deepak_vn@xxxxxxxxx>
> > Sent:     Wed, 11 Jan 2006 08:28:40 -0800 (PST)
> > To:       xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > Subject:   html tables with XSL
> > 
> > Hi,
> > 
> >  Am bit new to XSL programming, so please help me
> to
> > solve this problem.
> > 
> > I am trying to publish html vis XSL trnasformation
> > and
> > display should be showing the datas in different
> > columns in the table.
> > 
> > My XML File looks somewhat like 
> > 
> > <Forms>
> >    <Form>
> >    <Form>
> >    <Form>
> >    ....
> > <Forms>
> > 
> > After XSL processing, display looks like :
> > 
> >  <html>
> >       <table>
> >          <tr>
> >            <td>Form </td>
> >          </tr>
> >          <tr>
> >            <td>Form </td>
> >          </tr>
> >       </table>
> > 
> > My purpose is, i have to process different datas
> in
> > <Form> element and display different table columns
> > rather than displaying in different rows.  
> > 
> > Unfortuntely display looks depnds on the flow in
> the
> > XML file, how i can align or specify the columns
> in
> > the tables using XSL.
> > 
> > Thanks,
> > Deepak
> > 
> > 
> > 
> > 
> > 
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> > protection around 
> > http://mail.yahoo.com 
> > 
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> 
> 
---------------------------------
~



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.