From paweljackowski@wp.pl Tue Sep 9 14:56:57 2003 From: Pawel Jackowski na WP To: ntg-context@ntg.nl Subject: [NTG-context] XML & ConTeXt -- handling many conventions Date: Tue, 09 Sep 2003 14:56:25 +0200 Message-ID: <000b01c376d1$cf58eda0$0500a8c0@best> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1226498545887306100==" --===============1226498545887306100== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Hi! There is a lot of ways to build ConTeXt macro which can handle something like i.e: ... or First Chapter ... But is there any way to handle both conventions in one defnition? Regards, Paweł --===============1226498545887306100==-- From guyw@multiline.com.au Thu Sep 11 06:28:19 2003 From: Guy Worthington To: ntg-context@ntg.nl Subject: [NTG-context] Re: XML & ConTeXt -- handling many conventions Date: Thu, 11 Sep 2003 12:27:41 +0800 Message-ID: In-Reply-To: <000b01c376d1$cf58eda0$0500a8c0@best> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4187752520664127113==" --===============4187752520664127113== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Pawel Jackowski na WP wrote: > There is a lot of ways to build ConTeXt macro which can handle something > like i.e: > > > ... > or > > > First Chapter > ... 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 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: First 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. --===============4187752520664127113==-- From jackos1@poczta.onet.pl Thu Sep 11 07:30:03 2003 From: Pawel Jackowski na Onet To: ntg-context@ntg.nl Subject: Re: [NTG-context] Re: XML & ConTeXt -- handling many conventions Date: Thu, 11 Sep 2003 07:28:48 +0200 Message-ID: <000d01c37825$9dc65610$0500a8c0@best> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6302983179274328504==" --===============6302983179274328504== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Hi! > Hello Pawe³ (I, hope your name comes out OK)[...] Actually no, but don't worry. I'm aware that polish 'lslash' may not be displayed properly. But using polish characters is the only way to protect them from extinction. I will think about some compromise. > The element is wrong. By burying your > title in an attribute you're making it neither easily searchable nor > useble by other applications. That is what I said to my boss. The problem is that J have to build something more or less universal because I don't known who will prepare XML documents and which convention will be used. > 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. Thanks, I will remember. It looks convincing. Regards, Pawe/l --===============6302983179274328504==-- From pragma@wxs.nl Sat Sep 13 23:48:17 2003 From: Hans Hagen To: ntg-context@ntg.nl Subject: Re: [NTG-context] Re: XML & ConTeXt -- handling many conventions Date: Sat, 13 Sep 2003 23:43:17 +0200 Message-ID: <5.2.0.9.1.20030913234124.022fbd00@localhost> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4660867312729974928==" --===============4660867312729974928== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit At 12:27 11/09/2003 +0800, Guy Worthington wrote: >Pawel Jackowski na WP wrote: > > > There is a lot of ways to build ConTeXt macro which can handle something > > like i.e: > > > > > > ... > > or > > > > > > First Chapter > > ... > > >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 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: > > > First 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. indeed. concerning attributes, i use 'm for First Chapter permits you to analyze a label without the need to look into the element text. Hans ------------------------------------------------------------------------- Hans Hagen | PRAGMA ADE | pragma(a)wxs.nl Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com ------------------------------------------------------------------------- information: http://www.pragma-ade.com/roadmap.pdf documentation: http://www.pragma-ade.com/showcase.pdf ------------------------------------------------------------------------- --===============4660867312729974928==--