Mercurial > repos > IBBoard
changeset 35:2b5e73cb83a3
Re #21 - Reduce specificity of translations file
* Add minOccurs="0" to XSD
* Remove check for zero translations returned
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Tue, 19 May 2009 19:35:34 +0000 |
parents | d597feec5dd4 |
children | c949727ec0e0 |
files | Lang/Translation.cs dtds/translation.xsd |
diffstat | 2 files changed, 2 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/Lang/Translation.cs Tue May 19 14:24:00 2009 +0000 +++ b/Lang/Translation.cs Tue May 19 19:35:34 2009 +0000 @@ -149,13 +149,7 @@ { try { - XmlNodeList translations = doc.GetElementsByTagName("translation"); - - if (translations.Count==0) - { - throw new InvalidFileException("No translations found in "+GetLanguageOfDocument(doc)+".translation"); - } - + XmlNodeList translations = doc.GetElementsByTagName("translation"); Dictionary<string, string> tempTranslationTable = new Dictionary<string,string>(); foreach (XmlNode node in translations)
--- a/dtds/translation.xsd Tue May 19 14:24:00 2009 +0000 +++ b/dtds/translation.xsd Tue May 19 19:35:34 2009 +0000 @@ -10,7 +10,7 @@ <xs:element name="translations"> <xs:complexType> <xs:sequence> - <xs:element name="translation" maxOccurs="unbounded" type="translationtype"/> + <xs:element name="translation" minOccurs="0" maxOccurs="unbounded" type="translationtype"/> </xs:sequence> <xs:attribute name="lang" type="xs:string" use="required"/> </xs:complexType>