namespaces [nsIndex].Name = name;
namespaces [nsIndex].Namespace = ns;
namespaces [nsIndex].NextNamespace = nextNs;
+ if (lineInfo != null && lineInfo.HasLineInfo ()) {
+ namespaces [nsIndex].LineNumber = lineInfo.LineNumber;
+ namespaces [nsIndex].LinePosition = lineInfo.LinePosition;
+ }
}
}
}
int IXmlLineInfo.LineNumber {
get {
return currentIsAttr ? attributes [currentAttr].LineNumber :
- nodes [currentNode].LineNumber;
+ currentIsNode ? nodes [currentNode].LineNumber :
+ namespaces [currentNs].LineNumber;
}
}
int IXmlLineInfo.LinePosition {
get {
return currentIsAttr ? attributes [currentAttr].LinePosition :
- nodes [currentNode].LinePosition;
+ currentIsNode ? nodes [currentNode].LinePosition :
+ namespaces [currentNs].LinePosition;
}
}