# xml:lang attribute optional for cs:locale in CSL styles

**URL:** <https://discourse.citationstyles.org/t/xml-lang-attribute-optional-for-cs-locale-in-csl-styles/742>\
**Category:** CSL Development\
**Created:** [August 23, 2009, 8:36pm UTC](https://discourse.citationstyles.org/t/xml-lang-attribute-optional-for-cs-locale-in-csl-styles/742 "2009-08-23T20:36:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rintze\_Zelle1](https://avatars.discourse-cdn.com/v4/letter/r/258eb7/32.png) [@Rintze\_Zelle1](https://discourse.citationstyles.org/u/Rintze_Zelle1)\
**Post date:** [August 23, 2009, 8:36pm UTC](https://discourse.citationstyles.org/t/xml-lang-attribute-optional-for-cs-locale-in-csl-styles/742/1 "2009-08-23T20:36:45Z")

</div>

I am a bit surprised that the xml:lang attribute is optional for cs:locale  
in CSL styles. The annotation says:

## Where localization is other than that of the style, use the

## xml:lang attribute.

attribute xml:lang { xsd:language }?

Wouldn’t it be clearer to just require xml:lang? If we decide to leave it  
optional, what is the fall-back locale? The one specified in default-locale,  
or, when that is absent, the provided (application)-locale?

Rintze

---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [August 23, 2009, 9:09pm UTC](https://discourse.citationstyles.org/t/xml-lang-attribute-optional-for-cs-locale-in-csl-styles/742/2 "2009-08-23T21:09:35Z")

</div>

> I am a bit surprised that the xml:lang attribute is optional for cs:locale  
> in CSL styles. The annotation says:
> 
> ## Where localization is other than that of the style, use the
> 
> ## xml:lang attribute.
> 
> attribute xml:lang { xsd:language }?
> 
> Wouldn’t it be clearer to just require xml:lang? If we decide to leave it  
> optional, what is the fall-back locale? The one specified in default-locale,  
> or, when that is absent, the provided (application)-locale?

Agree that it would be more clear to require xml:lang on locale nodes  
inside the style file. It’s not obvious what the default would be.

---

<div class="post-metadata">

**Author:** ![Bruce\_D\_Arcus1](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Bruce\_D\_Arcus1](https://discourse.citationstyles.org/u/Bruce_D_Arcus1)\
**Post date:** [August 25, 2009, 12:56pm UTC](https://discourse.citationstyles.org/t/xml-lang-attribute-optional-for-cs-locale-in-csl-styles/742/3 "2009-08-25T12:56:50Z")

</div>

I think this is thinking of the case of it’s inclusion in the style.  
If we’re getting rid of xml:lang on the root, then this potential  
redundancy goes away. So I’m fine requiring it.

Bruce
