-
Notifications
You must be signed in to change notification settings - Fork 5
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
How are include nodes treated? #5
Comments
We don't expand them. For all the reasons you noted you might not want to: virtual outline could be infinite, could contain circular references, or could just be really huge. 😄 You can see an example of how include elements get parsed by doing this: cd <some project that uses opmlparser>
curl --silent http://hosting.opml.org/dave/spec/placesLived.opml | node_modules/opmlparser/bin/dump.js Output:
|
Well, you are right. I think what happened is that I left an include node expanded, and its subtext leaked out into the OPML. At least my current editor seems to have that bug. I haven't tracked it down yet. I concluded incorrectly that OPML Parser was diving into the includes. Sorry for the confusion. I wrote a standalone app to test it, and in it there's a routine that loads an OPML file into a JavaScript object. Sometimes I just want the data in the OPML file, as in River4, but in other projects I want the structure. That's what readOpml in this Gist does. https://gist.github.com/scripting/d0c898357424c30a2724 I wanted to share it here, so others might find it. It's pretty useful. |
I'm working on a reboot of the worldoutline, in Node of course, and one of the first things I'm looking at are include nodes.
It appears that opmlparser expands them. That is, when it encounters an include node, it reads the file and adds it underneath the including headline as if it were part of the outline.
The attributes are passed through so the application can tell it was an included node (if it wants to reload it periodically, so it can account for changes in the outline while the worldoutline software is running.
It seems to me it would be best if there were an option to not expand them. The worldoutline would set that flag false, because the idea is the virtual outline could be infinite, could contain circular references, for example, or could just be really huge. ;-)
The text was updated successfully, but these errors were encountered: