W3C home > Mailing lists > Public > xmlschema-dev@w3.org > September 2008

Re: xml:lang vs xs:language

From: G. Ken Holman <gkholman@CraneSoftwrights.com>
Date: Sat, 20 Sep 2008 22:56:04 -0700
Message-Id: <7.0.1.0.2.20080920225058.02612528@CraneSoftwrights.com>
To: xmlschema-dev@w3.org

At 2008-09-19 12:54 -0700, Kondapally Kumar wrote:
>We are having a discussion on whether to use "xml:lang" as an 
>attribute on a new element that we are defining in our xsd or 
>whether to make a new element with type "xs:language".
>
>For e.g (not syntactically correct but just to give you an idea)
>
><Newelement attribute xml:lang> </Newelement>
>
>OR
>
><Newelement >
><have another sub element with xs:language type>
></Newelement>
>
>Is there any guidance on which one to use?

The syntax and semantics of xml:lang is specified in the XML specification:

   http://www.w3.org/TR/2006/REC-xml-20060816/#sec-lang-tag

If you use xml:lang then other tools that are familiar with the 
syntax and semantics can access it, such as the lang() function in XPath.

I hope this helps.

. . . . . . . . . . . . Ken


--
Upcoming XSLT/XSL-FO hands-on courses:      Wellington, NZ 2009-01
Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video
G. Ken Holman                 mailto:gkholman@CraneSoftwrights.com
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/x/
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/x/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal
Received on Sunday, 21 September 2008 06:26:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:15:07 GMT