if (elementValue != null) {
xmlStreamWriter.writeStartElement("element");
xmlStreamWriter.writeAttribute("language", elementValue.getLanguage());
xmlStreamWriter.writeCharacters(elementValue.name());
xmlStreamWriter.writeEndElement(); // element
SourceProvider sourceProvider = elementValue.getSourceProvider();
stringValue = sourceProvider.getName(descriptor);
FileDescriptor sourceFile = sourceProvider.getSourceFile(descriptor);
Integer lineNumber = sourceProvider.getLineNumber(descriptor);
if (sourceFile != null) {
xmlStreamWriter.writeStartElement("source");
xmlStreamWriter.writeAttribute("name", sourceFile.getFileName());
if (lineNumber != null) {
xmlStreamWriter.writeAttribute("line", lineNumber.toString());