Open rrthomas opened 1 year ago
Hey @rrthomas, thanks for reporting! I've in the past struggled with the idea of namespaces a bit so it's quite likely I made an error. I'll look into this soon as I can, but maybe you want to unblock yourself sooner than that.
1.4.1
I've mostly ~improved~ messed with typing, dependencies, and position tracking. If you're not a big user of position tracking, hopefully you can stick it out on 1.4.1 for a bit more.parseXmlDocument
function that slimdom
exports itself since a few versions. If you're not a user of slimdom-sax-parsers
's position tracking or async API at all here is an opportunity to reduce your dependency tree :)I'll update this ticket again when I make any progress. Thanks again for reporting!
Thanks for your suggestions. Unfortunately I want to parse fragments with the additionalNamespaces
option, so slimdom
's parseXmlDocument
doesn't work for me, but it was a good suggestion. I don't use position tracking at all, so I am happy to stick with 1.4.1 for now.
I've not made any progress on this yet, and having become a dad recently I don't anticipate that I'll get to it pretty soon either. Unfortunately this issue will need to remain unsolved for a while, unless somebody else picks it up :) Sorry!
I've managed to use slimdom's (new?) parseFragment
method now. But I guess this bug should remain open.
In TypeScript 4.9.3, with
slimdox-sax-parser
1.4.1 andslimdom
2.3.2, if I try this MWE:it builds fine.
If I use
slimdom-sax-parser
>= 1.5.0, with any version ofslimdom
>= 2.3.2, then I get an error like this:I tried fixing
slimdom
to the 3.0.1, the same version as used byslimdom-sax-parser
1.5.3, but I get the same error.If on the other hand I import
slimdom
fromslimdom-sax-parser
, as shown in theslimdom-sax-parser
docs, so that the second twoimport
statements in the code above are replaced with the single statement:then I get this error instead:
So, I cannot work out how I am supposed to access the
slimdom
types from TypeScript withslimdom-sax-parser
>= 1.5.0.Thanks for
slimdom-sax-parser
!