This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 6920 - WS-Enum: xml:lang causes schema validation failure
Summary: WS-Enum: xml:lang causes schema validation failure
Status: CLOSED REMIND
Alias: None
Product: WS-Resource Access
Classification: Unclassified
Component: Enumeration (show other bugs)
Version: PR
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Katy Warr
QA Contact: notifications mailing list for WS Resource Access
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-19 09:30 UTC by Katy Warr
Modified: 2009-06-24 00:06 UTC (History)
0 users

See Also:


Attachments

Description Katy Warr 2009-05-19 09:30:34 UTC
The WS-Enumeration spec uses the xml:lang attribute in order to define the language of the wesn:Reason in the EnumerationEnd message.   The definition of this attribute in the corresponding schema causes my schema editor to fail with "Cannot resolve the name 'xml:lang' to a(n) 'attribute declaration' component."  

This is the offending part of the schema: 

  <xs:complexType name="LanguageSpecificStringType">
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attribute ref="xml:lang" />
        <xs:anyAttribute namespace="##other" processContents="lax" />
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>

I think that the problem may be that xml:lang should be used to define the "language used in the contents and attribute values of any element in an XML document". [1]  This isn't how it's being used in the WS-Enumeration spec as it's being used to define the language of the actual message content (i.e. the wsen:Reason).

Proposal:
--------

Don't use xml:lang to define the Enumeration reason code. 

In the schema, replace:
  <xs:attribute ref="xml:lang" />
with
  <xs:attribute name="lang" type="xs:language" />

and remove the namespace prefix "xml" from the enumeration message.  
So
  <wsen:Reason xml:lang="language identifier" >
      xs:string
  </wsen:Reason> ?
becomes:
  <wsen:Reason lang="language identifier" >
      xs:string
   </wsen:Reason> ?

with the same update to the description, i.e.:
 [Body]/wsen:EnumerationEnd/wsen:Reason
This optional element contains text, in the language specified by the @lang attribute, describing the reason for the unexpected enumeration termination. 

[1] http://www.w3.org/TR/REC-xml/
Comment 1 Robert Freund 2009-05-26 20:42:31 UTC
<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd">
Comment 2 Robert Freund 2009-05-26 20:43:59 UTC
resolve with proposal #1