You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since 373dcc8 we duplicate the xml document which contains the stylesheet. For the most common use case, namely that where the xml document is used as a stylesheet and nothing else, this means avoidable overhead. It would be better to combine parsing the stylesheet document and constructing a stylesheet object into a single step, so that we don't have to wrap the xml document for use by node.
Coding this should be reasonably easy, once we have decided what API to expose for this.
The current API should probably remain in place. Should we re-use the same function, and perform some case distinction based on the type of the argument? Interpret it as a document to be parsed if it's a Buffer, and as an already parsed XML document if it's any other object? Should we do an instanceof Document check, or some ducktyping heuristics, to verify it's an XML document?
How about string as input? Should we convert that to a buffer, or interpret it as a file name? Both approaches seem reasonable, which means that both will likely confuse some users who expect the other.
The text was updated successfully, but these errors were encountered:
Since 373dcc8 we duplicate the xml document which contains the stylesheet. For the most common use case, namely that where the xml document is used as a stylesheet and nothing else, this means avoidable overhead. It would be better to combine parsing the stylesheet document and constructing a stylesheet object into a single step, so that we don't have to wrap the xml document for use by node.
Coding this should be reasonably easy, once we have decided what API to expose for this.
The current API should probably remain in place. Should we re-use the same function, and perform some case distinction based on the type of the argument? Interpret it as a document to be parsed if it's a
Buffer
, and as an already parsed XML document if it's any otherobject
? Should we do aninstanceof Document
check, or some ducktyping heuristics, to verify it's an XML document?How about
string
as input? Should we convert that to a buffer, or interpret it as a file name? Both approaches seem reasonable, which means that both will likely confuse some users who expect the other.The text was updated successfully, but these errors were encountered: