Subject: RE: [xsl] flattening nested xml From: "Stuart Celarier" <stuart@xxxxxxxxxxx> Date: Thu, 16 May 2002 10:45:52 -0700 |
Andrew, use CSS styling as much as you can for the presentation layer, let XSLT transform the structure and content. Here is an HTML document which I think solves your ultimate problem, viz, to outdent (yes, that is the typographic, as opposed to indent, but they are also called 'hanging paragraphs') the top level nesting and have block paragraphs for any nested paragraphs. <html> <head> <title>Andrew Welsh Is Stylin' Now</title> <style type="text/css"> div { margin: 1em 0em; text-indent: 0em } div.outer { text-indent: -5em ; margin-left: 5em } div.outer:first-line { font-weight: bold } </style> </head> <body> <div class="outer"> Ok, so far so good. But if the data wraps, it will wrap beneath the number and not indented where it should, so I contain the whole lot in a div indented by 5em. Of course, this simply shifts the whole lot to the right by 5em, but if I include a text-indent of -5em it produces the required output by reverse-indenting(?:) only the top line by -5em, giving the impression of a neatly tabbed list. <div class="inner"> Great. But this has brought with it problems. If the para's contain any block elements in them it treats the next line as a first line and indents that by -5em. Also, it affects the widths of divs if they are effectively the 'first line' (and caused numerous other issues other markup, but were all solvable). </div> </div> </body> </html> This outdents the div.outer paragraphs, and lines up the nested paragraphs with the main block of the outer paragraphs. I also used the pseudo-selector 'first-line' to illustrate its application, just for kicks. Is that what you are looking for? Cheers, Stuart XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] flattening nested xml, Andrew Welch | Thread | [xsl] Re: Adjusting sorted list, Dimitre Novatchev |
Re: [xsl] How to remove double elem, Jeni Tennison | Date | RE: [xsl] documenting element synta, sara . mitchell |
Month |