Re: External parsed entities under SaxonJS

Michael Kay <[email protected]> Fri, 2 Apr 2021 19:38:48 +0100
Newsgroups gmane.text.xml.saxon.help
Message-ID <[email protected]>
It would be nice if they at least supported an internal DTD and internal entities.

And there's no real reason for any restrictions on Node.js, other than the fact that parsing DTDs is a crazy amount of effort in relation to the number of people who actually use them, because of the arcane syntax and the wierd rules surrounding parameter entities.

I've wondered about extending the parser we use on Node.js with an "entitty reference resolver" whereby entity references are resolved by a callback to a user-supplied function -- which I suspect would be far more useful to far more people than putting the expansions in a DTD.

Michael Kay
Saxonica


> On 2 Apr 2021, at 17:09, Eliot Kimber <[email protected]> wrote:
> 
> Given the danger of XXE security exposures I would be very surprised if any in-browser parser supported entity resolution.
> 
> Cheers,
> 
> E.
> 
> --
> Eliot Kimber
> http://contrext.com
> 
> 
> On 4/2/21, 10:02 AM, "Michael Kay" <[email protected]> wrote:
> 
>    If you can find an XML parser for Javascript that processes DTDs, please let us know!
>    Michael Kay
>    Saxonica
> 
> 
>    On 2 Apr 2021, at 14:38, Wendell Piez <[email protected]> wrote:
> 
>    Saxon friends,
>    Under SaxonJS, we are getting error SXJS0006 - (Reference to unknown entity etc.) for an external parsed entity declared in an internal DTD subset in an XML source document.
> 
>    Any advice? Is there a parser setting we can use? (Should I be reading the manual?) This is in order to apply a compiled SEF transformation programmatically to the XML, from inside a Typescript application.
> 
>    Thoughts? Thanks,
>    Wendell
> 
>    -- 
>    ...Wendell Piez... ...wendell -at- nist -dot- gov...
>    ...wendellpiez.com <http://wendellpiez.com>... ...pellucidliterature.org <http://pellucidliterature.org>... ...pausepress.org <http://pausepress.org>...
>    ...github.com/wendellpiez. <http://github.com/wendellpiez.>.. ...gitlab.coko.foundation/wendell... 
> 
> 
>    _______________________________________________
>    saxon-help mailing list archived at http://saxon.markmail.org/
>    [email protected]
>    https://lists.sourceforge.net/lists/listinfo/saxon-help 
> 
> 
> 
> 
> 
>    _______________________________________________
>    saxon-help mailing list archived at http://saxon.markmail.org/
>    [email protected]
>    https://lists.sourceforge.net/lists/listinfo/saxon-help 
> 
> 
> 
> 
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/saxon-help



_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[email protected]
https://lists.sourceforge.net/lists/listinfo/saxon-help