From: Oleg T. <he...@us...> - 2004-10-14 14:18:05
|
Update of /cvsroot/mvp-xml/XInclude/v1/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30257/v1/src Modified Files: TextIncludingReader.cs XIncludeKeywords.cs XIncludingReaderState.cs Log Message: Support for xml:lang Index: TextIncludingReader.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/src/TextIncludingReader.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- TextIncludingReader.cs 14 Oct 2004 13:47:07 -0000 1.3 +++ TextIncludingReader.cs 14 Oct 2004 14:17:55 -0000 1.4 @@ -225,7 +225,8 @@ enc = Encoding.GetEncoding(_encoding); } catch (Exception e) { - throw new ResourceException(SR.GetString("NotSupportedEncoding", _encoding), e); + throw new ResourceException(SR.GetString("NotSupportedEncoding", + _encoding), e); } reader = new StreamReader(stream, enc); } @@ -237,7 +238,8 @@ } catch (ResourceException re) { throw re; } catch (OutOfMemoryException oome) { - //Crazy include - memory is out - what about reading by chunks? + //Crazy include - memory is out + //TODO: what about reading by chunks? throw new ResourceException(SR.GetString("OutOfMemoryWhileFetchingResource", _href), oome); } catch (IOException ioe) { throw new ResourceException(SR.GetString("IOErrorWhileFetchingResource", _href), ioe); Index: XIncludingReaderState.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/src/XIncludingReaderState.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- XIncludingReaderState.cs 29 Sep 2004 21:26:28 -0000 1.2 +++ XIncludingReaderState.cs 14 Oct 2004 14:17:55 -0000 1.3 @@ -10,6 +10,10 @@ //xml:base attribute is being exposed ExposingXmlBaseAttr, //xml:base attribute value is being exposed - ExposingXmlBaseAttrValue + ExposingXmlBaseAttrValue, + //xml:lang attribute is being exposed + ExposingXmlLangAttr, + //xml:lang attribute value is being exposed + ExposingXmlLangAttrValue } } Index: XIncludeKeywords.cs =================================================================== RCS file: /cvsroot/mvp-xml/XInclude/v1/src/XIncludeKeywords.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- XIncludeKeywords.cs 29 Sep 2004 21:26:28 -0000 1.2 +++ XIncludeKeywords.cs 14 Oct 2004 14:17:55 -0000 1.3 @@ -48,6 +48,8 @@ private const string s_XmlNamespace = "http://www.w3.org/XML/1998/namespace"; private const string s_Base = "base"; private const string s_XmlBase = "xml:base"; + private const string s_Lang = "lang"; + private const string s_XmlLang = "xml:lang"; #endregion @@ -72,6 +74,8 @@ private string _XmlNamespace; private string _Base; private string _XmlBase; + private string _Lang; + private string _XmlLang; #endregion @@ -194,6 +198,28 @@ } } + // Lang + public string Lang + { + get + { + if (_Lang == null) + _Lang = nameTable.Add(s_Lang); + return _Lang; + } + } + + // xml:lang + public string XmlLang + { + get + { + if (_XmlLang == null) + _XmlLang = nameTable.Add(s_XmlLang); + return _XmlLang; + } + } + #endregion #region public methods |