- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding processing instruction #140
Comments
Ths package leverages https://github.com/nashwaan/xml-js to generate the XML, so you'd need to start there. |
@paul-uz I believe https://github.com/nashwaan/xml-js already supports this via the "_instruction" key. This lib would need to expose that. I'm happy to issue a PR if I can work it out and it's something you think would be worth adding. |
Agree, this would be nice to have this ability. We want to add xml-stylesheet our RSS feeds for Docusaurus (facebook/docusaurus#9197) See also: https://darekkay.com/blog/rss-styling/ I tweaked this lib code and this seems to do the job: var base = {
_declaration: { _attributes: { version: "1.0", encoding: "utf-8" } },
_instruction: { "xml-stylesheet": 'href="/rss.xsl" type="text/xsl"' },
rss: {}
}; |
I'd like to add a processing instruction to the xml, specifically a stylesheet:
<?xml-stylesheet type="text/xsl" href="./rss-style.xsl"?>
I've had a good look around the code but I can't a way of doing it - anyone have any ideas how to do this (other than post-process the string)
Many thanks
The text was updated successfully, but these errors were encountered: