W3C home > Mailing lists > Public > xmlschema-dev@w3.org > August 2001

Re: what is the replacement for xml:lang in CR version?

From: Dave Carlson <dcarlson@ontogenics.com>
Date: Thu, 9 Aug 2001 12:37:04 -0600
Message-ID: <00ee01c12102$4bfb5be0$0601a8c0@jewel>
To: "xml schema" <xmlschema-dev@w3.org>
Which schema validation tool are you using?  It appears that you are not using a validator that is updated to the final recommendation.  The use attribute with default or fixed was removed from the final spec.
  ----- Original Message ----- 
  From: komal mangtani 
  To: Eddie Robertsson 
  Cc: Simon.Cox@csiro.au ; xml schema 
  Sent: Thursday, August 09, 2001 11:30 AM
  Subject: Re: what is the replacement for xml:lang in CR version?

  when I import www.w3.org/2001/xml.xsd, i get error saying global attribute in xml.xsd should have use with value being default or fixed. 
  Eddie Robertsson wrote: 

    Simon Cox wrote: 

    > xml:lang is /not/ a part of XML Schema, it is part of the XML instance language. 
    > Thus, there is no change resulting from the evolution of the XML Schema specification. 
    > komal mangtani wrote: 
    > > 
    > > I have a schema that conforms to WD version and it has references to xml:lang. 
    > > what is the equivalent in CR? 
    > > 
    > > here is the snippet: 
    > >  <element name = "FreeFormText"> 
    > >   <complexType content = "textOnly"> 
    > >    <attribute name = "xml:lang" type = "string"/> 
    > >   </complexType> 
    > >  </element> 

    This is not the correct way of using it though.... 
    If you want to use the xml:space or xml:lang attributes in your schema you have to declare 
    them by reference and import the XML namespace from W3C. You can't "redeclare" the 
    attributes as in the above schema. 
    So, first you have to import the XML namespace using the import statement like: 

    <xs:import namespace="http://www.w3.org/XML/1998/namespace" 

    You also have to add a namespace declaration on your xs:schema element. Like: 

    <xs:schema ...xmlns:xml="http://www.w3.org/XML/1998/namespace"...>... 

    No, you can reference the attributes defined by this namespace in your own schema using: 

    <xs:attribute ref="xml:lang"/> 

    Hope this helps. 
Received on Thursday, 9 August 2001 14:35:11 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:52 UTC