<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>13750</bug_id>
          
          <creation_ts>2011-08-10 17:15:14 +0000</creation_ts>
          <short_desc>Prefixes for defaulted attributes</short_desc>
          <delta_ts>2011-12-28 18:16:57 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XML Schema</product>
          <component>Structures: XSD Part 1</component>
          <version>1.1 only</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>resolved</keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Kay">mike</reporter>
          <assigned_to name="David Ezell">David_E3</assigned_to>
          <cc>cmsmcq</cc>
          
          <qa_contact name="XML Schema comments list">www-xml-schema-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>54610</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2011-08-10 17:15:14 +0000</bug_when>
    <thetext>In Part 1 section 3.4.5.1, it is stated:

&lt;quote&gt;
[prefix]
If the {attribute declaration} has a ·non-absent· {target namespace} N, then a namespace prefix bound to N in the [in-scope namespaces] property of the element information item in the ·post-schema-validation infoset·. If the {attribute declaration}&apos;s {target namespace} is ·absent·, then ·absent·.
If more than one prefix is bound to N in the [in-scope namespaces], it is ·implementation-dependent· which of those prefixes is used.
&lt;/quote&gt;

There is a case this does not cover, namely when the attribute declaration has a non-absent target namespace, and no prefix is bound to N in the in-scope namespaces of the instance, either because the target namespace is not declared in the instance, or because it is the default namespace in the instance. In this case I believe the correct action is for an implementation-dependent prefix to be used.

This issue is currently being discussed in the JDOM community; when Xerces is used as the schema processor, it generates an Infoset (in the form of a stream of SAX events) in which the attribute information item has a namespace URI but no prefix, and this crashes JDOM (I think it would also crash Saxon).

The (lengthy) JDOM thread can be found here: http://markmail.org/message/ufye27danv4myk35</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54634</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2011-08-10 21:54:10 +0000</bug_when>
    <thetext>It has also been noted in the JDOM thread that XSD 1.0 is silent on the question of what the [prefix] of the new attribute should be - see section 3.4.5.

It has also been pointed out that the Infoset specification (unlike XDM) does allow &quot;synthetic infosets&quot; to be inconsistent, for example by having an attribute that is in a namespace but has no prefix in its name. However, I think it is undesirable that a schema processor should generate an inconsistent Infoset, as the history of this JDOM bug illustrates.

One other observation: if we add the rule that in the absence of a namespace binding, the schema processor should invent a prefix, then we should also say that it should construct a namespace information item that binds that prefix to the target namespace.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>54769</commentid>
    <comment_count>2</comment_count>
    <who name="David Ezell">David_E3</who>
    <bug_when>2011-08-12 16:04:48 +0000</bug_when>
    <thetext>We need to decide if this should be recast as a 1.0/1.1 bug.

At the telcon, discussion came to:

w.r.t. 1.1, the case is covered by the statement earlier in SISC Attribute Default Value:  &quot;In addition, if necessary ·namespace fixup· is performed on the element information item for the {attribute declaration}&apos;s {target namespace}.&quot;
and the definition of namespace fixup.

w.r.t. 1.0 I believe this is  or should be a WONTFIX.  We may already have explicitly marked this or a related namespace fixup issue as WONTFIX for 1.0 (we may want to check).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58640</commentid>
    <comment_count>3</comment_count>
    <who name="David Ezell">David_E3</who>
    <bug_when>2011-10-21 15:56:47 +0000</bug_when>
    <thetext>MK: a further clarification is that a 4th case should be added.
...: &quot;if no namespace is declared go see the namespace fix-up rules.&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59912</commentid>
    <comment_count>4</comment_count>
    <who name="David Ezell">David_E3</who>
    <bug_when>2011-11-11 16:56:05 +0000</bug_when>
    <thetext>MSM: so for 1.0 it&apos;s won&apos;t fix, and for 1.1 an editorial fix to say that the namespace fix-up rules apply.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62110</commentid>
    <comment_count>5</comment_count>
    <who name="C. M. Sperberg-McQueen">cmsmcq</who>
    <bug_when>2011-12-28 18:16:57 +0000</bug_when>
    <thetext>The changes eventually made to the wording of the spec have been recorded in 

  https://www.w3.org/XML/Group/2004/06/xmlschema-1/structures.b13750.html
  (member-accessible link)

Since the WG did not want to see the wording again, I&apos;m marking this issue resolved.

Michael, as the originator would you please review the wording (which should be included
in the status-quo document in a day or so, or can be reviewed in the change record
just mentioned) and close the bug if you agree that it&apos;s been resolved?  Thank you.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>