Subject: Re: [xsl] Automatic html generation of xml file "advice needed" From: JBryant@xxxxxxxxx Date: Fri, 27 May 2005 10:31:09 -0500 |
Well, the appearance of an HTML file is off topic for this list, but you are generating the thing with XSLT, so here's some general advice (hard to be specific without knowing more about your problem). As a writer, I always think first of audience and purpose. That is, who is going to read it and why? If you think about what your reader actually needs or wants to know, a lot of document problems solve themselves. Other than that, I would probably include empty elements (that is, elements with no content and no attributes). The additional information probably won't clutter the document much and, unless you are sure you can leave things out without causing problems for the reader, it's better to err on the side of inclusion. To give a definitive answer, though, I'd have to know who and why again. HTH Jay Bryant Bryant Communication Services (presently consulting at Synergistic Solution Technologies) "Frequent Fliers" <frequent_fliers@xxxxxxxxxxx> 05/27/2005 10:14 AM Please respond to xsl-list@xxxxxxxxxxxxxxxxxxxxxx To xsl-list@xxxxxxxxxxxxxxxxxxxxxx cc Subject [xsl] Automatic html generation of xml file "advice needed" 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Automatic html generation, Jon Gorman | Thread | Re: [xsl] Automatic html generation, Frequent Fliers |
Re: [xsl] Automatic html generation, Jon Gorman | Date | Re: [xsl] Automatic html generation, Frequent Fliers |
Month |