Re: XML in core

David Calinski <[email protected]> Sun, 9 Nov 2003 15:34:29 +0100
Newsgroups gmane.comp.tools.memaid.devel
Message-ID <[email protected]>
On Sunday 09 of November 2003 07:50, Bruno Vernier wrote:
> On Fri, Nov 07, 2003 at 06:36:12PM +0100, David Calinski wrote:
> > On Friday 07 of November 2003 17:55, David Calinski wrote:
> > > On Friday 07 of November 2003 16:55, Bruno Vernier wrote:

> > > > Isn't it a reserved word in XML?
> >
> > There is "ID" field reserved in XML (not "id"), but as XML is
> > case-sensitive (right?) so "id" won't be a problem, will it?
>
> I think that is only if "id" is used as an attribute
>
> there is probably no restriction for element names called ID

So <memaid_data id="0"> wouldn't be good..?

After some thinking I have changed my mind:
if 'id' has to be used as identification, then it should be handled by the 
core itself, therefore it has to be short, numbers only, and can be just an 
attribute in XML.

I was previously "prejudiced" by suggestions that MemAid should doesn't care 
about "id" field at all (just load and save it - just keep it unchanged), it 
has to be a string, and neverknow-who-and-what-for will use it.
But let's be precise, right? 

Therefore my suggestion: "id" field is an *unique number* (can be long) that 
MemAid *creates itself* (but it won't be tragedy if user change that number), 
load and save it from file, keeps it unchanged, so there will be always one 
reference to specific element, even if question and answer was re-formulated.
Therefore "id" field would be in attribute of <memaid_data>.

Now I have two apprehensions:
1. Is "id" really such a reserved word in XML that we can't use it as an 
attribute of <memaid_data> ?
2. Does everybody agree that "id" field will be just a number? (maybe someone 
uses 'id' as a, lets say, description field?)


DC



-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/