[Bug 5875] New: longName for elements, attributes and model groups

http://www.w3.org/Bugs/Public/show_bug.cgi?id=5875

           Summary: longName for elements, attributes and model groups
           Product: XML Schema
           Version: 1.0/1.1 both
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Structures: XSD Part 1
        AssignedTo: cmsmcq@w3.org
        ReportedBy: petexmldev@codalogic.com
         QAContact: www-xml-schema-comments@w3.org


XMLs descriptive nature is often in conflict with on-the-wire brevity. 
Additionally while the descriptiveness is often useful to those new to a
vocabulary, experts in a field often develop abbreviations for those things
they refer to frequently, and often verbosity is unhelpful for the experts.  It
would be helpful if XML schema could cater for both audiences, and this
presents a dichotomy for vocabulary designers.

For example, in the H.323 voice of IP protocol there is something called a
"TerminalCapabilitySet", but most experts in the field will call it a "TCS". 
When defining a schema for this you have a choice of the XML instance being:

    <ns:TerminalCapabilitySet>...

or:

    <ns:tcs>...

In many respects the latter has advantages because it reduces the size of the
XML, is easier to type text messages, arguably easier to read and is also in
the language that the experts use.  However, when defining an element in schema
such as:

    <xs:element name='tcs'...

is not particularly helpful to those learning a vocabulary, and in this case
the longer name would be helpful.

Therefore it is proposed that elements, attributes and also model groups (see
later) have added to them a "longName" component.  This would be an optional
NCName that could be more descriptive than the "name" component.  Thus the
above definition woul appear as:

    <xs:element name='tcs' longName='TerminalCapabilitySet'...

(Note that the XML instance in this case would always be <ns:tcs> and never
<ns:TerminalCapabilitySet>.)

It might be suggested that such a long name could be included in the
xs:documentation.  However, it helps a human schema reader to have such
information in a particular place.  It can be used to suggest to developers
variable/class names in software so that someone looking at the schema can have
a good idea what to look for in the code to see how a particular feature is
implemented.  It can also be helpful for software tools to have a specific XML
schema component containing a long name that they can use it as a more
descriptive name than the regular name.

I mentioned including longName in model groups.  A number of software tools,
such as data binding tools turn anonymous model groups into classes; for which
they need a name.  Currently this has to be derived using some heuristic rules,
or the user has to define one.  This is obviously less than ideal.  If a model
group had a longName, in addition to providing some description to a user, it
would enable the software to avoid such heuristics.

I think this addition is very easy to add.  Just add it to the XML
Representation Summary and XML Mapping Summary for elements, attributes and
model groups.  It has no effect on other aspects of schema.  

In fact it's so orthogonal I've listed it as a change to both XSD 1.0 and 1.1
in the hope it can be added to XSD 1.0 in some future revision. 

Thanks.


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Friday, 18 July 2008 09:46:52 UTC