Re: ISSUE-10: Mappings - proposed text

----- Original Message From: <paul.downey@xxxx>

Entering nit-pick mode...

Should identifier be:

  identifier  ::=  (letter|"_") (letter | digit | "_"){0,30}

i.e. allow single character identifiers?

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)
=============================================


"""
//xs:schema//@name values which conform to the following
pattern are "Basic":

  identifier  ::=  (letter|"_") (letter | digit | "_"){1,30}
  letter ::= ("a".."z") | ("A".."Z")
  digit ::= "0".."9"

Any other @name is marked as "Advanced".
"""

Note: case is significant and identifiers may be at most 31 characters
long based on C/C++, Fortran 90

We can probably expect i18n comments, but given the position of Basic
as the "state of the art" and i18n in programming languages sucks ..

Paul

-----Original Message-----
From: public-xsd-databinding-request@w3.org on behalf of Pete Cordell
Sent: Wed 9/6/2006 10:00 AM
To: Calladine,J,Jon,XSE6 R; public-xsd-databinding@w3.org
Subject: Re: ISSUE-10: Mappings - proposed text


Hi Jon,

This looks good to me, although in the case of C++ and its ilk, it's more
restrictive than just US ASCII.  Perhaps it ought to be "Where any character
other than alphanumeric US ASCII characters or the underscore...".

I know this is sounding a bit C/C++-ish, but I think C/C++ is the bottom of
the pile in this respect!  It's OK from a C/C++, Java, C#, Perl[1], PHP[2],
and Python [3] POV.  Don't know about VB.  What other languages should we
care about?

Pete.


[1] http://search.cpan.org/dist/perl/pod/perldata.pod
[2] PHP manual says '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*'
(http://www.php.net/manual/en/language.variables.php)
[3] http://docs.python.org/ref/identifiers.html
--
=============================================
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)
=============================================

----- Original Message ----- 
From: <jon.calladine@bt.com>
To: <public-xsd-databinding@w3.org>
Sent: Tuesday, September 05, 2006 3:35 PM
Subject: RE: ISSUE-10: Mappings - proposed text



Here is the text as discussed on the call.



Design Consideration.

The naming of element and type names remains a problematic area for
databinding tools. As the fundamental building blocks of an xml
document, tools *should* be able to support *any* valid XML element
name. This is still not the case however.

Historically, early versions of tools would not cope with the more
unusual characters available to the schema author, and these tools would
refuse to generate code. In all modern tools we have experience of there
is now excellent coverage of xml element names in so far as databinding
tools will generate the necessary serialisation/deserialisation code.
That this remains a problem area is to do with the mapping of valid xml
names to programming language specific environments often resulting in
'unpalatable' translations.

In many tools (but not all) it is possible to manually map the names to
something that is more acceptable to the developers but it must be
emphasised this is a manual step and will be very much dependent on the
specific programming language being used.

We have stopped short of giving language specific guidelines in this
basic patterns document because our aim is to provide generic guidance
to the schema author on what will work well. Our approach in this area
is as follows.

Where any character other than US ASCII is used in a schema document the
basic patterns validation rules will generate a *single* Information
message as follows:

Information: Element names in the schema have been constructed using
characters that will not map directly into all programming language
character sets for variables. The use of these element names will not
prevent databinding tools from generating mappings for these names but
the mapped names may not be 'meaningful' to the developer or may require
a manual reconfiguration of the code to make it so. For ultimate
interoperability use only US ASCII character set.

Received on Thursday, 7 September 2006 08:51:20 UTC