ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Guy Worthington <guyw@multiline.com.au>
Subject: Re: XML & ConTeXt -- handling many conventions
Date: 11 Sep 2003 12:27:41 +0800	[thread overview]
Message-ID: <uk78g2blu.fsf@multiline.com.au> (raw)
In-Reply-To: <000b01c376d1$cf58eda0$0500a8c0@best>

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.

  reply	other threads:[~2003-09-11  4:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-09 12:56 Pawel Jackowski na WP
2003-09-11  4:27 ` Guy Worthington [this message]
2003-09-11  5:28   ` Pawel Jackowski na Onet
2003-09-13 21:43   ` Hans Hagen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=uk78g2blu.fsf@multiline.com.au \
    --to=guyw@multiline.com.au \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).