W3C home > Mailing lists > Public > public-xsd-databinding@w3.org > January 2006

Re: ISSUE-10: Mapping Element and Type names

From: Pete Cordell <petexmldev@tech-know-ware.com>
Date: Mon, 16 Jan 2006 10:37:20 -0000
Message-ID: <002401c61a88$d93bd7d0$b100a8c0@RW>
To: <paul.downey@bt.com>, <public-xsd-databinding@w3.org>

----- Original Message ----- From: <paul.downey@bt.com>
> > So the questions for C/C++ and other languages with similar limitations
> > become:  is this an issue?  Should it be left to vendors to sort out?
> > Should a mapping procedure be specified that ends up with only valid 
> > C/C++
> > characters?
>
> there is a short paragraph on this subject in our input document:
>
> """
> The name of a schema type, attribute or element may be any valid XML
> non-colonized name including names which may be reserved or not directly
> representable in some programming languages, such as "object", "static",
> "final", "class", "Customer-Profile", etc.
> """
>
> http://www.w3.org/2005/07/xml-schema-patterns.html#Naming
>
> Which is basically advising tools that they have to support all
> of the possible XML names for elements and types.
>
> > Should developers be advised that for maximum portability the
> > character set used for XML names should be limited to the C/C++ set?
>
> I'm not keen on advising Schema authors to restrict how they name
> elements and attributes, especially as there isn't an obvious subset
> - C++ names often don't work well in SQL or COBOL and vice-versa.

I agree with the requirement that tools should support all mappings.  I'm 
just slightly worried that there's an issue of what can be done vs. what can 
easily be done.  For example, a tool could map Chinese characters to their 
Unicode number (e.g. Type_U1234_U6543), but a Chinese developer might decide 
that they prefer to use ASCII XML names in preference to this.

Admittedly, most tools allow manual mapping of names, but again, this 
involves more work, so it's another trade-off that a developer may choose to 
make.

So is the purpose of the document to advise purely on what is possible (even 
if it is unattractive), or should it give guidance on language specific 
trade-offs?  For example, it could advise that not all XML names are 
directly representatable in some programming languages (such as C/C++, SQL 
etc), and as a result the automatically mapped names may be non-intuitive, 
or additional manual configuartion may be required if names are not chosen 
with with these limitations in mind.

Pete.
--
=============================================
Pete Cordell
Tech-Know-Ware Ltd
                         for XML to C++ data binding visit
                         http://www.tech-know-ware.com/lmx
                         (or http://www.xml2cpp.com)
=============================================
Received on Monday, 16 January 2006 10:37:39 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 18 December 2010 18:20:36 GMT