logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

QNames in content: msg#00093

Subject: QNames in content

Hi,

as noticed recently on www-tag[0], QNames in content aren't consistently used accross specs. Some (like XML Schema, 3.15.3.2.2.1) have them use the default namespace, others (like XSLT, 2.4) don't.

Question one:

Does the following snippet adequately capture a default-namespace-insensitive QName (the regex might be slightly off as I'm not fully familiar with XML Schema regexen, but it's "NCName:NCName" to ensure it can only be a QName if it has a prefix):

<simpleType>
  <union>
    <simpleType>
      <restriction base='QName'>
        <pattern value='[_\i]([\c]-[:])*:[_\i]([\c]-[:])*'/>
      </restriction>
    </simpleType>
    <simpleType>
      <restriction base='NMTOKEN'/>
    </simpleType>
  </union>
</simpleType>


Question two:

It's too late to decide on only one option and make all specs consistent on this point, but wouldn't it be a good idea for a WG (XML Core?) to publish short and simple guidelines for when QNames in content are appropriate and when which option (defaulting ns or not) is best?


[0]http://lists.w3.org/Archives/Public/www-tag/2003Jan/0096.html

--
Robin Berjon <robin.berjon@xxxxxxxxx>
Research Engineer, Expway        http://expway.fr/
7FC0 6F5F D864 EFB8 08CE  8E74 58E6 D5DB 4889 2488




<Prev in Thread] Current Thread [Next in Thread>