@@ -66,9 +66,10 @@ export async function initializeNsdoc(): Promise<Nsdoc> {
66
66
function getLNDataDescription ( element : Element ) : { label : string ; } {
67
67
const lnClassAttribute = element . getAttribute ( 'lnClass' ) ! ;
68
68
const lnClass = nsd74 . querySelector ( `NS > LNClasses > LNClass[name="${ lnClassAttribute } "]` ) ;
69
+ const lnClassDescription = getNsdocDocumentation ( nsdoc74 ! , lnClass ?. getAttribute ( 'titleID' ) ) ;
69
70
70
71
return {
71
- label : getNsdocDocumentation ( nsdoc74 ! , lnClass ?. getAttribute ( 'titleID' ) ) ?? lnClassAttribute
72
+ label : lnClassDescription ? lnClassDescription + ' (' + lnClassAttribute + ')' : lnClassAttribute
72
73
} ;
73
74
}
74
75
@@ -96,7 +97,7 @@ export async function initializeNsdoc(): Promise<Nsdoc> {
96
97
function getSDODataDescription ( element : Element ) : { label : string ; } {
97
98
const sdoName = element . getAttribute ( 'name' ) ! ;
98
99
const subDataObject = nsd73 . querySelector ( `CDCs > CDC[name="${ element . parentElement ?. getAttribute ( 'cdc' ) } "] > SubDataObject[name="${ sdoName } "]` ) ;
99
-
100
+
100
101
return {
101
102
label : getNsdocDocumentation ( nsdoc73 ! , subDataObject ?. getAttribute ( 'descID' ) ) ?? sdoName
102
103
} ;
@@ -172,7 +173,7 @@ export async function initializeNsdoc(): Promise<Nsdoc> {
172
173
/**
173
174
* Get the potential inherited data object based on a LNClass base.
174
175
* @param lnClassBase - The base of a LNClass element.
175
- * @param doName - The name of the DO(I) to search for.
176
+ * @param doName - The name of the DO(I) to search for.
176
177
* @returns the DataObject in case found, otherwise null.
177
178
*/
178
179
function getInheritedDataObject ( lnClassBase : string , doName : string ) : Element | null {
@@ -195,7 +196,7 @@ export async function initializeNsdoc(): Promise<Nsdoc> {
195
196
}
196
197
> ] . getDataDescription ( element , ancestors ) ;
197
198
}
198
-
199
+
199
200
}
200
201
}
201
202
@@ -207,4 +208,4 @@ export async function initializeNsdoc(): Promise<Nsdoc> {
207
208
*/
208
209
function getNsdocDocumentation ( nsdoc : XMLDocument , id : string | null | undefined ) : string | null | undefined {
209
210
return nsdoc ?. querySelector ( `NSDoc > Doc[id="${ id ?? '' } "]` ) ?. textContent ;
210
- }
211
+ }
0 commit comments