forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Piroumian Konstantin <KPiroum...@protek.com>
Subject RE: [DTD] List attributes
Date Wed, 26 Jun 2002 08:05:27 GMT
> From: J.Pietschmann [mailto:j3322ptm@yahoo.de] 
> Piroumian Konstantin wrote:
> >>I can see a point when you might need a *different* graphic...
> > I think that in this case you should need to use an 'icon' 
> element instead
> > of the list bullet. Or, as I've proposed once, use 'id's 
> and have special
> > CSS styles to format your items uniquely.
> 
> Would you care to comment about the following issues
> with your approach(es):
> I suppose you mean to use
>   <p><icon src="my_bullet/>some stuff stuff stuff stuff
>     stuff some more stuff</p>
> in your first proposal. Lists are usually formatted
> with hanging indent. How do you get
>    + some stuff stuff stuff stuff stuff
>      some more stuff
> instead of
>    + some stuff stuff stuff stuff stuff
>    some more stuff
> Apart from this, it seems to be an overkill to use a graphic
> just to get a dash instead of a bulleye.

Yes, you are right. To be exact I had in mind something like: <li> <icon=""
/>some stuff</li>. If you meant the bullet by "different" graphics then the
second option should fit the needs. See below:

> 
> In the second case
> - Does this mean the graphics designer has to create
>    an class="{id}" for each element which has an id? If so,
>    how would the graphics designer get his classes used?

I don't quite understand what do you mean by class="{id}". The only syntax
(that I know) of CSS for elements with 'id's is like this:
#oneItem { list-style-image: url('images/one.gif') }
#twoItem { list-style-image: url('images/two.gif') }

And have a list like this in content:
<ul>
  <li id="oneItem">This is the item 'One'<li>
  <li id="twoItem">This is the item 'Two'<li>
</ul>

This way you indicate uniqueness of your list items using the most
appropriate thing for this - an 'id'. The graphics designer, of course,
should create according styles for them. But, note, that this is applicable
either to the case when you need unique styling for items or unique styling
for the whole list, e.g.:

#outerList { padding: 10pt; list-style-type: decimal }
#innerList { padding: 20pt; list-style-type: roman }

And this:
<ul id="outerList">
	<li>
		<ul id="innerList">
			...
		</ul>
	</li>
</ul>

>    How should clashes with classes defined by the desinger
>    avoided? Mangling the id implies the class id in the CSS
>    has to be mangled the same way, which ought to imply
>    parsing the CSS.

The 'id' is not the class id, it's the element 'id' and it's intention is to
differentiate a particular item from the others, isn't it? Then, if you
change the 'id' of your item this means that the item is not the same, so
the CSS style for that element should be also changed.

> - How will the CSS be put into the source document and
>    how will it get into the formatted result?

This is the question that I asked the list a while ago, but the answer was:
it should be avoided or something like that.

> - How should PDF generation handle the CSS definitions?

Have no idea yet. I should learn more about PDF generation first.
Suggestions are welcome.

Another option is the customize the XSLT stylesheet and extend the syntax of
the document DTD for specific needs. I've done so for i18n samples in
Cocoon. The problem was similar to this: I needed a menu with flags near the
items indicating the country for the locale. I've simply added an 'icon'
attribute to <menu-item> then changed the stylesheet to render it as needed.
Result of this you can see in C2.1 (/samples/i18n/) or here:
http://kot-p.hotbox.ru/projects/cocoon/simple.html

Konstantin

> 
> Regards
> J.Pietschmann
> 

Mime
View raw message