Hi
I’m new to docbook and XSLT, and tried to find the answer among the different
books/websites and failed, so looking up for your help (pointers to the right
place will be good as well).
I’m trying to add a new element to my docbook, that will describe a requirement
for example:
<requirement>
<req_id>TRC_001</req_id>
<version>1</version>
<status>New</status>
<priority>H</priority>
<description>We need to be able to save a snapshot of requirements per
product version</description>
<traceability>None</traceability>
</requirement>
In my outputs, I want to format each such requirement as a table. Writing same
table as docbook table directly, I would have something like:
<table>
<tgroup cols="4">
<colspec colnum="1" colname="1" colwidth="*" />
<colspec colnum="2" colname="3" colwidth="*" />
<colspec colnum="3" colname="3" colwidth="*" />
<colspec colnum="4" colname="4" colwidth="*" />
<spanspec spanname="desc" namest="1"
nameend="3"/>
<tbody>
<row>
<entry><para>TRC_001</para> </entry>
<entry><para>1</para> </entry>
<entry><para>New</para></entry>
<entry><para>H</para></entry>
</row>
<row>
<entry
spanname="desc"><para> We need to be able to save a snapshot of requirements
per product version </para></entry>
<entry
colname="4"><para>None</para></entry>
</row>
</tbody>
</tgroup>
</table>
I tried to add this to stylesheet, but I cannot write “docbook” table there,
and I have to do it per output format (HTML – use the tr & td flags, FO for PDF
and other print formats…)
1. Is there a way to do the conversion of the new “requirement” into docbook
code, which will automatically be formatted as HTML or FO later, base on the
xsltproc parameters I give?
2. Is there a way to add reference based on the requirement ID (so I can
link to it later)?
Thanks in advance
Ilan
IMPORTANT NOTICE: The contents of this email and any attachments are
confidential and may also be privileged. If you are not the intended recipient,
please notify the sender immediately and do not disclose the contents to any
other person, use it for any purpose, or store or copy the information in any
medium. Thank you.