[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: RE: html tables with XSL
This is still a muddle to me. Let me try to re-phrase the matter and you tell me if I've got it right or wrong. You have an XML document with a root element <FormElements>. The structure of this document is like this: <FormElements> <FormElement version=""> <value> <!-- Sometimes the "value" element will have an "editbox" child and at other times it will simply contain a string --> <editbox password=""></editbox> </value> <caption></caption> <elementid></elementid> </FormElement> </FormElements> The structure of the output: 1) You wish to create an HTML table with two columns. 2) The first column heading is the string "Name". 3) The second column heading is the string "Keys". 4) You wish to create a new row for every "FormElement" in the XML document. 5) In the first table cell of the new row (i.e., the first column of the table) you wish to place the value from "caption" element child of the "FormElement". 6) Following that you wish to enter the string ":". 7) Following the string ":", you wish to place the string value of the "value" element child of the "FormElement". No, I'm lost again. It seems that sometimes the data goes in the first column and other times it goes in the second column. I can't understand what rule determines when it goes in the first column and when it goes in the second column. Please state, in the numbered format above, exactly the rules you wish to use to produce the table from the XML document. I suspect that if you can think about the problem clearly enough to formulate explicit production rules, you will be able to solve the problem yourself. If you can't formulate explicit production rules, it's unlikely that anyone else can. -- Charles Knell cknell@xxxxxxxxxx - email -----Original Message----- From: Deepak <deepak_vn@xxxxxxxxx> Sent: Tue, 24 Jan 2006 07:28:43 -0800 (PST) To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: html tables with XSL Hi Charls, Am not sure the below mail is clear for you. Otherwise, please let me know. If could help to resolve the problem, then it should be very much appreciated. Thanks & Regards, Deepak --- Deepak <deepak_vn@xxxxxxxxx> wrote: > Hi Charls, > > > In your sample data you have this element: > > > > <elementid>Template[0]/NAME[0]/Value</elementid> > > Its just an identifier rather than actual value. The > actual value will be inside a editbox or it may be > as > in normal element shown in the xml file. > > I feel <elementid> is the just an identifier to > identify the value. The html table will display > caption:value(s) for 'template[0]' in the first > column, next column is caption:value(s) for element > id > 'profile[0]'. > > The only difference is , if there is more than one > profile(say profile[1], profile[2]), then it should > be > displayed nextrow with same caption:value pair for > the template[0] and next column is filled with > caption:value(s) for element id 'profile[1]'. > > <FormElements> > <FormElement version="0.1"> > <value> > <editbox password="false">Sam</editbox> > </value> > <caption>Name</caption> > <elementid>Template[0]/NAME[0]/Value</elementid> > </FormElement> > <FormElement version="0.1"> > <value> > <editbox password="false">Test</editbox> > </value> > <caption>Org</caption> > <elementid>Template[0]/NAME[1]/Value</elementid> > </FormElement> > <FormElement version="0.1"> > <value>VALUEx0<value> > <caption>KeyName </caption> > <elementid>Profile[0]/KeyValueString</elementid> > </FormElement> > <FormElement version="0.1"> > <value>VALUEx1<value> > <caption>KeyStrength</caption> > <elementid>Profile[0]/KeyValueInteger</elementid> > </FormElement> > <FormElement version="0.1"> > <value>VALUEy0<value> > <caption>KeyName</caption> > <elementid>Profile[1]/KeyValueString</elementid> > </FormElement> > <FormElement version="0.1"> > <value>VALUEy1<value> > <caption>KeyStrength</caption> > <elementid>Profile[1]/KeyValueInteger</elementid> > </FormElement> > <FormElement version="0.1"> > <value>VALUEy2<value> > <caption>KeyUsage</caption> > <elementid>Profile[1]/KeyValueString</elementid> > </FormElement> > </FormElements> > > HTML display may looks like : > > Name Keys > -------------------------------- > Name:Sam KeyName : Valuex0 > Org :US KeyStrength: Valuex1 > > -------------------------------- > Name: Sam KeyName : Valuey0 > Org : US KeyStrength : Valuey1 > KeyUsage : Valuey2 > > > I hope , it may clear for you. Thanks for helping me > to solve the problem. > > Thanks and Regards,Deepak
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|