OK I've patched the code so that the column name can be defined using an
XPath expression. This should make it into CVS by about the same time you
receive this email (am on a flight back to the UK from Munich right now).
There's an example of it in use in xml/swing/tableForAtoms.xml

Actually after going ahead and patching the code to implement this, I think
all what you really wanted to do was use an attribute value in a *cell* -
i.e. not use XPath to define the name of a column, but use XPath to define
the values in the column, using attributes in the XML.

Here's an example table definition which displays the boiling point
(element) value in one column and the units attribute in the next column

<table select="/PERIODIC_TABLE/ATOM">
<column select="NAME">Name</column>
<column select="SYMBOL">Symbol</column>
<column select="BOILING_POINT" type="number">Boiling Point</column>
<column select="BOILING_POINT/@UNITS">Units</column>
</table>

So really I think all you needed to do was use XPath to find the attributes.
Either way I think this fixes your problem now.

James
----- Original Message -----
From: "Srinivas Velidanda" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 29, 2002 7:06 AM
Subject: [dom4j-user] JTable....XMLTableDefinition


> Hi,
>
> I need to know how to add an Attribute name as JTable column header and
> corresponding value set in that column using org.dom4j.swing package
> classes.
> Is it actually possible using this org.dom4j.swing package API ?
>
> clarify this ASAP.,
>
> Thanks a lot
>
> Srinivas.
>
>
>
>
>
> _______________________________________________________________
>
> Don't miss the 2002 Sprint PCS Application Developer's Conference
> August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm
>
> _______________________________________________
> dom4j-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/dom4j-user
>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to