W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > July to September 1999

RE: Lexical representation, Internationalization, Documentation, Versioning

From: Curt Arnold <CurtA@altavista.net>
Date: Wed, 11 Aug 1999 12:02:41 -0500
Message-ID: <37B1ACB1.326F3750@altavista.net>
To: www-xml-schema-comments@w3.org, bob_buxton@uk.ibm.com
Implying formats or datatypes from from the locale or preferences of the
author of a document to be able to interpret the document adds a
substantial amount of complexity, especially when dealing with a web of
linked XML documents from authors.  In the british user entering a
postal code example, a mixture of numbers and letters is the wrong
format if the address is in the US.  I think the proper way to handle
that is to have distinct explicit datatypes of US, British, et al postal
codes and not try to imply a format from any generic locale
information.  Of course, some presentation layer may present a view
where the British postalcode format is the default for a British users.

I'd could see something like:

<elementType name="address">
         <!--- omitted classic address things --->
        <elementType name="PostalCode">
                    <elementTypeRef name="ZipCode"/>
                    <elementTypeRef name="UKPostCode"/>
                    <elementTypeRef name="CAPostCode"/>

In the enumeration example, I wouldn't have distinct datatypes but would
allow multiple literals being mapped to the same value.  Either
something like:

<datatype name="size">
    <basetype name="integer"/>
        <literal value="1">Extra Small</literal>
        <literal value="1">XS</literal>
        <literal value="1">Tres Petite</literal>

Any application would need to be able to support any of the allowed
values regardless of the locale of the user or processor.  It may be
appropriate to indicate a generic literal and alternatives or locale
specific values.

<datatype name="size">
    <basetype name="integer"/>
        <enumerationValue value="1">
            <literal>Extra Small</literal>
            <literal locale="french locale identifier">Tres

Where the first literal would be implied to be the generic and primary



I've added my own documentation elements to several of the earlier
technical notes and to the working draft to support the generation of
the documentation that I have needed for my internal schema
development.  And apparently like the SOX submission, all my
documentation comments have been inline.  The recent debate on the
xml-dev mailing list regarding concerns about the size of schemas versus
DTD and the need expressed in the previous message is inclining me to
lean toward an documentation in separate elements linked to schema
elements.  Unfortunately in the first draft, not everything that you
want to document has an explicit way to reference (for example, literals
and attributes don't have an explicit id or reference mechanism that you
could use to provide a detailed description of the meaning of the

I'd see something like:

<elementType name="documentation">
    <attribDecl name="locale"/>
          <elementTypeRef name="elementTypeRef"/>
           <elementTypeRef name="datatypeRef"/>
           <elementTypeRef name="attributeRef"/>
            <elementTypeRef name="literalRef"/>
            <!--   maybe some more  -->
    <elementType name="description">
            <!--  just straight string description  -->
            <basetype name="string"/>
    <elementType minOccur="0" name="remarks">
            <!--   allow XHTML remarks  -->
    <!--  need some method to show examples of usage  -->
    <choice minOccur="0">
        <elementType name="exampleRef"/>
        <elementType name="example"/>
    <elementTypeRef minOccur="0" maxOccur="*" name="seeAlso"/>
    <elementTypeRef minOccur="0" name="documentation"/>

The schema element should then have a documentationRef element that
allows linking to the documentation content.

<elementType name="documentationRef">
    <attrDecl name="href" required="1">
            <datatypeRef name="uri"/>
    <attrDecl name="locale">
            <datatypeRef name="string"/>

<elementType name="schema">
        <choice minOccur="0" maxOccur="*">
            <elementType name="documentation"/>
            <elementType name="documentationRef"/>

Good luck in Montreal.
Received on Wednesday, 11 August 1999 13:16:59 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:49:51 UTC