[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Nested XML Tree View
Create a template that matches all the elements you want to display. Inside that template, take a count of all the ancestors of the current element. You can use that count to know how many spaces to "tab over" on every line. Then create a <div> element that displays the element's name and value, and use the <div>'s attributes to accomplish the "tabbing over". Instead of counting the ancestors, you could also send a param to each successive template that matches an element, like this: <xsl:apply-templates select="node()"> <xsl:with-param name="currentDepth" select="$currentDepth + 1"/> </xsl:apply-templates> That way, $currentDepth will always contain how many levels down you are in the xml structure. If you need help with any of the details, please let me know. Hope I was some help, Andy -----Original Message----- How can I achieve the following HTML output displaying the hierachy: Group: MyGroup Table: Plate Variable: Max_Response Table: Well Variable: Well_ID Any guidance at all would be appreciated. Thanks in advance _________________________________________________________________ Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|