Hi All- I have the following data,
a snippet from a file. <ObjectPath>
<Reference Relationship="Table: " Level="0"
Id="#PID-17877114741569430027">A_CONTACT_ADR</Reference><Reference
Relationship=" CONTAINS has_Column: " Level="1"
Id="#PID-17877114741569422766">cntc_id</Reference><Reference
Relationship="
CONTAINS has_UserDefinedProperty: " Level="2"
Id="#PID-17877114741569429987">DD FIELD
#</Reference><Reference
Relationship=" CONTAINS has_UserDefinedProperty: "
Level="2"
Id="#PID-17877114741569430016">DDS
Release</Reference><Reference
Relationship=" CONTAINS has_UserDefinedProperty: "
Level="2" Id="#PID-17877114741569430017">DDS INTERFACE
FIELD # (within
table)</Reference> <Reference Relationship="Table: "
Level="0"
Id="#PID-17877114741569431018">ACIS_BILL_GROUP</Reference><Reference
Relationship=" CONTAINS has_Column: "
Level="1"
Id="#PID-17877114741569431004">eff_dt</Reference><Reference
Relationship=" CONTAINS has_UserDefinedProperty: "
Level="2" Id="#PID-17877114741569431005">DD FIELD
#</Reference><Reference Relationship=" CONTAINS
has_UserDefinedProperty: " Level="2"
Id="#PID-17877114741569431006">DDS
Release</Reference><Reference Relationship=" CONTAINS
has_UserDefinedProperty: " Level="2"
Id="#PID-17877114741569431007">DDS
INTERFACE FIELD # (within table)</Reference>
<ObjectPath> I need to create a table structure with
the
Table Names ( eg.A_CONTACT_ADR) at the top and the
column names (items
where Level = 1 or Relationship = "CONTAINS
has_Column:") lined after
that and then on clicking on that column it should go
to another
link with the Level=2 items arranged together.( I
have not started
with the Level=2 yet) I am new to XSLT. This is what
I
Created. What should I correct to get this working?
Right now I
created this following- it lines up the Table Names at
top ( but with a big
space in between) and the columns are lined up
together. I would like
it to look like TableName1Column
Name1.1ColumnName1.2
TableName2ColumnName2.1ColumnName 2.2 Column
1.1 User Defined Property 1.1 User Defined Property
1.2 etc,
Can I use a variable or a named template which calls
itself so
that I can get these together?. Thanks for
any help that you can provide.
My script so far: <?xml
version="1.0" encoding="UTF-8"?><xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">http://www.w3.org/1999/XSL/Transform">
<xsl:output
method="html" version="1.0" encoding="UTF-8"
indent="yes"/> <xsl:template
match="ObjectPath"> <table width="600" border="1"
<!-- necessary so i can add the break after each
item in the
tree --> <xsl:for-each
select="./Reference">
<xsl:if
test="@Level">
<xsl:choose> <xsl:when
test="@Level = '0'
"> <P><HR/>
</P>
<tr> Data Dictionary for
the TABLE
: </tr> <tr bgcolor =
"#669999">
<A><xsl:attribute name="HREF"><xsl:value-of
select="@Id"/></xsl:attribute>
<xsl:value-of
select="self::node()" />
</A>
</tr>
</xsl:when> <xsl:when
test="@Relationship=' CONTAINS has_Column:
'"> <P><HR/> </P>
<tr
bgcolor = "#cccccc" >
<td>Column
Name</td>
</tr> <tr>
<td><A><xsl:attribute
name="HREF"><xsl:value-of
select="@Id"/></xsl:attribute>
<xsl:value-of select="self::node()"
/>
</A></td>
</tr> </xsl:when>
</xsl:choose>
</xsl:if>
</xsl:for-each></table> </xsl:template>
</xsl:stylesheet> Thanks
Kumar
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.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>
--~--