- From: Jirka Kosek <jirka@kosek.cz>
- Date: Tue, 02 Oct 2012 22:48:39 +0200
- To: Shaun McCance <shaunm@gnome.org>
- CC: Yves Savourel <ysavourel@enlaso.com>, public-multilingualweb-lt@w3.org
- Message-ID: <506B5327.30909@kosek.cz>
On 2.10.2012 22:10, Shaun McCance wrote: > Space is already being used as a separator between each category/tool > item in the list, I think, as in: > > its:toolRefs="category1/#tool-1 category-2/#tool-2" > > Of course, since it's always lists of pairs, using space for both is > unambiguous. Moreover such syntax is already in use in xsi:schemaLocation, so we will not be reinventing the wheel. > But I think it's harder to read, You can put each pair on a new line if readability is your concern. > and it means you can't > use a trivial algorithm with a string-split function. I think that even with space it still will be almost trivial to process such structure. > What about using "="? It feels more natural to me for this purpose, > and while it is valid (and not uncommon) in URIs, at least it isn't > guaranteed to occur five characters later. As long as the left hand > side is just an NMTOKEN, first occurrence is unambiguous. > > (I actually think ":" is the most natural character, but I think > we'd be painting ourselves into a very bad corner by precluding > that from the category name.) Using any character which can appear inside name of category or in URI will prevent you from using naive and quick implementations relying on functions like split(). You will have to define grammar and write down parser for it or use non-trivial regular expression for splitting toolsRef value. Jirka -- ------------------------------------------------------------------ Jirka Kosek e-mail: jirka@kosek.cz http://xmlguru.cz ------------------------------------------------------------------ Professional XML consulting and training services DocBook customization, custom XSLT/XSL-FO document processing ------------------------------------------------------------------ OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member ------------------------------------------------------------------
Received on Tuesday, 2 October 2012 20:49:04 UTC