Hi everyone,

I am trying to make two style sheets. One that transforms an XML document into an HTML page, and the other transforms the same document into a plain text output. There is one section that is giving me considerable difficulty. I have to have the output appear in a table like format. This is probably best shown through an example.

The XML ----

<company>
   <phoneNumber>111-222-3333</phoneNumber>
   <phoneNumber>444-555-6666</phoneNumber>
   <phoneNumber>777-888-9999</phoneNumber>
   <faxNumber>123-456-7890</faxNumber>
   <contactInfo>John R Adams</contactInfo>
   <contactInfo>Mike B Smith</contactInfo>
</company>

All three elements (phone number, fax number, and contact info) can occur zero through infinity times.

This is the desired output --------
(if you have this in variable-width font, then it wont look quite right)

Phone Number          Fax Number              Contact Info
111-222-3333          123-456-7890          John R Adams
444-555-6666                                            Mike B Smith
777-888-9999

I can do this easily in HTML, but the text format is rather difficult to figure out. Does anyone have an idea as to how this might be accomplished. I was trying to play around with counting the occurances of all three element and figuring out the maximum ocurrance, but I have been unable to get that to work.

Any help is greatly appreciated.

Thanks,
--Ryan




Reply via email to