Re: External parsed entities under SaxonJS
Wendell Piez <[email protected]> Fri, 2 Apr 2021 18:03:19 -0400
| Newsgroups | gmane.text.xml.saxon.help |
|---|---|
| Message-ID | <CAAO_-xwaSAkrL0_krkCJJDuZg_GLzW8DizKw66LjHdzzMwg1qw@mail.gmail.com> |
Mike, It's funny you should say that, since our development lead was just thinking aloud to me that something like that is what would be called for. And what you are suggesting would not be at all the crazy work that DTD parsing would entail. Personally I could probably live without parsed entities, but it's not an easy call by any means. As Eliot knows better than I, external parsed (and unparsed) entities were certainly a feature relied on heavily by *some systems* at *some point in time* and arguably the support for them in XML eased the transition onto today's web. This is not an argument for relying on them today, and history aside, parsed entity resolution to say nothing of full DTD support (default attributes and the rest) seem to be nice-to-haves not essential at least for this stack (intended to be so web-friendly). What I am really more concerned about, frankly, is not this but rather the performance 'under load' when transformations bundle pipelines of transformations, and in which many calls to the document() function or the moral equivalent (xsl:import and the rest) must be made to assemble resources. Ingeniously, SaxonJS permits us to pass in a nominal base URI for both XSLT and XML source, so I am hopeful. (We are not the only ones with this use case.) If all that holds together -- well, parsed entity expansion is not more than a piece of cheese at the end of the meal. (Or the beginning, I guess.) Not that I am opposed to that! Cheers, Wendell On Fri, Apr 2, 2021 at 2:56 PM Michael Kay <[email protected]> wrote: > 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 <ekimber-xb9TSTQ6enFWk0Htik3J/[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 -- ...Wendell Piez... ...wendell -at- nist -dot- gov... ...wendellpiez.com... ...pellucidliterature.org... ...pausepress.org... ...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