Pawel Jackowski na WP wrote:

> There is a lot of ways to build ConTeXt macro which can handle something
> like i.e:
> 
> <chapter title="First Chapter">
> ...
> or
> 
> <chapter>
> <title>First Chapter</title>
> ...


Hello Pawe� (I, hope your name comes out OK; I cut & pasted your
signature, which on my news-reader looks like "Pawe${}^3$")

The element <chapter title="First Chapter"> is wrong.  By burying your
title in an attribute you're making it neither easily searchable nor
useble by other applications.

Your alternative XML snippet is much better:

<chapter>
   <title>First Chapter</title>
...
</chapter>

The general rule of thumb for when to use attributes and when to use
elements is: use elements for presentable data and attributes for
system data.  In this case where you're presenting the title "First
Chapter" to the context-processor to be marked up as a chapter title,
it is definitely presentable data, and therefore it belongs in an
element.

_______________________________________________
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context

Reply via email to