This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
[docbook-apps] nodetree to tablestructure
- From: "Jeroen Alblas" <jeroena at infosupport dot com>
- To: <docbook-apps at lists dot oasis-open dot org>
- Date: Fri, 25 Apr 2003 15:52:59 +0200
- Subject: [docbook-apps] nodetree to tablestructure
Hello,
I'm writing XSLT code to turn XML data into a DocBook book. I'm stuck at
the moment trying to turn an XML node structure into a table. The XML is
representing a flow of actions. The "parallel" tag holds actionflows
that can occur simultaneously.
Say I have the following XML structure:
<tree id=1>
<action name="a1"/>
<action name="a2"/>
<parallel>
<tree id=2>
<tree id=3>
</parallel>
<action name="a3"/>
</tree>
<tree id=2>
<action name="a4"/>
<action name="a5"/>
</tree>
<tree id=3>
<action name="a6"/>
</tree>
The table should something like this:
-------------------------------------------------
| a1 |
-------------------------------------------------
| a2 |
-------------------------------------------------
| a4 | a6 |
-------------------------------------------------
| a5 | <empty> |
-------------------------------------------------
| a3 |
-------------------------------------------------
When transforming an XML tree like this to an HTML table, the nested
sturcture can be solved with nesting HTML tables. I believe this can't
be done with DocBook tables.
The example is quite simple, but imagine the nesting to be more deeply.
The tree with ID 3 could contain another parallel tag, for instance.
Maybe someone has had (and solved) this problem before.
I've searched the DocBook documentation for tagsturctures that can
represent a tree structure, but alas. Understandable though, because
then you would have to create tags for all kind of diagrams I guess
(flowcharts, pieslices, what have you).
Thnx!
Jeroen.
Disclaimer http://www.infosupport.com
***********************************************************************
This E-Mail Message is intended exclusively for the addressee. If the
E-Mail was sent to you in error, please notify the sender immediately
by replying to this E-mail. We would then request you to destroy the
E-Mail and neither to use nor disclose the contents in any manner to
third parties, as the message could contain confidential information
which may be protected by the professional secrecy act.
This footnote also confirms that this E-mail message has been swept for
computer viruses.
***********************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe at lists dot oasis-open dot org
For additional commands, e-mail: docbook-apps-help at lists dot oasis-open dot org