File: RdfXmlReader.cs

package info (click to toggle)
semweb 1.05%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 4,044 kB
  • ctags: 2,874
  • sloc: cs: 14,484; makefile: 163; perl: 20; sh: 11; ansic: 7
file content (638 lines) | stat: -rw-r--r-- 23,374 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
using System;
using System.Collections;
using System.IO;
using System.Text;
using System.Xml;

using SemWeb.Util;

namespace SemWeb {
	public class RdfXmlReader : RdfReader {
		// TODO: Make some of the errors warnings.
	
		XmlReader xml;
		
		Hashtable blankNodes = new Hashtable();
		UriMap namedNodes = new UriMap();
		Hashtable seenIDs = new Hashtable();
		
		StatementSink storage;
		
		static readonly Entity
			rdfType = "http://www.w3.org/1999/02/22-rdf-syntax-ns#type",
			rdfFirst = "http://www.w3.org/1999/02/22-rdf-syntax-ns#first",
			rdfRest = "http://www.w3.org/1999/02/22-rdf-syntax-ns#rest",
			rdfNil = "http://www.w3.org/1999/02/22-rdf-syntax-ns#nil",
			rdfSubject = "http://www.w3.org/1999/02/22-rdf-syntax-ns#subject",
			rdfPredicate = "http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate",
			rdfObject = "http://www.w3.org/1999/02/22-rdf-syntax-ns#object",
			rdfStatement = "http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement";
		
		#if !SILVERLIGHT
		public RdfXmlReader(XmlDocument document) {
			xml = new XmlBaseAwareReader(new XmlNodeReader(document));
			LoadNamespaces();
		}
		#endif
		
		public RdfXmlReader(XmlReader document) {
			XmlValidatingReader reader = new XmlValidatingReader(document); // decodes entity definitions
			reader.ValidationType = ValidationType.None;
			xml = new XmlBaseAwareReader(reader);
			LoadNamespaces();
		}
		
		public RdfXmlReader(TextReader document) : this(new XmlTextReader(document)) {
		}

		public RdfXmlReader(Stream document) : this(new StreamReader(document)) {
		}

		public RdfXmlReader(TextReader document, string baseUri) : this(document) {
			BaseUri = baseUri;
		}

		public RdfXmlReader(Stream document, string baseUri) : this(new StreamReader(document), baseUri) {
		}

		public RdfXmlReader(string file, string baseUri) : this(GetReader(file), baseUri) {
		}

		public RdfXmlReader(string file) : this(GetReader(file), "file:///" + file) {
		}
		
		private void LoadNamespaces() {
			// Move to the document element and load any namespace
			// declarations on the node.

			while (xml.Read()) {
				if (xml.NodeType != XmlNodeType.Element) continue;

				if (xml.MoveToFirstAttribute()) {
					do {
						if (xml.Prefix == "xmlns")
							Namespaces.AddNamespace(xml.Value, xml.LocalName);
					} while (xml.MoveToNextAttribute());
					xml.MoveToElement();
				}
				break;
			}
		}

		public override void Select(StatementSink storage) {
			// Read past the processing instructions to
			// the document element.  If it is rdf:RDF,
			// then process the description nodes within it.
			// Otherwise, the document element is itself a
			// description.
			
			this.storage = storage;

			bool first = true; // on the first iteration don't
											   // advance to the next node -- we already did that
			while (first || xml.Read()) {
				first = false;

				if (xml.NodeType != XmlNodeType.Element) continue;
				
				if (xml.NamespaceURI == NS.RDF && xml.LocalName == "RDF" ) {
					// If there is an xml:base here, set BaseUri so
					// the application can recover it.  It doesn't
					// affect parsing since the xml:base attribute
					// will override BaseUri.
					string xmlbase = xml.GetAttribute("xml:base");
					if (xmlbase != null) BaseUri = xmlbase;
					
					while (xml.Read()) {
						if (xml.NodeType == XmlNodeType.Element)
							ParseDescription();
					}
					
				} else {
					ParseDescription();
				
				}
				break;
			}

			xml.Close();
		}
		
		private string CurNode() {
			if (xml.NamespaceURI == "")
				OnWarning("Element node must be qualified (" + xml.Name + ")");
			if (xml.Prefix != "")
				Namespaces.AddNamespace(xml.NamespaceURI, xml.Prefix);

			// This probably isn't quite right, but compensates
			// for a corresponding hash issue in XmlWriter.
			if (xml.NamespaceURI == "" && BaseUri == null)
				return "#" + xml.LocalName;

			return CheckUri(xml.NamespaceURI + xml.LocalName);
		}
		
		private string CheckUri(string uri) {
			string error = Entity.ValidateUri(uri);
			if (error != null)
				OnWarning("The URI <" + uri + "> is not valid: " + error);
			return uri;
		}
		
		private int isset(string attribute) {
			return attribute != null ? 1 : 0;
		}
		
		private string Unrelativize(string uri) {
			return CheckUri(GetAbsoluteUri(xml.BaseURI != "" ? xml.BaseURI : BaseUri, uri));
		}
		
		private Entity GetBlankNode(string nodeID) {
			if (blankNodes.ContainsKey(nodeID))
				return (Entity)blankNodes[nodeID];
			
			Entity entity = new BNode(nodeID);
			blankNodes[nodeID] = entity;

			return entity;
		}
		
		private Entity GetNamedNode(string uri) {
			if (!ReuseEntities)
				return new Entity(uri);
		
			Entity ret = (Entity)namedNodes[uri];
			if (ret != null) return ret;
			ret = new Entity(uri);
			namedNodes[uri] = ret;
			return ret;
		}
		
		private Entity ParseDescription() {
			// The XmlReader is positioned on an element node
			// that is a description of an entity.
			// On returning, the reader is positioned after the
			// end element of the description node.
			
			string nodeID = xml.GetAttribute("nodeID", NS.RDF);
			string about = xml.GetAttribute("about", NS.RDF);
			string ID = xml.GetAttribute("ID", NS.RDF);
			if (isset(nodeID) + isset(about) + isset(ID) > 1)
				OnError("An entity description cannot specify more than one of rdf:nodeID, rdf:about, and rdf:ID");

			if (nodeID != null && !IsValidXmlName(nodeID))
				OnWarning("'" + nodeID + "' is not a valid XML Name");
			if (ID != null && !IsValidXmlName(ID))
				OnWarning("'" + ID + "' is not a valid XML Name");
				
			Entity entity;
			
			if (about != null)
				entity = GetNamedNode(Unrelativize(about));
			else if (ID != null) {
				entity = GetNamedNode(Unrelativize("#" + ID));
				
				if (seenIDs.ContainsKey(entity.Uri))
					OnWarning("Two descriptions should not use the same rdf:ID: <" + entity.Uri + ">");
				seenIDs[entity.Uri] = seenIDs;
			} else if (nodeID != null)
				entity = GetBlankNode(nodeID);
			else
				entity = new BNode();
			
			// If the name of the element is not rdf:Description,
			// then the name gives its type.
			string curnode = CurNode();
			if (curnode != NS.RDF + "Description") {
				if (IsRestrictedName(curnode) || IsDeprecatedName(curnode))
					OnError(xml.Name + " cannot be the type of a resource.");
				if (curnode == NS.RDF + "li") OnError("rdf:li cannot be the type of a resource");
				storage.Add(new Statement(entity, rdfType, (Entity)curnode, Meta));
			}
			
			ParsePropertyAttributes(entity);
			ParsePropertyNodes(entity);
			
			return entity;
		}
		
		private bool ParsePropertyAttributes(Entity entity) {
			bool foundAttrs = false;
			
			if (!xml.MoveToFirstAttribute()) return false;
			do {
				// Propery attributes in the default namespace
				// should be ignored.
				if (xml.NamespaceURI == "")
					continue;
			
				string curnode = CurNode();
				
				// rdf:type is interpreted with an entity object,
				// not a literal object.
				if (curnode == NS.RDF + "type") {
					storage.Add(new Statement(entity, rdfType, (Entity)xml.Value, Meta));
					foundAttrs = true;
					continue;
				}
				
				// Properties which are not recognized as property
				// attributes and should be ignored.
				if (IsRestrictedName(curnode))
					continue;
				if (IsDeprecatedName(curnode))
					OnError(xml.Name + " is deprecated.");
				
				// Properties which are invalid as attributes.
				if (curnode == NS.RDF + "li")
					OnError("rdf:li is not a valid attribute");
				if (curnode == NS.RDF + "aboutEach" || curnode == NS.RDF + "aboutEachPrefix")
					OnError("rdf:aboutEach has been removed from the RDF spec");
				
				// Unrecognized attributes in the xml namespace should be ignored.
				if (xml.Prefix == "xml") continue;
				if (xml.Prefix == "xmlns") continue;
				if (curnode == "http://www.w3.org/2000/xmlns/xmlns") continue;
				
				// This is a literal property attribute.
				string lang = xml.XmlLang != "" ? xml.XmlLang : null;
				storage.Add(new Statement(entity, curnode,
					new Literal(xml.Value, lang, null), Meta));
				Namespaces.AddNamespace(xml.NamespaceURI, xml.Prefix);
				foundAttrs = true;
					
			} while (xml.MoveToNextAttribute());
			
			xml.MoveToElement();
			
			return foundAttrs;
		}
		
		private void ParsePropertyNodes(Entity subject) {
			// The reader is positioned within a description node.
			// On returning, the reader is positioned after the
			// end element of the description node.
			
			if (xml.IsEmptyElement) return;
			
			int liIndex = 1;
			
			while (xml.Read()) {
				if (xml.NodeType == XmlNodeType.EndElement)
					break;

				if (xml.NodeType == XmlNodeType.Text) {
					OnWarning("Text \"" + xml.Value + "\" ignored in description node");
					continue;
				}

				if (xml.NodeType != XmlNodeType.Element)
					continue;
				
				ParseProperty(subject, ref liIndex);
			}
		}
		
		private void ParseProperty(Entity subject, ref int liIndex) {
			// The reader is positioned on a propert node,
			// and on returning the reader is positioned past
			// that node.
			
			// Get all of the attributes before we move the reader forward.
			
			string nodeID = xml.GetAttribute("nodeID", NS.RDF);
			string resource = xml.GetAttribute("resource", NS.RDF);
			
			string parseType = xml.GetAttribute("parseType", NS.RDF);
			string datatype = xml.GetAttribute("datatype", NS.RDF);
			
			string lang = xml.XmlLang != "" ? xml.XmlLang : null;

			string predicate = CurNode();
			if (predicate == NS.RDF + "li")
				predicate = NS.RDF + "_" + (liIndex++);

			if (IsRestrictedName(predicate))
				OnError(xml.Name + " cannot be used as a property name.");
			if (IsDeprecatedName(predicate))
				OnError(xml.Name + " has been deprecated and cannot be used as a property name.");

			string ID = xml.GetAttribute("ID", NS.RDF);

			if (nodeID != null && !IsValidXmlName(nodeID))
				OnWarning("'" + nodeID + "' is not a valid XML Name");
			if (ID != null && !IsValidXmlName(ID))
				OnWarning("'" + ID + "' is not a valid XML Name");
				
			Resource objct = null;
			if (nodeID != null || resource != null) {
				if (isset(nodeID) + isset(resource) > 1)
					OnError("A predicate node cannot specify more than one of rdf:nodeID and rdf:resource");
					
				if (parseType != null || datatype != null)
					OnError("The attributes rdf:parseType and rdf:datatype are not valid on a predicate with a rdf:nodeID or rdf:resource attribute");
					
				// Object is an entity given by nodeID or resource.
				if (nodeID != null)
					objct = GetBlankNode(nodeID);
				else if (resource != null)
					objct = GetNamedNode(Unrelativize(resource));
					
				ParsePropertyAttributes((Entity)objct);
				
				// No children are allowed in this element.
				if (!xml.IsEmptyElement)
				while (xml.Read()) {
					if (xml.NodeType == XmlNodeType.EndElement) break;
					if (xml.NodeType == XmlNodeType.Whitespace) continue;
					if (xml.NodeType == XmlNodeType.Comment) continue;
					if (xml.NodeType == XmlNodeType.ProcessingInstruction) continue;
					OnError("Content is not allowed within a property with a rdf:nodeID or rdf:resource attribute");
				}
			
			} else if (parseType != null && parseType == "Literal") {
				if (datatype != null)
					OnError("The attribute rdf:datatype is not valid on a predicate whose parseType is Literal.");

				datatype = "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral";
				
				if (ParsePropertyAttributes(new BNode()))
					OnError("Property attributes are not valid when parseType is Literal");

				// TODO: Do we canonicalize according to:
				// http://www.w3.org/TR/2002/REC-xml-exc-c14n-20020718/ ?
				
				objct = new Literal(xml.ReadInnerXml(), null, datatype);

			} else if (parseType != null && parseType == "Resource") {
				objct = new BNode();
				
				ParsePropertyAttributes((Entity)objct);
				if (!xml.IsEmptyElement)
					ParsePropertyNodes((Entity)objct);
				
			} else if (parseType != null && parseType == "Collection") {
				Entity collection = new BNode();
				Entity lastnode = collection;
				bool empty = true;
				
				ParsePropertyAttributes(collection);
				
				if (!xml.IsEmptyElement)
				while (xml.Read()) {
					if (xml.NodeType == XmlNodeType.EndElement) break;
					if (xml.NodeType != XmlNodeType.Element) continue;
					
					if (!empty) {
						Entity next = new BNode();
						storage.Add(new Statement(lastnode, rdfRest, next, Meta));
						lastnode = next;
					}
					
					Entity item = ParseDescription();
					storage.Add(new Statement(lastnode, rdfFirst, item, Meta));
					
					empty = false;
				}

				storage.Add(new Statement(lastnode, rdfRest, rdfNil, Meta));
				
				if (empty)
					objct = rdfNil;
				else
					objct = collection;
					
			} else if (parseType != null) {
				OnError("Invalid value for parseType: '" + parseType + "'");
				
			} else if (datatype != null) {
				// Note that any xml:lang is discarded.
				
				if (ParsePropertyAttributes(new BNode()))
					OnError("Property attributes are not valid when a datatype is given");
					
				if (xml.IsEmptyElement) {
					objct = new Literal("", null, datatype);
				} else {
					objct = new Literal(xml.ReadString(), null, datatype);
					if (xml.NodeType != XmlNodeType.EndElement)
						OnError("XML markup may not appear in a datatyped literal property.");
				}
			
			} else {
				// We don't know whether the contents of this element
				// refer to a literal or an entity.  If an element is
				// a child of this node, then it must be an entity.
				// If the property has predicate attributes, then it
				// is an anonymous entity.  Otherwise the text content
				// is the literal value.
				
				objct = new BNode();
				if (ParsePropertyAttributes((Entity)objct)) {
					// Found property attributes.  There should be no other internal content?
					
					if (!xml.IsEmptyElement)
					while (xml.Read()) {
						if (xml.NodeType == XmlNodeType.EndElement) break;
						if (xml.NodeType == XmlNodeType.Whitespace) continue;
						if (xml.NodeType == XmlNodeType.Comment) continue;
						if (xml.NodeType == XmlNodeType.ProcessingInstruction) continue;
						OnError(xml.NodeType + " is not allowed within a property with property attributes");
					}
					
				} else {
					StringBuilder textcontent = new StringBuilder();
					bool hadText = false;
					bool hadElement = false;
					
					if (!xml.IsEmptyElement)
					while (xml.Read()) {
						if (xml.NodeType == XmlNodeType.EndElement) break;
						if (xml.NodeType == XmlNodeType.Element) {
							if (hadText)
								OnError("Both text and elements are present as a property value");
							if (hadElement)
								OnError("A property node cannot contain more than one entity description.  " + objct + " already found.");
							
							hadElement = true;
							
							objct = ParseDescription();
							
						} else if (xml.NodeType == XmlNodeType.Text || xml.NodeType == XmlNodeType.SignificantWhitespace) {
							if (hadElement)
								OnError("Both text and elements are present as a property value");
							textcontent.Append(xml.Value);
							hadText = true;
						} else {
							textcontent.Append(xml.Value);
						}
					}
					
					if (!hadElement)
						objct = new Literal(textcontent.ToString(), lang, null);
				}
			}
				
			storage.Add(new Statement(subject, predicate, objct, Meta));
			
			if (ID != null) {
				// In addition to adding the statement as normal, also
				// add a reified statement.
				Entity statement = GetNamedNode(Unrelativize("#" + ID));;
				storage.Add(new Statement(statement, rdfType, rdfStatement, Meta));
				storage.Add(new Statement(statement, rdfSubject, subject, Meta));
				storage.Add(new Statement(statement, rdfPredicate, (Entity)predicate, Meta));
				storage.Add(new Statement(statement, rdfObject, objct, Meta));
			}
		}
		
		private bool IsRestrictedName(string name) {
			if (name == NS.RDF + "RDF") return true;
			if (name == NS.RDF + "Description") return true;
			if (name == NS.RDF + "ID") return true;
			if (name == NS.RDF + "about") return true;
			if (name == NS.RDF + "parseType") return true;
			if (name == NS.RDF + "resource") return true;
			if (name == NS.RDF + "nodeID") return true;
			if (name == NS.RDF + "datatype") return true;
			return false;
		}
		
		private bool IsDeprecatedName(string name) {
			if (name == NS.RDF + "bagID") return true;
			if (name == NS.RDF + "aboutEach") return true;
			if (name == NS.RDF + "aboutEachPrefix") return true;
			return false;
		}

		private bool IsValidXmlName(string name) {
			// I'm not sure what's supposed to be valid, but this is just for warnings anyway.
			// CombiningChar and Extender characters are omitted.
			if (name.Length == 0) return false;
			char f = name[0];
			if (!char.IsLetter(f) && f != '_') return false;
			for (int i = 1; i < name.Length; i++) {
				f = name[i];
				if (!char.IsLetter(f) && !char.IsDigit(f) && f != '.' && f != '-' && f != '_')
					return false;
			}
			return true;
		}
		
		private void OnError(string message) {
			if (xml is IXmlLineInfo && ((IXmlLineInfo)xml).HasLineInfo()) {
				IXmlLineInfo line = (IXmlLineInfo)xml;
				message += ", line " + line.LineNumber + " col " + line.LinePosition;
			}
			throw new ParserException(message);
		}

		private new void OnWarning(string message) {
			if (xml is IXmlLineInfo && ((IXmlLineInfo)xml).HasLineInfo()) {
				IXmlLineInfo line = (IXmlLineInfo)xml;
				message += ", line " + line.LineNumber + " col " + line.LinePosition;
			}
			base.OnWarning(message);
		}
		
		private class XmlBaseAwareReader : XmlReader {
			XmlReader _reader;
			Stack _bases = new Stack();
		    Uri _baseUri;
		    bool temp = false;
		    XmlResolver resolver = new XmlUrlResolver();

		    public XmlBaseAwareReader(XmlReader reader) {
		    	_reader = reader;
	        	if (_reader.BaseURI != "")
	        		_baseUri = new Uri(_reader.BaseURI);
		    }

		    public override string BaseURI {
		        get { return _baseUri == null ? "" : _baseUri.AbsoluteUri; }
		    }

		    public override bool Read()
		    {        
		        if (!_reader.Read()) return false;
		        
		        if (temp) { // last element was an empty element
		        	_baseUri = (Uri)_bases.Pop();
		        	temp = false;
		        }

				if (_reader.NodeType == XmlNodeType.EndElement)
					_baseUri = (Uri)_bases.Pop();
		        
		        if (_reader.NodeType == XmlNodeType.Element) {
		            string baseAttr = _reader.GetAttribute("xml:base");
		            if (_reader.IsEmptyElement && baseAttr == null) {
		            	// do nothing : there is no EndElement, so no pop
		            } else {
		            	_bases.Push(_baseUri); // even if no change, there will be a pop
			            if (baseAttr != null)
	            			_baseUri = resolver.ResolveUri(_baseUri, baseAttr);
		            		
		            	// if this is an empty element, there is no EndElement,
		            	// so we must do a pop before processing the next node.
		            	temp = _reader.IsEmptyElement;
			    	}
		    	}
		        return true;            
		    }

			public override void Close () { _reader.Close(); }
			public override string GetAttribute (int i) { return _reader.GetAttribute(i); }
			public override string GetAttribute (string name) { return _reader.GetAttribute(name); }
			public override string GetAttribute (string localName, string namespaceName) { return _reader.GetAttribute(localName, namespaceName); }
			public override bool IsStartElement () { return _reader.IsStartElement(); }
			public override bool IsStartElement (string name) { return _reader.IsStartElement(name); }
			public override bool IsStartElement (string localName, string namespaceName) { return _reader.IsStartElement(localName, namespaceName); }
			public override string LookupNamespace (string prefix) { return _reader.LookupNamespace(prefix); }
			public override void MoveToAttribute (int i) { _reader.MoveToAttribute(i); }
			public override bool MoveToAttribute (string name) { return _reader.MoveToAttribute(name); }
			public override bool MoveToAttribute (string localName, string namespaceName) { return _reader.MoveToAttribute(localName, namespaceName); }
			public override XmlNodeType MoveToContent () { return _reader.MoveToContent(); }
			public override bool MoveToElement () { return _reader.MoveToElement(); }
			public override bool MoveToFirstAttribute () { return _reader.MoveToFirstAttribute(); }
			public override bool MoveToNextAttribute () { return _reader.MoveToNextAttribute(); }
			public override bool ReadAttributeValue () { return _reader.ReadAttributeValue(); }
			public override string ReadElementString () { return _reader.ReadElementString(); }
			public override string ReadElementString (string name) { return _reader.ReadElementString(name); }
			public override string ReadElementString (string localName, string namespaceName) { return _reader.ReadElementString(localName, namespaceName); }
			public override void ReadEndElement () { _reader.ReadEndElement(); }
			public override string ReadInnerXml () { return _reader.ReadInnerXml(); }
			public override string ReadOuterXml () { return _reader.ReadOuterXml(); }
			public override void ReadStartElement () { _reader.ReadStartElement(); }
			public override void ReadStartElement (string name) { _reader.ReadStartElement(name); }
			public override void ReadStartElement (string localName, string namespaceName) { _reader.ReadStartElement(localName, namespaceName); }
			public override string ReadString () { return _reader.ReadString(); }
			public override void ResolveEntity () { _reader.ResolveEntity(); }
			public override void Skip () { _reader.Skip(); }
			
			public override int AttributeCount { get { return _reader.AttributeCount; } }
			public override bool CanResolveEntity { get { return _reader.CanResolveEntity; } }
			public override int Depth { get { return _reader.Depth; } }
			public override bool EOF { get { return _reader.EOF; } }
			public override bool HasAttributes { get { return _reader.HasAttributes; } }
			public override bool HasValue { get { return _reader.HasValue; } }
			public override bool IsDefault { get { return _reader.IsDefault; } }
			public override bool IsEmptyElement { get { return _reader.IsEmptyElement; } }
			public override string this [int i] { get { return _reader[i]; } }
			public override string this [string name] { get { return _reader[name]; } }
			public override string this [string localName, string namespaceName] { get { return _reader[localName, namespaceName]; } }
			public override string LocalName { get { return _reader.LocalName; } }
			public override string Name { get { return _reader.Name; } }
			public override string NamespaceURI { get { return _reader.NamespaceURI; } }
			public override XmlNameTable NameTable { get { return _reader.NameTable; } }
			public override XmlNodeType NodeType { get { return _reader.NodeType; } }
			public override string Prefix { get { return _reader.Prefix; } }
			public override char QuoteChar { get { return _reader.QuoteChar; } }
			public override ReadState ReadState { get { return _reader.ReadState; } }
			public override string Value { get { return _reader.Value; } }
			public override string XmlLang { get { return _reader.XmlLang; } }
			public override XmlSpace XmlSpace { get { return _reader.XmlSpace; } }
		}		
	}
}