We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 817e0f9 commit a5209a0Copy full SHA for a5209a0
1 file changed
libs/data-mapper-v2/src/mapHandling/XsltParser.ts
@@ -101,11 +101,14 @@ export class XsltParser {
101
}
102
103
// Find the main template
104
- const templates = this.doc.getElementsByTagNameNS('http://www.w3.org/1999/XSL/Transform', 'template');
105
- if (templates.length === 0) {
+ const templatesCollection = this.doc.getElementsByTagNameNS('http://www.w3.org/1999/XSL/Transform', 'template');
+ if (templatesCollection.length === 0) {
106
return { success: false, error: 'No xsl:template found in XSLT', mappings: [] };
107
108
109
+ // Convert HTMLCollection to array for iteration
110
+ const templates = Array.from(templatesCollection);
111
+
112
const mappings: ParsedMapping[] = [];
113
let targetRoot: string | undefined;
114
0 commit comments