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(_at_)onebox(_dot_)com wrote:
So, is it that you want a table with a new row for
<elementid> containing the string "properties"?
--
Charles Knell
cknell(_at_)onebox(_dot_)com - email
-----Original Message-----
From: Deepak <deepak_vn(_at_)yahoo(_dot_)com>
Sent: Wed, 11 Jan 2006 14:02:09 -0800 (PST)
To:
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com;cknell(_at_)onebox(_dot_)com
Subject: RE: [xsl] html tables with XSL
Hi Charles,
Thanks for the reply.
Attached XSL,XML file and expected HTML result.
Thanks & Regards,Deepak
--- cknell(_at_)onebox(_dot_)com wrote:
Please post your templates for processing the
<Forms> and <Form> elements. We can quickly fix
them
for you.
--
Charles Knell
cknell(_at_)onebox(_dot_)com - email
-----Original Message-----
From: Deepak <deepak_vn(_at_)yahoo(_dot_)com>
Sent: Wed, 11 Jan 2006 08:28:40 -0800 (PST)
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] 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
--~------------------------------------------------------------------
XSL-List info and archive:
http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to:
http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive:
http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to:
http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)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
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--