Subject: Re: `High-level' format specifications with XSL? From: Kai Grossjohann <grossjohann@xxxxxxxxxxxxxxxxxxxxxxxxx> Date: 02 Jul 1998 16:59:53 +0200 |
>>>>> I wrote: > So, how do I produce `good-looking' (HTML) output without having > to specify all spacings and font-weights and the like? >>>>> Frank replies: > Actually CSS is much more appropriate than XSL for simple out put > like this in XML. Nonono. The *output* is supposed to be simple, but the *input* isn't. Nor is the transformation between the input and the output quite so straightforward as you might think. The input looks like this: <project> <projecttitle>Test project</projecttitle> <startdate><day>01</day><month>01</month><year>1998</year></startdate> <enddate><day>31</day><month>12</month><year>1998</year></enddate> <contact> <first>Kai</first><last>Grossjohann</last> <email>grossjohann@xxxxxxxxxxxxxxxxxxxxxx</email> </contact> <description>No description yet.</description> </project> The output should look like the following, maybe: (I'm choosing an HTML 1.0 representation. Just imagine what it would look like in, say, Netscape, and you know what it should look like. Also note that some users might want this to look different.) <html> <head><title>Test project</title></head> <body> <h1>Test project</h1> <h2>Duration</h2> <p>From 1998-01-01 to 1998-12-31.</p> <h2>Description</h2> <p>No description yet.</p> <hr> <address> <a href="mailto:grossjohann@xxxxxxxxxxxxxxxxxxxxxx"> Kai Grossjohann </a> </address> </body> </html> Please note the reordering within the dates, as well as the fact that the contact is put last! Also note the addition of literal text and the fact that the project title is used twice. And finally, note that the content of the EMAIL element has become an attribute value (of HREF) in the output. This can't be done with CSS, can it? I hope you all now understand much better what I want. Let me summarize this a bit more: On the input side, I have semantically marked-up information. I want to produce some human-readable represenation of it, but I *don't* want to worry about stuff like indentation and kerning and font weights and so on. An alternative to the above representation would be some tabular notation. But still, I don't want to specify spacing and so on, I just want to say: make a two-column table, both columns left justified, with three rows, where the first row should have `Duration' in the left column and `1998-01-01 through 1998-12-31' in the right column and the second row... You get the idea. kai -- You ate somebody? -- Just a leg. -- That's terrible! -- Not with mustard. (Terry Pratchett: Interesting Times) XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: `High-level' format specificati, Frank Boumphrey | Thread | RE: `High-level' format specificati, Pawson, David |
Re: `High-level' format specificati, Paul Grosso | Date | Re: `High-level' format specificati, Chris Maden |
Month |