Re: XML in core
David Calinski <[email protected]> Fri, 7 Nov 2003 17:55:13 +0100
| Newsgroups | gmane.comp.tools.memaid.devel |
|---|---|
| Message-ID | <[email protected]> |
On Friday 07 of November 2003 16:55, Bruno Vernier wrote: > I agree with everything but I have reservations about the ID field. > I can't put my finger on it ... but somehow it does not look right. > > Isn't it a reserved word in XML? While just googling a bit about it - I haven't got a clear answer, but I will still look for it... In the meantime, it's an open question. (or what other name it should have?) > Should'nt it be an attribute of ITEM? I thought the same, but it can be long. Currently item typically fit into 1 line: <item tm_t_rpt="2" stm_t_rpt="0" l_ivl="0" rl_l_ivl="0" ivl="2" rp="0" gr="3"> Which is nice (easily readable, clear), I think. If we add id="with a string, that can have several characters" then it won't be so nice. :) Well, if "id" will be used as a number then I definitely agree that it should be attribute of "item", but currently "id" is a string... And anybody can use a long string (a description, a category name+description, etc.) > If it is a distinct sub-element, should it not have some attribute (for > categories maybe) > > I can't think of any use that would require CDATA in the ID Well, somebody can think of using "<" or "&", for example: id="Math <algebra&calculus>" The question that emerges here is: what use of "id" string? Should we clarify the use (and tell what characters (maybe just a number?) are allowed in it, how long can it be, etc.)? Or leave full freedom and "id" can be in fact used for anything (description, category name, blah blah, 'your ideas here'). If we will left that freedom, then I think CDATA should protect "id", as we don't know who and what will type into "id" field. Or maybe leave freedom but not about "<" and "&", and don't use CDATA in <id></id> ? Dave ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/