xsl-list
[Top] [All Lists]

Automatic html generation of xml file "advice needed"

2005-05-27 08:14:07
Hi all.im in need of some advice. What i want to do, is, make a html representation of any xml file.I already have some xslt code to get me started. What i will do is take any arbitrary xml file and generate some standard html representation of it.The representation will comprise of components (element names, text data, attributes and their values).This shouldnt be too much of a problem. The tricky part is establishing a standard format i could apply. For example, should i display the xml file as one large table, or should i display each element name with <u> tags and display its text below it??
The attributes will be no problem, im thinking of the following,
-----------------------------------------------------------
<b>attributeName</b>: attributeValue
----------------------------------------------------------
and for any element that has a text node as a child, i will do something like,
--------------------------------------
<u>elementName</u>
textNodeValue.
--------------------------------------
But im thinking that there will be instances where elements will not have text nodes as immediate children, but as descendants, for example,
<book>
 <author>
   <first_name>Joe</first_name>
   <last_name>Bloggs</last_name>
 </author>
</book>
Im just thinking of the best way to represent elements!Should i only print element names that have a text node?if i do this than i would loose some element names, i.e the elements that dont have text nodes, such as author above.Can provide me with a little help for this problem?what do you reckon is my best way to tackle this??
Many thanks for your help,
Best wishes,
-Kilo Juliet-

_________________________________________________________________
Use MSN Messenger to send music and pics to your friends http://messenger.msn.co.uk


--~------------------------------------------------------------------
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>
--~--



<Prev in Thread] Current Thread [Next in Thread>