-
Notifications
You must be signed in to change notification settings - Fork 21
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
Ouput XML in canonical form #289
Comments
I think we'd still have to define some extra rules though, like sorting components and variables etc. by name |
The TR states this
So that part is covered. But nothing on element ordering as far as I can see. It appears that you can choose to have comments in or out for this form. Where do we sit on this comments situation? I think @agarny would be saying comments in. Comment locations would require tracking or attaching to some point. Could we exclude some comments and only support comments between elements? |
Canonical XML serialisation seems like what we might be after. Nice! I had a (very) quick look at the TR and I couldn't see anything about element ordering. It looks like the same order is used between the input document and its canonical form, which I am happy with. When it comes to comments, I would indeed want us to have a commented canonical form. @hsorby, OpenCOR only generates comments between elements, so I would personally be happy with just those (see here and here for some tests that cover OpenCOR's support of comments). |
When it comes to element ordering, I think it won't be in the TR as you're allowed to have meaningful ordering in XML documents (for example a I agree comments would be nice! Maybe a long term thing though? Sounds to me like if we fix this we might as well fix the whitespace thing. So I'm guessing we keep some sort of record of where everything was, and how much whitespace/comments came before/after it? Maybe good to split that into a different ticket? |
discussion on previous issues likely also relevant, e.g., #45 (comment) |
Just thinking about this from a different angle: When importing most cardiac models I get the state variables in the same order as the paper uses (e.g. with V as the first variable). That would be destroyed by a canonical ordering scheme. |
Thinking a bit more on that, if your model has |
Thinking a bit more on that, if your model has (I can't think of a use-case for that, but it just means that getting the order from the order in the doc, which is meaningless according to the spec anyway, shouldn't be the way to go) |
Couple of things I don't love about canonical form: https://en.wikipedia.org/wiki/Canonicalization#XML
|
Hi all!
Working in london with XML expert @jonc125 today, who told me something very relevant to yesterdays discussion on XML output:
So should be an easy fix?
The text was updated successfully, but these errors were encountered: